views:

193

answers:

2

I would like to get some information on list of points that needs to be taken care of while developing Web Services on .NET platform using WCF to make sure it is compatible with majority of the clients out there (Java, .NET etc...).

Earlier I have seen cases where we developed services which was easily consumed by .NET clients , however the moment we tested the service with other platforms, service broke.

I have few points with me as mentioned below:

  1. Always use POCO data types
  2. Stick to BasicHttpBinding unless WSHttpBinding is required

My main concern is about the Data Contract objects that are serialized and sent over the wire.

Thanks in advance.

+3  A: 

Interop with other systems can be a tricky business - WCF is the only platform around that supports a plethora of WS-* standards - most other platforms only support a few of those, so the wsHttpBinding protocol can be "too much" for the other systems at times.

BasicHttpBinding is okay - but it's old, legacy, only for backward compatibility, doesn't offer much in terms of security etc. I would recommend: try to use wsHttpBinding whenever possible, and only fall back to basicHttp if you really must. But always try wsHttp first. It offers just so much more in terms of security and flexibility.

The DataContract is an entirely different matter though - it's really a .NET wrapper over XML schema (XSD files), and this is one of the industry standards that has very broad and very complete support across the board. So the [DataContract] part of WCF doesn't feel like a problem area.

Yours problems will most likely appear in areas such as support for various SOAP versions, different expectations about text encoding, and - of course - security settings. But I can assure you - with WCF, you are in a uniquely great position since WCF can be tweaked to support even the craziest and most exotic web services and web service clients out there!

It might be a bit of work and require a bit of tweaking - but WCF does give you the necessary tools and extension points to do this successfully.

Marc

marc_s
+2  A: 

My suggestion would be to use WS-I Compliance Test once you build you service.

Check: http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools

WS-I stands for Web Services Interoperability, if your services pass almost all the tests you can be 100% sure that they work with various clients.

shivaspk
Thanks for the link. That was an useful information.
Ajay Singh