问题
I have a WSDL file. I want to convert wsdl file to web service class file.
Is it possible? If yes please explain it to me in detail.
回答1:
- In Solution Explorer right click on your project and go to "Add Service Reference..."
- Press "Advanced..." at the bottom of the window.
- Press "Add Web Reference..." at the bottom of the window.
- In the URL field enter the path to the file eg. C:\Documents and Settings\username\Desktop\filename
- Press Go arrow. Service description should display.
- Enter the reference name you wish.
- Press "Add reference".
- Watch Visual Studio do its magic and making your life easy.
- Take a break.
回答2:
If you are using .NET and you want to create a client class you can use WSDL.exe.
There are numerous examples on how to create a Java client proxy if you google correctly.
回答3:
For Android and Iphone: www.wsdl2code.com/ It converts WSDL file to Java and objective c files. Hopes it help.
回答4:
A WSDL is more of an interface; it's not going to have any implementation details. If you use WSDL.exe or pull the web service in a project and look at all files, you should get the method signatures.
来源:https://stackoverflow.com/questions/2582341/how-to-convert-wsdl-file-to-class-file