Embedd_0913
Embedd_0913

Reputation: 16555

How the WSDL is written in WCF?

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.

Upvotes: 1

Views: 1358

Answers (1)

marc_s
marc_s

Reputation: 754538

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

Upvotes: 6

Related Questions