both are possible
ensure that your deployment descriptor contains a definition of only the
basic object (ie. do not attempt to declare an array)
the (de)serializer will work out how to do its work for any method that
requires or returns an array of such objects
as an example, the following excerpt from a deployment descriptor 'declares'
an object called Address
Once this is declared any method can then receive or return an Address or an
array of Address

<isd:map
  encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:x="urn:xml-soap-address-demo"
  qname="x:address"
  javaType="samples.addressbook.Address"
  java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
  xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer" />

good luck

regards,
Nicholas Quaine

Visit http://www.soapuser.com/

[EMAIL PROTECTED]


----- Original Message -----
From: "Milburn, Christopher FIL" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 10:14 AM
Subject: returning Object vs Object[]


> Why can I return an 'Object' array from my soap server but not an 'Object'
> ie
> This works ok...
>
> public Object[] processCommand( String[] soapParams )
> {
> ...
>
>     Object[] obj = {(Object)"Fred Bloggs", (Object)"Jim Smith"};
>
>     return( obj );
> }
>
> but not this....
>
> public Object processCommand( String[] soapParams)
> {
> ...
>
>     Object obj = (Object)"Fred Bloggs";
>
>     return( obj );
> }
>
>
> It seems bizarre, Is this right ?
>
> Thanks,
>
> Chris Milburn
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>

Reply via email to