Handling of choice maxOccurs="unbounded" with subcontent
--------------------------------------------------------

         Key: AXIS-1929
         URL: http://issues.apache.org/jira/browse/AXIS-1929
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC3    
 Environment: Unix/Windows, generating Java from WSDL.
    Reporter: Christian Hirsch


I have a partner with a WS with the following definition, which I personally 
may find somewhat akward.

I am not sure if to tell them to configure their WSDL differently or if Axis 
does not handle this case correctly.

  <s:choice minOccurs="0" maxOccurs="unbounded">
   <s:element minOccurs="0" maxOccurs="1" name="UpdateOrder" .../>
   <s:element minOccurs="0" maxOccurs="1" name="DeleteOrder" .../>
   <s:element minOccurs="0" maxOccurs="1" name="FailedOrder" .../>
  </s:choice>

My problem is that what is generated is:

    private UpdateOrder updateOrder;
    private DeleteOrder deleteOrder;
    private FailedOrder failedOrder;

If I manually change the WSDL to contain:


  <s:choice minOccurs="0" maxOccurs="unbounded">
   <s:element minOccurs="0" maxOccurs="unbounded" name="UpdateOrder" .../>
   <s:element minOccurs="0" maxOccurs="unbounded" name="DeleteOrder" .../>
   <s:element minOccurs="0" maxOccurs="unbounded" name="FailedOrder" .../>
  </s:choice>

Then I get what I need:

    private UpdateOrder[] updateOrder;
    private DeleteOrder[] deleteOrder;
    private FailedOrder[] failedOrder;

Is there an issue in Axis or is this behaviour expected?

------
More from their WSDL:

<s:complexType name="Order">
 <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="Header" type="HeaderType"/>
  <s:choice minOccurs="0" maxOccurs="unbounded">
   <s:element minOccurs="0" maxOccurs="1" name="UpdateOrder" 
type="OrderUpdateOrder"/>
   <s:element minOccurs="0" maxOccurs="1" name="DeleteOrder" 
type="OrderDeleteOrder"/>
   <s:element minOccurs="0" maxOccurs="1" name="FailedOrder" 
type="OrderFailedOrder"/>
  </s:choice>
  <s:element minOccurs="0" maxOccurs="1" name="Summary" type="OrderSummary"/>
 </s:sequence>
</s:complexType>



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to