As we know Web Services are about interoperability.
Let’s prove it I thought and tried to figure out how far we can get when we try to write interoperable Web Services.
On the .NET side I used WSE2.0. On the J2EE it’s a little bit more complicated.
You have to choose amongst Axis, IBM WSDK, Sun’s JWSDP,BEA WLS, Glue, etc. etc.
Although I know that it’s not the most powerful SDK, I chose Sun’s JWSDP1.2 because it is what we will see in all the other products earlier or later.
In general interop works if you follow some best practices.
Here are my first insights:
1. Document/Literal with SoapAction routing does not work for cross plattform interoperability.
In the first attempt we used VS.NET to generate the WSDL contract. It produced a document/literal style.
The document contained the soapaction attribute in the soapbinding:operation element. The JWSDP didn’t recognise this attribute to generate client proxies.
Therefore the service was called with the http soapaction-header of “”. This caused the service to raise an error.
When we used JWSDP to generate the WSDL it produced an RPC/encoded version. Using this as a basis for the service generation worked for both platforms.
But using RPC/encoded is not recommended due to the fact that document/literal will be the standard of the future because of it’s selfdecribing nature.
2. SOAP attachments
JWSDP dows not support DIME for SOAP attachments. The application/dime mime type is missing from the HTTP accept-header when sending a request.
On the other hand WSE does not support MIME attachments. Axis supports DIME. Therefore it’s not possible to write interoperable Web Services with DIME or MIME attachments. In order to be interoperable avoid attachments until a standard has been established.
DIME support in WSE is pretty good.
It’s not possible to write an J2EE service with attachments (MIME) with the help of JAX-RPC. One has to use a the lower level API SAAJ and create a servlet to process the message on the HTTP level.
3. JWSDP does not support WS-Security. Only HTTP based Authentication is possible.
Conclusion:
WSE2.0 supports a lot of features and opportunities but for interoperability you need two parties. The most important aspect of Web Services is that you can connect different platforms in a secure and reliable way. My impression is to make this reality there is still a long way to go. Let’s see…