WSDL Generated Proxy Classes?



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?

For e.g. consider the following code which exists in a user-defined
class file:

Imports System
Imports System.Data
Imports System.Web.Services

Namespace AddNumbers
Public Class Calculator : Inherits WebService
<WebMethod()> Public Function Add(ByVal intA As Integer, ByVal
intB As Integer) As Integer
Return (intA + intB)
End Function
End Class
End Namespace

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

.



Relevant Pages

  • Re: XSD to Web Service
    ... Use XSD.EXE to generate a class file. ... Modify WSDL to now point to external server address. ... >I have to interact with a web service created by an external company. ... They have supplied me with a XSD and some ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: XSD to Web Service
    ... Could you elaborate on how to "mimic server interaction" using the class file? ... I actually, like you, have an xsd that I would like to create a web service ... the schema (xsd file) could change. ... Modify WSDL to now point to external server address. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: cannot see wsdl file in .NET or in IE
    ... If you ever experience problem in linking with webservices in the IDE, ... may try the "wsdl" command line utility and have it create the class file ... > I'm trying to view the WSDL files for webservices, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ClassNotFoundException using Java2WSDL command
    ... I'm just guessing here, never used axis or wsdl myself, but it looks ... like it doesn't want a source file, but a class file. ... So compile your ...
    (comp.lang.java.programmer)

Loading