I'm originally Java developer, still baby stepping in .Net so please don't get take my question as a stupid one. I'm asked to use a pre-done Web Services. The Resources that was given to me doesn't include WS URL. I only have some documentations of the WS and its WSDL http://beta.catcombinator.com/tracking-ws/api/gadget?wsdl I know for sure that there is a tool in Java that can use this WSDL like JAXB to create objects out of WSDL, but I have no clue what to do in .NET to do such thing. Can you guys give me some support? PTW this WSDL is suppose to return a webservice and a Bean. Your help is appreciated.
3 Answers
You can use svcutil to generate your proxy classes from your WSDL.
Open a "Visual Studio command prompt", then it can be as simple as running the following command
svcutil http://beta.catcombinator.com/tracking-ws/api/gadget
Obviously, there are lots of command-line flags you might want to use to modify the output for language (c#, VB), namespace, etc.
To open the correct command prompt:
- Start → All Programs → Microsoft Visual Studio [Version] -> Visual Studio Tools
3 Comments
?wsdl at the end.Import the web service into Visual Studio
In the right hand side of your project you have "References". You want to right-click on the "References" option and select "Add Web Reference". You will then be provided with a wizard for selecting the location of your WSDL file. Through this wizard visual studio will create a "Proxy" class for you so you can treat the web service as an object as you would in Java.
http://msdn.microsoft.com/en-us/library/bb628649.aspx
