axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Jordahl (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1929) Handling of choice maxOccurs="unbounded" with subcontent
Date Fri, 15 Apr 2005 14:41:17 GMT
     [ http://issues.apache.org/jira/browse/AXIS-1929?page=comments#action_62903 ]
     
Tom Jordahl commented on AXIS-1929:
-----------------------------------

I would expect axis to generate the single "updateOrder" given that the WSDL says there can
either be one ot zero of them.  Zero would mean updateOrder = null and there would be no <UpdateOrder>
element on the wire.

What I would expect is that there should be an array of the choice element, which appears
to be unnamed so Axis isn't going to do much with that.  I am not sure it would, even if it
was named.  Can you post the full complex type defintion (or the full WSDL)?  What code does
Axis generate for the full type definition?

I amnot sure what exactly you want Axis to do.  Emitting arrays for each of the choice elements
is not the right thing, Axis would only do that if maxOccurs="unbounded".



> 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


Mime
View raw message