A
Arpan
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
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