Re: WSDL Generated Proxy Classes?



Hi,

Arpan wrote:
Web Services make use of proxy classes whose methods & properties are
accessed in exactly the same way as how a normal class' methods &
properties are accessed. So what for does ASP.NET generate proxy
classes (using WSDL) which consume more hard disk space & resources?

<code snipped>

The above code spans just 11 lines but if the above code (excluding the
2 Namespace lines) is encapsulated in an ASMX file after which WSDL is
used to generate a corresponding class file, the class file spans
almost 100 lines (excluding the commented lines). Moreover, most part
of the code in the generated class is not comprehensible to newbies
like me. So why use WSDL to generate a class file? Also there
definitely must be some additional overheads involved in this approach,
isn't it?

Thanks,

Arpan

WSDL is Web Service Description Language. It is a standard which is used to describe what the Web Service can do. The advantage of generating a WSDL file is that each client can download the WSDL file and generate proxy "on the fly". This is what Visual Studio does when you create a WebReference to a web service, and it generates proxies. However, there are also other consumers of web services (ATLAS in JavaScript), and they also create proxies in JavaScript dynamically using the WSDL file. Since JavaScript is a very different language than C# and VB.NET, and since web services may actually be written in yet other languages, WSDL abstracts the language differences and allows different languages to communicate through this medium.

It's very possible to do AJAX without SOAP and without WSDL. The code is much thinner then. But SOAP and WSDL offer an additional level of comfort for the consumer of web services.

..NET creates WSDL files automatically (just use the URL myService.asmx?WSDL), but other providers of web services (Google comes in mind) also deliver WSDL files with their web services.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
.



Relevant Pages

  • Re: WSDL Generated Proxy Classes?
    ... WSDL file is that each client can download the WSDL file and generate ... But what proxy classes do, the same can be done using business objects. ... Both Web Services & business objects require compiled objects that are ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: tclsoap array-based queries
    ... I'd be keen to hear of success here - last time I tried arrays/wsdl I ... "WSDL does not define any services", ... The WSDL file provides a standard description of CDAS web services. ...
    (comp.lang.tcl)
  • Re: tclsoap array-based queries
    ... set proxy "http://sscweb.gsfc.nasa.gov/WS/ssc/jaxrpc"; ... "WSDL does not define any services", ... The WSDL file provides a standard description of CDAS web services. ...
    (comp.lang.tcl)
  • Re: Some questions on what technology to use
    ... > look at Web Services using remoting and also WSE 2. ... > of attaching messages to methods and automatically generating WSDL etc.. ... So there is really no need to get into the XML ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Some questions on what technology to use
    ... > look at Web Services using remoting and also WSE 2. ... > of attaching messages to methods and automatically generating WSDL etc.. ... So there is really no need to get into the XML ...
    (microsoft.public.dotnet.framework)