Web Service interoperability: .net server and Axis 1.x client

Leave a comment

January 30, 2011 by huionn

I thought web service is supposed to be easily interoperable between . net and Java. But I guess my assumption is wrong, at least for optional elements and array type parameter.

I encountered a problem when I first tried with Oracle JDeveloper web service client.

Then I tried with Apache Axis 1.4. It works by default. However the default generated skeleton does not handle optional elements properly:

<s:element minOccurs=”0” maxOccurs=”1” name=”SearchResult” type=”tns:ArrayOfDataResult” />

So, I have to use –noWrapped http://axis.apache.org/axis/java/reference.html. Unfortunately, it has a negative side effect – now the SOAP request failed with .net web service server. I am not sure which party is at fault.

By using Membrane SOAP Monitor (a handy SOAP troubleshooting tool), I found that the new SOAP request did not have xsi:type=”xsd:string” in request parameters.

After some debugging with the Axis source, the solution is easy – modifying _call.setProperty(“sendXsiTypes”, Boolean.FALSEBoolean.TRUE); in the generated web service interface.

I would say that the open source make the troubleshooting much simpler.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: