Using WCF 3.5 and the FlatWsdl EndpointBehavior from Christian Weyer, I was able to get a single flat WSDL file for my WCF services without any <import>
directives.
Now with WCF 4, this doesn't work anymore for some reason.
I have tried everything described in a lot of blog entries including using the WcfExtras behavior extension.
They all either refer to Chr. Weyers solution or recommend the WcfExtras. I also made sure I specified the same namespace for the binding, ServiceContract and ServiceBehavior.
In the custom service host, when the FlatWsdlExtension is about to be injected, the Description.Endpoints collection is always empty. I tried to configure my service endpoint with or without an adress, so far without luck.
What do I need to do in order to get a single flat WSDL for my WCF 4 service?
Thanks for any answers.
Late answer, hope it helps someone.
Had the same issue, solved it by manually adding the behavior to the serviceendpoint:
I was having this exact problem. After several attempts today, I finally got it to work by doing the following:
I tried WcfExtras among other things today -- there may be more or less to it, but these steps finally got me going. Good luck!
[edit]