Proxy creation - why is there more than 1 way?

T

Tim Zych

To create a web service proxy you can use wsdl.exe and vbc.exe using command
line, then set a reference to the resulting dll, or alternatively add a web
reference and let vs.net do it all for us.

Does the manual command line way offer any advantages over the other? Why
would a developer want to use command line to do that instead of the
automatic way?
 
D

Dave Fancher

Two reasons that I can think of:

One reason is that Visual Studio is just a tool for creating .NET apps.
..NET apps can be developed with software other than Visual Studio (see:
Notepad, etc...). The .NET Framework SDK provides the tools needed to build
..NET apps to those that do not have/can't afford Visual Studio.

The other reason really boils down to how you want to use the web service.
If you are only going to use the service in one application, adding a Web
Reference through Visual Studio will create the proxy class and, when the
project is compiled, the proxy class will be compiled into the project's
assembly rather than to its own. However, if you need to use the web
service from multiple applications, it would probably make more sense to
generate the proxy class manually with WSDL.exe and compile it to its own
assembly that can be referenced where it's needed.

HTH
 
T

Tim Zych

good points. Thanks.

Dave Fancher said:
Two reasons that I can think of:

One reason is that Visual Studio is just a tool for creating .NET apps.
.NET apps can be developed with software other than Visual Studio (see:
Notepad, etc...). The .NET Framework SDK provides the tools needed to build
.NET apps to those that do not have/can't afford Visual Studio.

The other reason really boils down to how you want to use the web service.
If you are only going to use the service in one application, adding a Web
Reference through Visual Studio will create the proxy class and, when the
project is compiled, the proxy class will be compiled into the project's
assembly rather than to its own. However, if you need to use the web
service from multiple applications, it would probably make more sense to
generate the proxy class manually with WSDL.exe and compile it to its own
assembly that can be referenced where it's needed.

HTH
 
B

Bruce Barker

all vs does is run wsdl.exe for you. its just a convience, just as it run
the compilers and linkers for you.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top