Richard,

Axis does not support the maxOccurs attribute on the sequence|choice|all
elements.

Therefore there is currently no way to pass the following over the wire
using the
current version of Axis.

<Add> ... </Add>
<Remove> ... </Remove>
<Add> ... </Add>
<Remove> ... </Remove>

Implementing such behavior requires:
  - choice|sequence|group nesting processing in tools and runtime.
  - adding new symbol table information
  - adding new meta data information.
  - changes to the deserializer to keep track of indices of multi-leaved
elements.

So I don't anticipate this changing unless there are an abundance of
request, or
some contributed patches.

We have been talking about using an independent schema model in the Axis
chat.  More requests
such as this one indicate the need for such a more all-inclusive model.

Thanks for the note.

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                       
                                     
                      Richard Emberson                                                 
                                     
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]       
                                     
                      >                        cc:                                     
                                     
                      Sent by:                 Subject:  wsdl2java: (Add | Remove)+    
                                     
                      [EMAIL PROTECTED]                                                 
                                     
                                                                                       
                                     
                                                                                       
                                     
                      04/29/2002 11:25                                                 
                                     
                      AM                                                               
                                     
                      Please respond to                                                
                                     
                      axis-dev                                                         
                                     
                                                                                       
                                     
                                                                                       
                                     



I have an XMLSchema grammar which has the following construct:

 (Add | Remove)+

meaning that the Add and Remove can appear in any order and in any
number as
long as at least one does appear. In XMLSchema this can be represented
as:

<xsd:sequence maxOccurs="unbounded">
<xsd:choice>
<xsd:element name="add" type="xx:Add"/>
<xsd:element name="remove" type="xx:Remove"/>
</xsd:choice>
</xsd:sequence>

or as:

<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="add" type="xx:Add"/>
<xsd:element name="remove" type="xx:Remove"/>
</xsd:choice>
</xsd:sequence>

(one can also add maxOccurs="unbounded" to the Add and Remove elements)

wsdl2java seems to simply ignore the maxOccurs attribute in the sequence
or choice element.
Is this known that this does not work?

If I use the construct:


<xsd:sequence>
<xsd:choice>
<xsd:element name="add" type="xx:Add" maxOccurs="unbounded"/>
<xsd:element name="remove" type="xx:Remove" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>

Then the Java code assumes that I want arrays of Add's and Remove's -
which I assume that I can
not have an instance grammar where the Add and Removes, for example,
alternate their appearence:

<Add> ... </Add>
<Remove> ... </Remove>
<Add> ... </Add>
<Remove> ... </Remove>


How do I implement my (Add | Remove)+ grammar element so that wsdl2java
will
recognize it?

Thanks

Richard




Reply via email to