Marc-

you'll need to associate the ArrayList java type to SOAP_ARRAY via
call.registerTypeMapping(ArrayList.class, XMLType.SOAP_ARRAY, new 
ArraySerializerFactory(), new ArrayDeserializerFactory());<BR>

then the call with a cast to ArrayList should work..<BR>
ArrayList results =  (ArrayList)call.invoke(...);<BR>

BTW: the version of your axis implementation is REALLY outdated you might want 
to think about updating to Axis 2..<BR>

HTH<BR>
Martin<BR> 
NB: be sure to do the registerTypeMapping for all the params as well..<BR>
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


Subject: Array question
Date: Mon, 8 Sep 2008 15:22:17 -0500
From: [EMAIL PROTECTED]
To: [email protected]
















Hi there.

 

I was wondering if someone could provide me with an example
of (or point me in the direction of) a java client which calls a web service 
that
returns an array of a bean.

I’m using Axis 1.4 dated April 22, 2006 and have already
researched this question only to find the majority of the responses were related
to earlier releases.

 

The relevant portion of my client code is:          


 

call.setOperationName( "getSites" );

call.setReturnType( XMLType.SOAP_ARRAY );

call.addParameter("tokenId", org.apache.axis.Constants.XSD_INT, 
javax.xml.rpc.ParameterMode.IN);

call.addParameter("username", org.apache.axis.Constants.XSD_STRING, 
javax.xml.rpc.ParameterMode.IN);

Object[] obj =
(Object[]) call.invoke( new Object[] { tokenId, "test" } );

 

I’m
receiving the following exception:

org.xml.sax.SAXException: No deserializer for {urn:DemandResponse}SiteDTO

 

I’m sure I’m missing something in the client but
I don’t know/understand what it is.

I wrote the original interface and implementation and then
used Java2Wsdl and Wsdl2Java to generate the wsdl, server side code and wsdd.

 

Thanks,

Marc







_________________________________________________________________
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

Reply via email to