axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yong Liang" <>
Subject ArrayOf_xsd_anyType[] vs anyType[]
Date Mon, 28 Aug 2006 18:45:52 GMT
Just started learning WS and got this problem with java interfaces used
in beans. But before I dig into the details, what is the difference
between ArrayOf_xsd_anyType[] and anyType[] in a SOAP response message?
It seems to be the only difference I can see, but the former is not
working. Here's the details:
I have a service class E where there's a getA() methods that returns an
A object. A has a getter getBees() that returns B[], where B is just an
interface. The actual classes will be put in the array are C and D which
both implement B. The problem I'm having is with this getBees() method
in A. The signature is:
public B[] getBees();
and I have a filed defined as:
B[] bees;
I'm using Axis 1.3. If I run java2wsdl and then wsdl2java to generate
server bindings with --skeletoDeploy set to true, everything works,
except it redefined both bees and getBees() to Object[], so the client
needs to cast which is not that big of a problem. But if I use my own
code for the server side, where all B[] are still intact, I'll get
ArrayStoreException on client side when axis is deserializing. If I
manually change all B[] to Object[], my code would work too with the
same deployment descriptor. Using TCP monitor I noticed the only
difference in the server response soap messages is that for field bees,
one is returning ArrayOf_xsd_anyType[], and the other is anyType[], and
only anyType[] would work on client.
Any idea what I'm doing wrong? I'd really like to be able to use my
original code without having to change them to all Object[].

View raw message