axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hirsch (JIRA)" <>
Subject [jira] Created: (AXIS-1929) Handling of choice maxOccurs="unbounded" with subcontent
Date Thu, 14 Apr 2005 22:32:17 GMT
Handling of choice maxOccurs="unbounded" with subcontent

         Key: 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

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" .../>

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" .../>

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: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:element minOccurs="0" maxOccurs="1" name="Summary" type="OrderSummary"/>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message