472,783 Members | 983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

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

Sep 7 '06 #1
3 5325
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
Sep 7 '06 #2
>The advantage of generating a
WSDL file is that each client can download the WSDL file and generate
proxy "on the fly".
But what proxy classes do, the same can be done using business objects.
In other words, the logic that a proxy class encapsulates, the same
logic can be implemented using a business object i.e. both of them can
be used to retrieve data dynamically but using WSDL means the client
has to save the proxy file (along with the disco & results.discomap
files though not necessarily) in his machine thus consuming disk space
but with business objects, the client needn't save anything on his hard
disk.

Moreover to access the methods & properties in a proxy file, the client
has to pass commands to the Web Service (which maybe preceded by first
finding where the Web Service exists using DISCO) but with business
objects, there isn't any need for clients to use any extra tools like
WSDL.exe & DISCO.exe to access the business object's methods &
properties.

Both Web Services & business objects require compiled objects that are
implemented in ASP.NET pages. An ASP.NET book for beginners states that
the ONLY difference between Web Services & business objects is that
with Web Services, the compiled object (i.e. the proxy class) can
reside anywhere on the Internet. In other words, the ASP.NET page can
be located on a client's home computer in New York while the Web
Service resides on a server which is in Tokyo. But even business
objects that reside on a server in Tokyo can be accessed by an ASP.NET
page which is located in a client's machine in New York!

So what's the difference between Web Services & business objects or
what are the advantages of using Web Services (using WSDLs & sometimes
DISCOs) over business objects?

Thanks,

Regards,

Arpan

Laurent Bugnion wrote:
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
Sep 7 '06 #3
Hi,

Arpan wrote:
>The advantage of generating a
WSDL file is that each client can download the WSDL file and generate
proxy "on the fly".

But what proxy classes do, the same can be done using business objects.
In other words, the logic that a proxy class encapsulates, the same
logic can be implemented using a business object i.e. both of them can
be used to retrieve data dynamically but using WSDL means the client
has to save the proxy file (along with the disco & results.discomap
files though not necessarily) in his machine thus consuming disk space
but with business objects, the client needn't save anything on his hard
disk.
I think that you're missing the point that web services are not tied to
a technology or an environment, and that the proxy classes can be (and
often are, for example in ATLAS) generated dynamically during runtime.
In that scenario, nothing is saved on the client, and a description file
is needed. The .NET way of using "static" web references to consume web
services is, IMHO, rather the exception.

I think that everything which SOAP does can be done in other more
efficient ways, for example using simpler AJAX. But SOAP offers an
additional level of comfort for the user, which explains why it's
"bloated" (which is the most common criticism found against SOAP based
web services).

HTH,
Laurent
>
Moreover to access the methods & properties in a proxy file, the client
has to pass commands to the Web Service (which maybe preceded by first
finding where the Web Service exists using DISCO) but with business
objects, there isn't any need for clients to use any extra tools like
WSDL.exe & DISCO.exe to access the business object's methods &
properties.

Both Web Services & business objects require compiled objects that are
implemented in ASP.NET pages. An ASP.NET book for beginners states that
the ONLY difference between Web Services & business objects is that
with Web Services, the compiled object (i.e. the proxy class) can
reside anywhere on the Internet. In other words, the ASP.NET page can
be located on a client's home computer in New York while the Web
Service resides on a server which is in Tokyo. But even business
objects that reside on a server in Tokyo can be accessed by an ASP.NET
page which is located in a client's machine in New York!

So what's the difference between Web Services & business objects or
what are the advantages of using Web Services (using WSDLs & sometimes
DISCOs) over business objects?

Thanks,

Regards,

Arpan
--
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
Sep 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: raymond | last post by:
Hi, Is it possible to create a proxy client class or a web service method by VS.NET without using wsdl? My stupid client is using a xml schema (.xsd) to describe all their web service methods...
1
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
3
by: Benne Smith | last post by:
hi all, i have a webservice with some public classes in it. These classes are visible from my proxy class, generated from wsdl.exe. The problem is, that when i look in the generated proxy class,...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
9
by: Developer | last post by:
Hi, How can one tell wsdl.exe/VS.NET web service proxy generatioon to to put on imported classes? For example, i fin your web service you use a class: class Data { }
5
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use...
5
by: CindyRob | last post by:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET 2003, hotfixes 892202 and 823639. I create a proxy class using wsdl.exe, and in the serialized XML request, I see...
9
by: Cesar | last post by:
Hello there, A java programmer sent me a wsdl file, which I have to use to consume his web methods. When I run the wsld.exe tool to generate the class' code, I get the following message: ...
5
by: Thomas Lunsford | last post by:
I have been asked to allow one of our old-school .asp pages to support being used as a web service. Specifically, WSDL was mentioned. I am not an expert on this , but I have done quite a bit of...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.