Returning Array of strings in SOAP

J

jaja

Hello all.
I wrote a web service which should return a array of string wrapped
in a simple class.

public class Result {
public String[] m_al;

public ListResult() {
}
}

The service itself works fine, but when it returns the result object
to the test class I get:

org.xml.sax.SAXException: No object was found for class type class
[Ljava.lang.String;
at
org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:
97)
at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:
249)
at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:
509)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:
1087)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
171)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:
236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2448)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)


The array is defined in the wsdl file as:

<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>

with all the required definitions in wsdl.

Can someone help please?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top