.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 to use WSDL and XSD in .net

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :.NET Framework
Hi, I have added external WSDL file to my .net application. I am able to see the functions in the WSDL. My question is how to use those functions. For eg: I have GetRequest and GetResponse functions and i am not sure how to use this both.... GetRequest req = new GetRequest(); Getresponse res = (GetResponse) ..... Im struck here... Im not sure of how to use and access these functions.... Kindly explain me about these. Any help would be appreciated... thanks

View Complete Post

More Related Resource Links

Web Services: Increase Your App's Reach Using WSDL to Combine Multiple Web Services


The very tools that have helped drive the growing adoption of Web services, and the enabling abstractions that they provide, can often prevent developers from peeking behind the curtains at the XML standards that make up the Web services stack. This article will offer a solution that enables type sharing between proxies created for complementary Web services, while at the same time providing an opportunity to examine the Web Services Description Language (WSDL) and its interaction with the Web services tools you know and love.

Gerrard Lindsay

MSDN Magazine March 2005

[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

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

 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?

why does WSDL file have httpS? i just need http

I built my c# web service.  Tested it.  I built my android app.  Tested it.  All is well.  I tried to get these things to talk to each other...FAIL.  I found these lines in my wsdl. <wsdl:service name="Service1"> - <wsdl:port name="Service1Soap" binding="tns:Service1Soap"> <soap:address location="" /> </wsdl:port> - <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12"> <soap12:address location="" /> </wsdl:port> </wsdl:service> What decided that the path should be https?  I never told it that.  It is overriding IIS which says everything should be http.  Someone please help me before I go ballistic.  Oh and for others developing on android 2.2, it won't take unsigned certs, so you either have to configure a local certificate authority or go http. 

Parsing WSDL using ServiceDescription

Hi, I am trying to parse a wsdl file using the ServiceDescription class. I've been able to extract some information such as ports and messages. However, I am having trouble accessing the types described in the file. These are the types eclosed within the definitions element. <wsdl:types> <xsd:schema> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/http/"/> <xsd:complexType name="singleOutAddress"> <xsd:sequence> <xsd:element name="ReferenceID" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <xsd:element name="AddressID" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <xsd:element name="Score" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <xsd:element name="Address" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <xsd:element name="PostalCode" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <xsd:element name="ErrorCode" minOccurs="0" maxOccurs="1" type="xsd:string"> </xsd:element> <

Can't Start The WSDL Tool

The WSDL Tool in the micorsoft window SDK v7.0 is not opening up when I go to the directory to start up the tool the wsdl prompt window opens then closes right away.  I downloaded the micorsoft windows SDk V7.0 cause I have windows 7, I am using visual studio 2008 and I need to get the tool open so I went to the directory C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin  then scrolled to the WSDL and clicked it and it opens then closes right away. How do I set it up so that it will stay open or is it supposed to just open once I have already installed the SDK. I nned the WSDL prompt window in order to right the WSDL command code to generate the proxy class file but if it opens and closes right away I can not type anything in the prompt. Please help Thanks, CIS Major

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

Generated WSDL - Remove prefix

ssdHi, My Service WSDL is generated with a "s:" prefix. How can I prevent this? ex: <s:schema elementFormDefault="qualified" targetNamespace="http://MyCompany.Services.Utils.LongNameServiceTest/"> <s:element name="Test"> <s:complexType /> </s:element> Thanks in advance, DD

Grouping Web Methods in WSDL

Hi Friends,We have webmethods for three modules under single asmx file, In this case, In WSDL, we like to show the list of associated methods under each module wise (like tree structure as follows) in order to give a better clarity to consumer. so please let me know, How to group the webmethods in a WSDL file (just display) ? Module1. Method1. Method2Module2. Method1. Method2Module3. Method1. Method2

WSDL not working for SQL Reporting Services 2008

I have seutp reporting services successfully, but now i want to generate a proxy to be able to interact progromatically with the reporting services 2008 like I did in 2000 and 2005.  I have tried viewing the WSDL from a command like this:   http://localhost/reportserver/reportservice.asmx?WSDL and I get an error like this:   The path of the item 'WSDL' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) Get Online Help Any thoughts?  I also tried from WSDL.exe, no dice. Thanksl Ben

Consuming Web Service. Dynamic WSDL ???

Hi everyone. I'm trying to consume a web service with my asp.net application. I've done the basic procedure of creating proxy classes but it won't work. After I spent hours debugging and talking to network support, I realized that a section within the WSDL was dynamic. The WSDL is located in a url like this: http://service/MyWebService?WSDL In the WSDL I have a section like this:<s0:service name="MyWebService"> <s0:port binding="s3:MyWebServiceSoap" name="MyWebServiceSoap"> <s4:address location="http://server1/MyWebService" /> </s0:port> </s0:service> If I press F5 on the browser, the WSDL shows a different address (only the server changes, actually). The range goes from server1 to server9. I've been informed that this service was hosted with some sort of balance system that redirect the requests amongst different servers according to a number of rules. I was also told that I only needed permission to access the balance server ("service"). So, I actually can't see those other "real" servers. When I generated my proxy classes, WSDL showed a path for server1. When I run my application I get a connection error ponting to the IP of server1. They said they can't give me permission to connect directly to server1 because it would kill the balance system. So, how can I con

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

Can't locate WSDL.EXE, VS2008 is installed

Where can I please find the WSDL.EXE I have the full VS2008 Installed.ThanksADH

WSDL Generated with my.svc?wsdl

I can get WSDL generated by WCF, if I simply point my web browser to URL: http://myhost/iisvirdir/my.svc?wsdl Generated WSDL contains entries like the following: <wsdl:operation name="callname"> <soap:operation soapAction="http://myhost/mypath/myservice/callname" style="document" /> <wsdl:input>   <soap:body use="literal" /> </wsdl:input> <wsdl:output>   <soap:body use="literal" /> </wsdl:output> </wsdl:operation> I see that input and output are always set to use literal. As I understand input and output parameters are XML document and its format is not covered in this WSDL.  I certainly cannot tell what input datastructures are used as input and output parameters from this WSDL. Does it mean that WSDL generated by svc?wsdl is incomplete? If I use Microsoft Windows SDK svcutil tool to generate WSDL I also get associated XSD files. Here is the command I use: svcutil.exe /t:metadata http://myhost/iisvirdir/my.svc That produces a set of files: namespace1.xsd namesapce2.xsd tempuri.org.wsdl my.wsdl I know that with this set of files I can easily generate C# code to implement another WCF service or client. I am surprised to see that after I put so much effort in creating namespaces all over I still get tempuri.org.wsdl (with the same literals for input outpu

WSDL not showing full definition

Hi guys,I have a webservice that returns a List<T> of objects.One of the object properties is another list of objects (Individuals).In the WSDL file that gets generated, it shows all the properties of the object in the main list, but it doesn't show the properties of the Individuals in the second list.All it shows is this:<IndividualList> <Individual xsi:nil="true" /> <Individual xsi:nil="true" /> </IndividualList>So it shows that there is a property called IndividualList and it knows that it contains Individual objects but I'd like it to list the properties of the Individual object as well.Any ideas?Thanks,Wilson

Incorrect hostname in EndPoint location in WSDL for a service with multiple bindings and with multip

We have a WCF web service that is exposed through multiple bindings.  The site is  accessed through multiple IP Addresses/Hostnames (internet/intranet).  Some of the bindings use http transport while others use https transport. The web application is configured to use .NET 4.0 with multipleSiteBindingsEnabled="true" so that we shouldn't have problems with multiple ip addresses/hostnames. What we see is that when the WSDL is accessed using a http based URL (external), the hostnames in the endpoint addresses for http transport based bindings in WSDL are correct (ie, they use the hostname header from the request) while the hostnames in the endpoint addresses for https transport based bindings in the WSDL are incorrect (ie, they do not use the hostname header in the request - they seem to use the hostname from the first available binding in IIS for that scheme and end up with the local machine names/ip addresses in the URL).   We could work around by setting the external hostname/ip in the first binding in IIS for the respective scheme, but then WSDLs accessed from intranet clients would have wrong URLS now. This happens the other way around as well, ie, when the WSDL is accessed using https, the https based addresses are fine, but http addresses in the WSDL are not correct. It looks like hostname header is used only for WSDL endpoint addre
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