axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: SOAP parsing issues
Date Sun, 16 Nov 2008 16:31:28 GMT
I think this is a known issue of POJO. Please log a jira.

On 11/16/08, Zvi, Raanan <raanan.zvi@intel.com> wrote:
> I'm using POJO (I write a simple java file without extending anything and
> extract it to aar file).
> I know that the second request doesn't fit the wsdl but it only doesn't fit
> because of the order. The first request is the main issue here. The issue is
> that even if I change the name of the XML element bug keep the order and
> type the SOAP request will be ok. This causes problems when dealing with
> arrays.
> I have a method that gets two arrays of integers. If I send the first array
> as empty and the second full with two elements, the code will receive the
> first array with two elements and the second array empty. This is because
> the SOAP decoder ignores the names of the arguments.
>
> From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> Sent: Sunday, November 16, 2008 16:13
> To: axis-user@ws.apache.org
> Subject: Re: SOAP parsing issues
>
>
> On Tue, Nov 11, 2008 at 12:28 PM, Zvi, Raanan
> <raanan.zvi@intel.com<mailto:raanan.zvi@intel.com>> wrote:
>
> Hello,
>
>
>
> I'm writing a web service server which uses axis2 1.4.1 and tomcat 6 and I
> noticed some disturbing issues in the way axis2 parse the SOAP xml.
>
> For some reason axis2 SOAP parser ignores the names of the XML elements and
> decides the values of the arguments according to their order in the XML.
>
>
>
> I have this simple method:
>
>
>
> - <xs:element name="enumerateEntities">
>
> - <xs:complexType>
>
> - <xs:sequence>
>
>   <xs:element minOccurs="0" name="entityId" type="xs:int" />
>
>   <xs:element minOccurs="0" name="entityType" nillable="true"
> type="xs:string" />
>
>   </xs:sequence>
>
>   </xs:complexType>
>
>   </xs:element>
>
>
>
> I can even send this XML and it will work:
>
>
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsdl="http://wsdl.intf.dcm.intel.com">
>
>    <soap:Header/>
>
>    <soap:Body>
>
>       <wsdl:enumerateEntities>
>
>          <wsdl:XXX>-1</wsdl:XXX>
>
>          <wsdl:entityType>NODE</wsdl:entityType>
>
>       </wsdl:enumerateEntities>
>
>    </soap:Body>
>
> </soap:Envelope>
>
>
>
> If I send this:
>
>
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsdl="http://wsdl.intf.dcm.intel.com">
>
>    <soap:Header/>
>
>    <soap:Body>
>
>       <wsdl:enumerateEntities>
>
>          <wsdl:entityType>NODE</wsdl:entityType>
>
>          <wsdl: entityId >-1</wsdl: entityId >
>
>       </wsdl:enumerateEntities>
>
>    </soap:Body>
>
> </soap:Envelope>
>
>
>
> Then axis2 tries to put the string "NODE" into the integer argument
> entityId.
>
>
>
> This issue causes a lot of very strange behaviors like if I have a method
> which gets two arrays, and I send an empty array as the first argument and a
> full array as the second argument, then in code I get the value of the
> second array as the first argument and the second argument is empty.
>
>
>
> Is there any fix for this?
>
> Are you using a POJO? Anyway it seems that your second request does not
> match the Schema given above.
>
> thanks,
> Amila.
>
>
>
> Raanan.
>
> ---------------------------------------------------------------------
>
> Intel Israel (74) Limited
>
>
>
> This e-mail and any attachments may contain confidential material for
>
> the sole use of the intended recipient(s). Any review or distribution
>
> by others is strictly prohibited. If you are not the intended
>
> recipient, please contact the sender and delete all copies.
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message