axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick van Kann" <>
Subject Is there a bug with Axis webservice methods returning arrays?
Date Wed, 30 Mar 2005 12:26:44 GMT
I posted a question yesterday about a problem I had with a webmethod returning an array i.e:
public TestData[] getTestsAsArray()

I thought it was to do with the fact that I was using Castor serializers/deserializers.

However, I have re-tested it with the standard Axis Bean serializers and generated data classes
and get exactly the same error - which I believe is because the soap message returned is not
valid xml (see below).
[java] Exception caught org.xml.sax.SAXParseException: Element type "ns1:te
stData" must be followed by either attribute specifications, ">" or "/>".
[java] AxisFault

So is there a general Axis problem with returning typed arrays in a document/wrapped webservice?
I noticed on this wiki page that such a problem has existed before:

Unfortunately no bugzilla id is mentioned so I can't be sure. I'd really appreciate some insight
as at the moment I am compelled to wrap my arrays in another complex type (i.e. TestDataArrayWrapper)
and return this from the webservice instead. This seems to work but it does seem a little

The SOAP message returned is below.

<?xml version="1.0" encoding="utf-8"?>
	    <name xmlns="">test1</name>

It is the [,unbounded] part that seems to be causing the problem.

Thanks in advance,


View raw message