Title: Message

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="http://www.w3.org/2001/XMLSchema" soapAction="" >

        <parameter qname="pns:in0" xmlns:pns="urn:ifws" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

        <parameter qname="pns:in1" xmlns:pns="urn:ifws" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

        <parameter qname="pns:in2" xmlns:pns="urn:ifws" type="tns:long" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      </operation>

 

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, "getWorkItemChoices"));

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?

 

Thanks,

Sameer

Reply via email to