axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Pradhan <>
Subject String[] return type and ArrayList
Date Wed, 06 Jul 2005 00:17:23 GMT
Hi everyone,


I am SURE this question must have been asked before, but I didn't find it in
the recent archives.


I have a wrapped service which returns String[].


The WSDD entry for that is

      <operation name="getWorkItemChoices" qname="operNS:getWorkItemChoices"
xmlns:operNS="urn:ifws" returnQName="retNS:getWorkItemChoicesReturn"
xmlns:retNS="urn:ifws" returnType="rtns:string"
xmlns:rtns="" soapAction="" >

        <parameter qname="pns:in0" xmlns:pns="urn:ifws" type="tns:string"

        <parameter qname="pns:in1" xmlns:pns="urn:ifws" type="tns:string"

        <parameter qname="pns:in2" xmlns:pns="urn:ifws" type="tns:long"



The client code is:

Service srv = new
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl", new
QName(ns, "IFService"));

Call call = (Call)srv.createCall(new QName(ns, "IFPort"), new QName(ns,

Object result = call.invoke( new Object[] { u, p, new Long(id)} );


I found that when the service returns an array of ONE element, the "result"
is a String object.

But when the service returns an array of two or more elements, the "result"
is an ArrayList of Strings.


Question 1: Is this normal AXIS behaviour? 

Question 2: I would like it to return the same type of Object (an ArrayList)
whether the service is returning 0, 1, or more elements. How can I do that?




View raw message