Right click on the project...
and select "Add Web Reference..."
and point to the WSDL
You are done!

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
Hi and thx for the answer Gaurav,
Unfortunatly I have around 20 WSs to link this way and some are
added/modified on a regular basis (quite a nightmare I admit).
The idea is to build a tool that builds 1 proxy for all these WSs using
1 namespace...(i'll pass all the advantages given by using wsdl.exe
against using the Add Web Reference).
If the user has to click on 1 button instead of asking me to do the
proxy I could save up some time to do more interesting things. I have
done a .bat, but the exe not being at the same path on every computers,
it's a rather limited approach.
Once more if anyone knows how to use WSDL.exe programmatically (or to
achieve the same in another way) I'd be gratful if this person could
share this knowledge.
Robert Wilczynski - 26 May 2006 12:41 GMT
Hi Pierre,
You may want to try the following:
System.Diagnostics.ProcessStartInfo wsdlExeStartInfo = new System.Diagnostics.ProcessStartInfo(
"wsdl.exe", "/l:CS /edb /n:My.Company.Namespace /sharetypes
http://someserver/someservices.asmx");
System.Diagnostics.Process wsdlExe = System.Diagnostics.Process.Start(wsdlExeStartInfo);
You can of course wrap it in a method and parameterize the arguments passed
to wsdl.exe.
I believe you cannot redistribute wsdl.exe with your applications so you
will have to somehow locate it on the client machine and include .Net SDK
as a prerequisite for your application.
Does that help?
Best regards,
Robert Wilczynski.
> Hi and thx for the answer Gaurav,
>
[quoted text clipped - 13 lines]
> achieve the same in another way) I'd be gratful if this person could
> share this knowledge.
Gaurav Vaish (EduJini.IN) - 27 May 2006 14:56 GMT
> "wsdl.exe", "/l:CS /edb /n:My.Company.Namespace
> /sharetypes http://someserver/someservices.asmx");
> System.Diagnostics.Process wsdlExe =
> System.Diagnostics.Process.Start(wsdlExeStartInfo);
Would like to add just one modification, based on Piere's requirements.
0. Create a file services.txt with list of all asmx/services, one per line
1. Invoke the code above in a loop and replace the hard-coded location with
what you read from the file.

Signature
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
Kirk Allen Evans - 26 May 2006 21:07 GMT
Here's an approach using
System.Web.Services.Description.ServiceDescriptionImporter:
http://blogs.msdn.com/kaevans/archive/2006/04/27/585013.aspx
Kirk Allen Evans [msft]
blogs.msdn.com/kaevans
====Provided As-Is and Implies no Warranty====
> Hi and thx for the answer Gaurav,
>
[quoted text clipped - 13 lines]
> achieve the same in another way) I'd be gratful if this person could
> share this knowledge.
Pierre - 30 May 2006 11:21 GMT
Thank you for the fast and helpful answers guys,
Very nice article you've written there Kirk, that's what I needed.
Thank you again I appreciate the help.
Pierre