I have a service contract ICalc, and I want to expose a WSDL through the MEX endpoint, which will only describe the ICalc contract, i.e. will contain only the portType element, without the service element.
Is there a way to do that in WCF?
views:
39answers:
1
A:
It sounds like what you want is to expose an abstract WSDL instead of a concrete WSDL. As far as I know, there is no built-in way in WCF to accomplish this.
One thing I thought about is that it may be possible to accomplish this by manually removing the <service> and <binding> elements from the generated WSDL file in a custom IWsdlExportExtension extension. However, I was unable to get it to work after a few tests (if I removed the service, WCF would just show the HTML help screen when the WSDL was requested).
There might be a way to get it though, so maybe give it a try.
tomasr
2010-01-19 14:38:49