Returning Array of strings in SOAP

Discussion in 'Java' started by jaja, Feb 20, 2008.

  1. jaja

    jaja Guest

    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.
    jaja, Feb 20, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    501
  2. shyam

    function returning array of strings

    shyam, Nov 28, 2005, in forum: C Programming
    Replies:
    6
    Views:
    300
    Serg1976
    Nov 26, 2007
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    735
    Malcolm
    Jun 24, 2006
  4. Steve Kuhn
    Replies:
    2
    Views:
    348
    majiofpersia
    Jul 29, 2003
  5. John Harkin

    Returning array Via soap toolkit to vb.net client

    John Harkin, Apr 14, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    162
    John Harkin
    Apr 14, 2004
Loading...

Share This Page