I have some classes (models) and WCF webservices. Can you tell me, how to from these sources generate wsdl file and xsd file ?
Asked
Active
Viewed 707 times
0
-
You are asking too broad of a question. You need to show what work you have attempted before we can help with where you are making mistakes. Here are some good reference points to look at: [How to generate a WSDL file from a C# webservice](http://stackoverflow.com/questions/2340797/how-to-generate-a-wsdl-file-from-a-c-sharp-webservice) – Ethilium Feb 14 '17 at 21:19
-
Thanks, when it comes to xsd from classes? – Feb 14 '17 at 21:24
-
Look at the answers here: [Using svcutil to generate xsd files for client proxy](http://stackoverflow.com/questions/8785441/using-svcutil-to-generate-xsd-files-for-client-proxy). – Ethilium Feb 14 '17 at 21:27
1 Answers
0
To generate the WSDL you first need to expose it in the service by means of the HttpGetEnabled property of the ServiceMetadata behavior.
Put the following in your .config file
Once the WCF service is capable of exposing WSDL, you can get it by appending a '?wsdl' to your service url. For example:
http://localhost/Service.svc?wsdl
Once you can access the WSDL, you can generate a WCF client by using the ServiceModel Metadata Utility Tool (svcutil.exe)

Jorge Del Conde
- 265
- 1
- 4
-
OP wasn't asking how to generate the client, they want to know how to generate the WSDL and XSDs. – Tim Feb 14 '17 at 23:04