views:

243

answers:

1

I have an AXIS2/JAX-WS web service using a code first implementation (yes I know, that is bad). The web service is being consumed by a .NET based client.

Before we had Axis1, and when custom objects were passed between the client and the server, the client and the server code had to do their own serialization and de-serialization.

When we converted to Axis2, we removed the custom serialization and converted all objects to the regular bean format.

Now here comes the problem, the original way that objects were sent was through polymorphic calls, but there appears to be a problem with the way that Axis2/JAX-WS and .NET handle serialization. I believe that .NET uses the xsi:type attribute when declaring the element and the java side changes the element type. Is there a way to make polymorphic calls to web services using a .NET client and a Java based webservice?

Thanks.

+2  A: 

Found out the problem. The java classes needed to have their namespaces defined with the @XmlType annotation. Now the objects are getting serlialized and deserialized correctly.

bogertron