473,498 Members | 310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5375
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
10980
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
9880
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
8872
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
3469
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
3807
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
10303
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
4891
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
11912
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
3256
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...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.