Client provided me the wsdl to generate the web service.But when I used the wsdl.exe command it generated the .cs class out of it. I consumed that class in my web service and when I provided the wsdl to client it didn't match their schema. Actually I want the .asmx to be automatically generated from the wsdl so that I could fill in the web method. So that it will exactly match their schema.
Hope it make sense.
C# – how to generate web service out of wsdl
asmxcwsdl
Related Topic
- Create an ASMX web service from a WSDL file
- C# – How to include the own wsdl in the web service in C#
- C# – How to generate a random int number
- Actionscript – How to pass “Null” (a real surname!) to a SOAP web service in ActionScript 3
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
There isn't a magic bullet solution for what you're looking for, unfortunately. Here's what you can do:
create an Interface class using this command in the Visual Studio Command Prompt window:
wsdl.exe yourFile.wsdl /l:CS /serverInterface
Use VB or CS for your language of choice. This will create a new
.cs
or.vb
file.Create a new .NET Web Service project. Import Existing File into your project - the file that was created in the step above.
In your
.asmx.cs
file in Code-View, modify your class as such: