473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

using WSDL.exe programmatically

Hi all,

I'm building a small app that allows users to create proxys by clicking
on an interface (web, winform).

I started my project, imported wsdl.exe (add reference) and tried to
figure out a way to use it programmatically (throught object browser,
research engines, msdn...).

But I have to admit it looks a bit opaque to me.

If anybody has some tips/knowledge on how to simply convert a command
line: wsdl.exe /l:CS /edb /n:My.Company.Namespace /sharetypes
http://someserver/someservices.asmx into an app with a user interface,
I'll be very happy to hear about it.

Looking forward to hear from you.

Best regards,

Pierre

May 24 '06 #1
6 2652
Right click on the project...
and select "Add Web Reference..."
and point to the WSDL

You are done!
--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
"Pierre" <bu****@no-log.org> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hi all,

I'm building a small app that allows users to create proxys by clicking
on an interface (web, winform).

I started my project, imported wsdl.exe (add reference) and tried to
figure out a way to use it programmatically (throught object browser,
research engines, msdn...).

But I have to admit it looks a bit opaque to me.

If anybody has some tips/knowledge on how to simply convert a command
line: wsdl.exe /l:CS /edb /n:My.Company.Namespace /sharetypes
http://someserver/someservices.asmx into an app with a user interface,
I'll be very happy to hear about it.

Looking forward to hear from you.

Best regards,

Pierre

May 25 '06 #2
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.

May 26 '06 #3
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,

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.

May 26 '06 #4
Here's an approach using
System.Web.Services.Description.ServiceDescription Importer:

http://blogs.msdn.com/kaevans/archiv...27/585013.aspx

Kirk Allen Evans [msft]
blogs.msdn.com/kaevans

====Provided As-Is and Implies no Warranty====

"Pierre" <bu****@no-log.org> wrote in message
news:11*********************@38g2000cwa.googlegrou ps.com...
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.


May 26 '06 #5
> "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.
--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------
May 27 '06 #6
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

May 30 '06 #7

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...
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...
0
by: Daniel Thune, MCSE | last post by:
I am trying to use the WSDL.exe tool to create a proxy class for a webservice. I have the URL to the WSDL file for the service, but when I run the WSDL.exe tool and give it this URL I get the...
1
by: Savas Ates | last post by:
i was given an url bla bla.wsdl i am asked for entering data using this wsdl url? is it possible? how can i do it? must i use asp.net werb services .. any url or example or way t solve it...
1
by: Chenzo | last post by:
I have an issue where the provided .wsdl file is being generated incorrectly with the WSDL.exe tool. I have to use digital client certificates for authentication and it has been determined...by...
2
by: Anbu | last post by:
Hi, I have WSDL files generated by Java based Axis software. I need to use these WSDL files in ASP .NET. How can I import the WSDL files? Should i need to create a stub to using WSDL.exe to...
5
by: Pete Wittig | last post by:
Hi, Here is my problem. I have a serviced component that is exposed via a SOAP interface. This particular component, Person, has a method that takes in another object called PersonHobby. When...
4
by: Angel Of Death | last post by:
If server uses HTTP 1.1 Gzip compression, how can I use the classes generated using WSDL.exe. I can do : protected override WebRequest GetWebRequest(Uri uri) { WebRequest request =...
0
by: jeeshma | last post by:
hi, i am try to accessing a web page content(urls only) using wsdl in vs2005.for that i created a wsdl and proxy.ps help mel
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.