Improving WCF interop with Websphere/RAD by controlling WSDL Generation

I wrote about Christian's foray into this area a while back. Now comes news that other people are confronting the same issue, but with Websphere or Rational App Developer.

Here's the problem: WCF emits WSDL that is modular - the base WSDL file references other WSDLs and XSDs which are external.  Christian found out that not all non-.NET tools (such as some PHP libraries he tried) can digest that modular WSDL, and a "flattened" WSDL works better in many cases.  This apparently is also true with Rational Application Developer.   If you are a WSDL hacker, you can, in 10-20 minutes, take a compound WSDL document and flatten it.  But most people are not WSDL hackers and if they are, they don't want to be WSDL hackers. (Trust me on this)

Ideally, generating flattened WSDL out of WCF would be something you could just "turn on" - so that flat WSDL is automatically generated.  In fact, this is exactly what Christian did.  Modifying the WCF host so that the auto-generated WSDL is automatically flattened, is pretty simple, and general.  This should improve interop with Rational Application Developer significantly.

By the way, Christian does his flattening trick by using a custom ServiceHost in WCF - the same extensibility point I used to improve interop with ASMX services, which I described in a prior post.