You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rob Beers <ro...@mgwnet.com> on 2003/02/24 19:43:15 UTC
arrays of beans, c# client, and null problem
I realize I can't return an empty array of beans back to a c# client so I am
trying to return null when the array is empty.
When I return null the c# client gives me this error:
Cannot find type for http://www.w3.org/2002/12/soap-encoding:Array
tcpmon output
<getProvidersReturn xsi:type="ns2:Array" xsi:nil="true"
xmlns:ns2="http://www.w3.org/2002/12/soap-encoding"/>
When I return items in the array everything works
tcpmon output
<getProvidersReturn xsi:type="soapenc:Array"
soapenc:arrayType="ns3:ProviderValue[2]"
xmlns:ns2="http://www.w3.org/2002/12/soap-encoding"
xmlns:ns3="urn:RmsService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item href="#id0"/>
<item href="#id1"/>
</getProvidersReturn>
I think the problems is ns2:Array instead of soapenc:Array. How can I get
soapenc:Array when I return null? Or is there a better solution?
Rob
Re: arrays of beans, c# client, and null problem
Posted by James Black <jb...@ieee.org>.
Rob Beers wrote:
> I realize I can't return an empty array of beans back to a c# client so I am
> trying to return null when the array is empty.
try to make a bean that signifies empty, with a array of one element, or throw
an exception in this case.