[ https://issues.apache.org/jira/browse/AXIS2-4125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646277#action_12646277 ]
Raanan Zvi commented on AXIS2-4125: ----------------------------------- Another issue that I noticed is even more disturbing. 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> This means that axis2 only looks at the order of the parameters and not their name. It is very very very disturbing. If I switch the order of the parameters in the XML the operation fails. This is also (I think) should not happen. In XML there is no importance for the order!!! > Empty array causes the following array to be empty and the first one to have > the next array values. > --------------------------------------------------------------------------------------------------- > > Key: AXIS2-4125 > URL: https://issues.apache.org/jira/browse/AXIS2-4125 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Affects Versions: 1.4.1 > Environment: Windows XP, tomcat 6 > Reporter: Raanan Zvi > > We are using axis2 for java web service using tomcat. > We have this method in the web service: > - <xs:element name="setPolicy"> > - <xs:complexType> > - <xs:sequence> > <xs:element minOccurs="0" name="entityId" type="xs:int" /> > <xs:element minOccurs="0" name="policyType" nillable="true" > type="xs:string" /> > <xs:element minOccurs="0" name="threshold" type="xs:int" /> > <xs:element minOccurs="0" name="policyDescription" nillable="true" > type="xs:string" /> > <xs:element minOccurs="0" name="enabled" type="xs:boolean" /> > <xs:element maxOccurs="unbounded" minOccurs="0" name="lowPriorityList" > type="xs:int" /> > <xs:element maxOccurs="unbounded" minOccurs="0" name="highPriorityList" > type="xs:int" /> > </xs:sequence> > </xs:complexType> > </xs:element> > You can see that the last two arguments are arrays of int which can be empty. > When I send this request: > <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:setPolicy> > <!--Optional:--> > <wsdl:entityId>1</wsdl:entityId> > <!--Optional:--> > <wsdl:policyType>CUSTOM_PWR_LIMIT</wsdl:policyType> > <!--Optional:--> > <wsdl:threshold>839</wsdl:threshold> > <!--Optional:--> > <wsdl:policyDescription>blabla1</wsdl:policyDescription> > <!--Optional:--> > <wsdl:enabled>False</wsdl:enabled> > <wsdl:highPriorityList>2</wsdl:highPriorityList> > <wsdl:highPriorityList>3</wsdl:highPriorityList> > </wsdl:setPolicy> > </soap:Body> > </soap:Envelope> > The java code gets an empty highPriorityList array and the > lowPriorityList=[2,3]. > If I add <wsdl:lowPriorityList nil="true"></wsdl:lowPriorityList> before the > highPriorityList I get the arguments correctly. > If I add <wsdl:lowPriorityList nil="true"></wsdl:lowPriorityList> after the > highPriorityList I get wrong arguments. > It seems that for some reason axis2 ignores the names of the arrays and just > uses the order of the arrays. > When it comes to arrays there is a different between a null array and an > empty one so even the initial request should work correctly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]