axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raanan Zvi (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4125) Empty array causes the following array to be empty and the first one to have the next array values.
Date Sun, 09 Nov 2008 13:46:44 GMT
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message