Last post Jan 17, 2020 08:17 AM by Abraham Qian
Jan 16, 2020 03:26 AM|TheCat|LINK
I have .cs file that auto-generated by wsdl file. Can i convert .cs file back to wsdl
Jan 16, 2020 10:41 AM|PatriceSc|LINK
Try https://docs.microsoft.com/en-us/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe if you want to do this "by hand"
Usually the WSDL is exposed by the service itself ofen by appending ?wsdl to the service url (might need to be enabled). You are using WCF ?
Edit: ah what you generate from the WSDL file is a client to use the service described by this WSDL file. I would not even have thought to try to generate a WSDL document from client classes. You can't get the WSDL document from the service
for which you generated this client ?
Jan 17, 2020 08:17 AM|Abraham Qian|LINK
WSDL is a simple XML document that contains a web service definition. Therefore we can not generate a WSDL file directly from a C# class. we should create a web service based on C# framework, then try to generate a WSDL. This feature usually is a built-in
in that web service framework. Both XML web services and WCF provide a built-in WSDL implementation.
As I said, WSDL contains the core elements of the following elements.
definition of types........
definition of a message....
definition of a port.......
definition of a binding....
Please refer to web service definition language official link.
Feel free to let me know if there is anything I can help with.