.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How do I generate proxy class for webservice with no WSDL published?

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
 Hello, I need to utilize following web service: https://www.icds.att.com/xmlrequest Service publishes 2 XML files (one for Request and another for Response) https://www.icds.att.com/schemas/XMLRequest.xsd and https://www.icds.att.com/schemas/XMLResponse.xsd. I generated classes for those manually, but my question is how do I actually utilize web service (generate proxy file) in this case. Do I have to code everything manually?

View Complete Post

More Related Resource Links

Dynamically Generate a WCF Proxy class at runtime and Callling web methods via reflection



I'm busy writing an application where the user will have to specify the location of a ?wsdl file for asmx and/or svc type services.

My application will have to :

1. Deduce from the wsdl what methods (with parameters and return types) are available on the service.

2. Provide a way to either generate a Proxy class in memory to execute methods against with e.g: Reflection

    for instanse : genericProxy.Invoke("HelloWorldMethod",parameter1,parameter2);

    I want to avoid using something like this : notSoGenericProxy.HelloWorldMethod(parameter1,parameter2); seeing that my application will have no 

    idea what service it will have to work with at runtime.

Is there a way to achieve this?

Thank you for any help in advance!

WSDL proxy class


Hi All

I am using Add Reference in visual studio to generate a local proxy class by using the link http://localhost/abc.wsdl, then begin to development the program at my local environment. 

When the program is finished, I deploy the program to the production environment where cannot access my local environment, would I fail to connect to the web service because the proxy class is generated by ?http://localhost/abc.wsdl? should I need another link which can be accessed in production environment to generate the proxy class? Or I just need to swtich a production accessiable url for the HttpSoapClientProtocol? Thanks

[newbie] How to return a data record from a webservice (wsdl)?



vs2010, .NET 4.0

I have a webmethod which I want to return a data record (for example: name, surename, address, age, zip etc)

I wonder how to accomplish this. I think the solution is about creating an object which contains all the records serialized. And then the webmethod returns this serialized object. I'm not 100% sure how to accomplish this, if some of you good provide me with some tips, tutorial or link to an article explaining it, that would be great

XmlSerializer - how to define class to not generate attributes in root element?

Hi! I have simple class that I serialize to xml file: <?xml version="1.0" encoding="utf-8"?> <MyRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Area="East">   <Products>     <SalesProduct Taxable="true">       <Name>Sofa</Name>     </SalesProduct>     <Product>       <Name>Television</Name>     </Product>   </Products> </MyRootElement> I don`t want have in xml file attributes xmlns:xsi and xmlns:xsd. How can I define class to not have these two attributes in xml file? I tried use XmlRoot attribute but there is no control for these two attributes. They are always generated. Regards

return class to javascript from webservice?

Hi,I know i've seen a tutorial for this, but can't locate it anymore. I have a class Employee in c# side, I also have a webservice where I pass in an ID# and an Employee object is returned. Now I want this object returned to Javascript code, I know I've seen it done before, can someone point me to a tutorial that shows something like this being done. I'm using the MicrosoftAjax.js file.Thanks.

Deserializing Problem when build proxy by svcutil from WSDL

Hi, I got a WSDL from a third-party company and have to build a proxy to fetch data. I used svcutil *.wsdl to generate code and config file. Using the proxy I wondered why I got unexpected results: The return value is alway 0 and the string field CTWS_ReturnMsg always empty even if the server sent values. Could anybody help me? Here the WSDL and afterwards the http-traffic (from Wireshark): <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://CEITONWebService.org/">     <wsdl:types>         <xs:schema xmlns="http://CEITONWebService.org/" xmlns:mstns="http://CEITONWebService.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://CEITONWebService.org" targetNamespace=&q

Referenced WebService, class constructor with parameters

Hi, I have WebService which is referenced in C# ClassLibrary project. In WebService project I have a class named User, which has two constructors - one without parameters and one whith parameters. When I try to create instance of User class from WS in ClassLibrary, I can use only constructor with parameters. My question is, how can I use in constructor with parameters like User u = new User("some@email.com", ...);. Any idea? Thansk

WSDL webservice

I use a webservice to authenticate login. The flow is like thisdefault.aspx ( has the log-in form) -----> user inputs credentials -->presses sign in button -- > the webservice is called and the user authenticated -- > then the userid is added into the URL and passed on to a page using "query string" which is in a subfolder  ( miracle/miracleAuthorization.aspx) ---> here the page has to do some more authentication as to find out what kind of user has logged on so as to re-direct the user accordingly.Here this page throws and error that it is shown on this page http://www.uconnected.in/Miracle/miracleAuthorization.aspx?userid=2 but when i run this website on localhost.. it runs and works fine.  All this is done by adding a webrefernce to a webservice, which is already running live on the net.No clue how to solve this.. Please help

Unable to create instance of proxy class in WCF

Hello, I created proxy class using svcutil.exe and added it in App_Webreference folder. I want to access objects and methods from this proxy. But I am unable to create instance of this proxy class. In inellisence, it is not showing this proxy class. What could be the problem ? I am using VS 2008 and Visual Basic.   Thanks in advance.  Amit Lohakare

WCF : How to prevent an endpoint from being published in the service WSDL?

Suppose I have a WCF service which has 2 endpoints A and B. I want to enable mex/wsdl on this service but my requirement is that B should not be published in the WSDL. So to say B is only for internal purpose and clients should never be aware of it. Is there a way (most probably somehow using IWsdlExporterExtension), to remove this endpoint B from being published in the metadata?

Not able to generate proxy for the service hosted on IIS, but working on Dev Web Server?

Hi, I have tried to host WCF on the IIS, it browsed sucessfully using the path http://localhost/WCF/Service1.svc but when tried to generate proxy using SvcUtil, it generated the following message. Bus the same when tried from the development server is working file. c:\Program Files\Microsoft Visual Studio 9.0\VC>svcutil.exe http://localhost/WCF /Service1.svc?wsdl Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation.  All rights reserved. Attempting to download metadata from 'http://localhost/WCF/Service1.svc?wsdl' us ing WS-Metadata Exchange or DISCO. Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation.  All rights reserved. Error: Cannot obtain Metadata from http://localhost/WCF/Service1.svc?wsdl If this is a Windows (R) Communication Foundation service to which you have acce ss, please check that you have enabled metadata publishing at the specified addr ess.  For help enabling metadata publishing, please refer to the MSDN documentat ion at http://go.microsoft.com/fwlink/?LinkId=65455. WS-Metadata Exchange Error     URI: http://localhost/WCF/Service1.svc?wsdl     Metadata contains a reference that cannot be resolved: 'http:

Acesso ao webservice atraves de um proxy



Tenho um cliente que após a instalação do proxy, não conseguiu acessar mais o webservice que temos.

O que eu poderia fazer para ele continuar a acessar o meu Webservice? Tem alguma configuração que eu possa adicionar ao programa?



Serializing / Storing VS2010 generated WCF Proxy Class reference in SQL SessionState



I have a WCF 4 service being consumed by an ASP.NET 3.5 (SharePoint 2010 actually) application.

Because we have implemented session support in the WCF service (ws2007HttpBinding) to maintain some objects that are very expensive to intialize, I'm also trying to keep my service client reference persisted on the ASP.NET consumer-side. However in order to persist it across post-backs, I need to add it to the session (using SharePoint's SQL SessionState provider), and this causes serialization (binary serialization) of the WCF service referece.

The ASP.NET application is throwing an error, because it cannot serialize the WCF service reference.

Any thoughts?

How to use webservice in Class Library Project


I've created class library project and added service reference to  webservice.
When i try to use webservice object am not able to access webservice methods.

myservice proxy=new myservice();

proxy.( no methods are coming)?

Looking for third party class libs for FTP, FTP proxy, and FTPS

I'm looking for thrid party class lib(s) to do FTP, FTP proxy, and FTPS with .NET.

We have been using the classes that come with .NET but have been running into intermittant problems where it looks like connections are not been closed when they should be.  We want to look into some of the other FTP class libs that are out there to see what options we have.

Does anyone have any suggestions, noteworthly experiences, etc... with any FTP products (other than the .NET classes)?

thank you,
Julia Filho

SSIS calling proxy class but need to add soap header (?)

Hi guys I am a bit of newbie to both web services and SSIS.....
I have a SSIS 2005 (not 2008!) package that consumes a WCF Web service which was written by another company.  This company generated a proxy class in VB for me and I copied and pasted the code into my SSIS VB script task.
Here is the beginning of the proxy class:
Namespace abc.xxx.xxxxxxx.Client.xxxxx
    <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038"), _
     System.Diagnostics.DebuggerStepThroughAttribute(), _
     System.ComponentModel.DesignerCategoryAttribute("code"), _
     System.Web.Services.WebServiceBindingAttribute(Name:="BasicHttpBinding_Idkdkdkdkdkdk", [Namespace]:="http://blah/"), _
     System.Xml.Serialization.XmlIncludeAttribute(GetType(dddddddddd))> _
    Partial Public Class class1
It appears to be fine but when I tried to call any web service method, it returns a soap error "username is not in HTTP header".  I asked the company that wrote the Web service and

How to create wsdl proxy of web service with out event handler for .net compact framework 4


Hi All

i have one problem while access web service axis 1.4 in compact frame work

Create web service object using client

 MIScreenSoapClient ser = new MIScreenSoapClient();

create event handler for method to access web service

ser.GetLoginRequestCompleted += new EventHandler<GetLoginRequestCompletedEventArgs>(proxy_getloginrequest);
    ser.GetLoginRequestAsync(strLogin, strPass, Program.VersionNumber, "WM1", "test", "WP7");

Event Handle for method

 void proxy_getloginrequest(object sender, GetLoginRequestCompletedEventArgs e)
   string eee = e.Result;
is there any way to access webservice without call event handler?
Please help me

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend