These are probably few of the most popular questions on the forums
and in the WCF sessions.
can I make my WCF WSDL same as Asmx WSDL? It looks different even when I use basic http binding with nothing fancy (security, reliable messaging..no WS* of course).
doing interop with Java and my stub generator is unable to understand the WSDL
generated by WCF but it works just fine with Asmx WSDL, what am I doing
- What binding
should I use which works best for interop?
where are my types?
In short, the answer is, there is no silver bullet when it
comes to interop. There are several case by case things you’d need to consider
when trying to make your contracts visible to outside world. Having said that,
there are best practices you can follow which I’d cover in this and upcoming
generated via WCF is different from traditional ASMX WSDL because they have split the schema into multiple
segments (WSDL0, WSDL1....). This is the reason why when you look at the WSDL, you'll notice that the types
seem to be missing! The stub building tools which come with other servers (Weblogic
6.0 for example) do not yet know this and do not iterate through the links specified
in the schema by default, therefore you would not be able to make proxies out
One of the big benefits of using WCF meta-data generation engine is that you
can get XSD’s out of it too. Other platforms (read Java) tools understand and
prefers XSD's (even though WSDL is the standard, XSD’s are cleaner IMHO). You
can now easily generate them via a WCF service like follows.
- service.svc ?xsd=xsd1
Each of these xsd's has separated out contract, type and
Similarly you'd have WSDL0, WSDL1 and WSDL2 so
Again, the wsdl's
are separated to keep the contract, type and type definition (what is a double
in interop environment) apart and not in giant one big file, which seems to be
much easier but in essence its not.
WCF Interoperability: Flattening your WSDL is an excellent
article by Christian Weyer on increasing the interop bar. It explains the reasoning
behind why a simple basic http binding service based WCF generated WSDL cannot
communicate with its Java counterparts anymore and how to fix this problem.
In the next part I’ll discuss and share some
examples and code samples.