tags:

views:

127

answers:

1

Hi All,

I want to know how the wsdl is written in wcf. As i know the proxy class serialize the data and form a soap message to send over network, in the same way , i want to know who writes the wsdl file and takes care of serializing results of a call.

+3  A: 

The abstract ServiceHostBase class has a method called CreateDescription that will take your service and operation contracts as well as your fault and data contracts and turns those into a ServiceDescription. This is then further handled by a WsdlExporter and turned into a WSDL and XSD file. What gets output to the WSDL (and XSD) is available on the service class as the "service description" (property "Description") - it contains information about the endpoints, bindings, other config settings etc.

Have a look at the MSDN Docs for the WsdlExporter class. You can even customize this process, if you want to - see these blog posts for more info on that:

And have a look at the MSDN docs on:

Marc

marc_s