Search code examples
wcfweb-serviceswsdlnamespaces

WCF: how to generate a single WSDL document, without WSDL:import?


I'm troubling into an issue... I'm trying to find a way to generate a single wsdl document from my WCF service, i.e. without any link to external documents. I've used FlatWsdl to remove all xsd:import links, bou my generated wsdl still contains a link to an external wsdl document via a wsdl:import declaration:

<wsdl:import namespace="http://myurl/mynamespace"  
             location="http://myserver/myservice.svc?wsdl=wsdl0"/>  

This document actually contains all inlined xsd schemas, so... there's a way to inline also this external wsdl document, in order to have a single wsdl?

Thanks a lot for any kind of help.


Solution

  • (EDIT: Previous answer about FlatWSDL deleted, because as you pointed out it was about eliminating xsd:import not wsdl:import.)

    Look at this blogpost: Control generated WSDL in WCF

    "... There is always one WSDL generated for one target namespace URI ..."

    Do you have different namespace for ServiceContract, DataContract, ServiceBehavior, etc. ?