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 John Green <jg...@yahoo.com> on 2005/04/27 20:47:34 UTC
Axis 1.1 Array Problems
All,
I am seeing lots of posts about problems with arrays.
Not sure what the solution is, the problem I am seeing
is that an array is being populated with many elements
on the server-side, but on the client I am only
getting the last element in the array. I have tried
several things from changing the style and use in the
ant task, to wrapping the array in a class. Here is
what is generated in the WDSL for the class that
contains the array.
<complexType name="ProviderArray">
<sequence>
<element name="providerArray" nillable="true"
type="impl:ArrayOf_tns1_Provider"/>
</sequence>
</complexType>
<complexType name="GetProvidersResponse">
<complexContent>
<extension base="tns1:ResponseMessage">
<sequence>
<element name="providers" nillable="true"
type="tns1:ProviderArray"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="ArrayOf_tns1_Provider">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:Provider[]"/>
</restriction>
</complexContent>
</complexType>
Can anyone give me some new suggestions to try? Is
this a bug with the ant task? Here is the ant task I
have setup:
<axis-java2wsdl
classname="net.ussouth.incomm.postpay.webService.WebServiceFacadeEndpoint"
namespace="http://net.ussouth.incomm.postpay.webService/"
location="http://localhost:8080/ws4ee/services/WebServiceFacadeService"
serviceElementName="WebServiceFacade"
servicePortName="WebServiceFacadeEndpoint"
style="rpc"
use="literal"
output="${rsrc.home}/wsdl/WebServiceFacade.wsdl">
<classpath refid="classpath" />
</axis-java2wsdl>
Thanks,
John Green
Re: Axis 1.1 Array Problems
Posted by Anne Thomas Manes <at...@gmail.com>.
Don't try to use rpc/literal with Axis 1.1.
You have three choices:
- use rpc/encoded
- use document/literal (I suggest "wrapped" style)
- upgrade to Axis 1.2
Anne
On 4/27/05, John Green <jg...@yahoo.com> wrote:
> All,
>
> I am seeing lots of posts about problems with arrays.
> Not sure what the solution is, the problem I am seeing
> is that an array is being populated with many elements
> on the server-side, but on the client I am only
> getting the last element in the array. I have tried
> several things from changing the style and use in the
> ant task, to wrapping the array in a class. Here is
> what is generated in the WDSL for the class that
> contains the array.
> <complexType name="ProviderArray">
> <sequence>
> <element name="providerArray" nillable="true"
> type="impl:ArrayOf_tns1_Provider"/>
> </sequence>
> </complexType>
> <complexType name="GetProvidersResponse">
> <complexContent>
> <extension base="tns1:ResponseMessage">
> <sequence>
> <element name="providers" nillable="true"
> type="tns1:ProviderArray"/>
> </sequence>
> </extension>
> </complexContent>
> </complexType>
> <complexType name="ArrayOf_tns1_Provider">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns1:Provider[]"/>
> </restriction>
> </complexContent>
> </complexType>
>
> Can anyone give me some new suggestions to try? Is
> this a bug with the ant task? Here is the ant task I
> have setup:
> <axis-java2wsdl
> classname="net.ussouth.incomm.postpay.webService.WebServiceFacadeEndpoint"
> namespace="http://net.ussouth.incomm.postpay.webService/"
> location="http://localhost:8080/ws4ee/services/WebServiceFacadeService"
> serviceElementName="WebServiceFacade"
> servicePortName="WebServiceFacadeEndpoint"
> style="rpc"
> use="literal"
> output="${rsrc.home}/wsdl/WebServiceFacade.wsdl">
> <classpath refid="classpath" />
> </axis-java2wsdl>
>
> Thanks,
>
> John Green
>
>