Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Returning Array of strings in SOAP

Reply
Thread Tools

Returning Array of strings in SOAP

 
 
jaja
Guest
Posts: n/a
 
      02-20-2008
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(Con structorTarget.java:
97)
at
org.apache.axis.encoding.DeserializerImpl.valueCom plete(DeserializerImpl.java:
249)
at
org.apache.axis.encoding.DeserializerImpl.endEleme nt(DeserializerImpl.java:
509)
at
org.apache.axis.encoding.DeserializationContext.en dElement(DeserializationContext.java:
1087)
at
org.apache.axis.message.SAX2EventRecorder.replay(S AX2EventRecorder.java:
171)
at
org.apache.axis.message.MessageElement.publishToHa ndler(MessageElement.java:
1141)
at org.apache.axis.message.RPCElement.deserialize(RPC Element.java:
236)
at org.apache.axis.message.RPCElement.getParams(RPCEl ement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:244
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
function returning array of strings shyam C Programming 6 11-26-2007 12:22 PM
Strings, Strings and Damned Strings Ben C Programming 14 06-24-2006 05:09 AM
Returning an array of strings in C karthika.28@gmail.com C Programming 6 11-13-2005 03:42 AM
Returning array Via soap toolkit to vb.net client John Harkin ASP .Net Web Services 0 04-14-2004 01:55 PM
Returning array from Asp.Net webservice via SOAP to classic Asp Steve Kuhn ASP .Net Web Services 2 07-29-2003 07:52 PM



Advertisments