WCF - ASMX Interoperability – Best Practices – Part I#
These are probably few of the most popular questions on the forums and in the WCF sessions.

  • How 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).
  • I’m 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 wrong?
  • What binding should I use which works best for interop?
  • Dude, where are my types? 

etc...

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 blog posts.

The WSDL 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 of it.

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=xsd0
  • service.svc ?xsd=xsd1
  • service.svc?xsd=xsd2

Each of these xsd's has separated out contract, type and type definition.

Similarly you'd have WSDL0, WSDL1 and WSDL2 so

  • service.svc?wsdl=wsdl0
  • service.svc?wsdl=wsdl1
  • service.svc?wsdl=wsdl2

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.
Improving 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.





10/8/2007 7:22:34 AM (Pacific Standard Time, UTC-08:00) #    Comments [4]  |  Trackback

 

10/16/2007 9:45:03 PM (Pacific Standard Time, UTC-08:00)
Very good article. I think it points out a big weakness in WCF in terms of interoperability. Packaging the WSDL into separate files just won't work with many clients. I wasn't entirely happy with the solution on Christian Weyer's page either although it is one way to solve the problem. Ideally one should be able to specify the flat WSDL just through configuration.

It seems like a step back from asmx in terms in inter-operability. At the end of the day, I think plain old xml and schemas is probably the best answer for true interoperability.
5/18/2008 5:27:52 AM (Pacific Standard Time, UTC-08:00)
Cheap overnight wellbutrin
5/18/2008 5:34:29 AM (Pacific Standard Time, UTC-08:00)
Brand butalbital on line
5/18/2008 5:38:23 AM (Pacific Standard Time, UTC-08:00)
brand prozac money order
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

All content © 2008, Adnan Masood
About the Author
On this page
Calendar
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Sitemap
Blogroll OPML
microsoft
Blogroll
Disclaimer

Powered by: newtelligence dasBlog 1.8.5223.2

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts