WSDL2Java creates invalid databinding code for choice elements with 
maxOccurs="unbounded"
-----------------------------------------------------------------------------------------

                 Key: AXIS2-998
                 URL: http://issues.apache.org/jira/browse/AXIS2-998
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding, Tools, wsdl
    Affects Versions: 1.0
         Environment: Windows XP
            Reporter: Barney Wrightson
         Attachments: testChoice.wsdl

When generating code from a wsdl file that uses a choice element with 
maxOccurs="unbounded" the resulting code appears to have ignored the maxOccurs 
specification. I am using the xmlbeans method, and if i try to validate xml 
based on the wsdl schema it oly accepts it if there is only one of the choice 
elements used.

eg. for the attached example wsdl, if i send a call NewOperation with something 
like the the following as input, validation fails on the <intChoice>:

<NewOperationRequest >
  <stringChoice>string</stringChoice>
  <intChoice>1</intChoice>
</NewOperationRequest >

In the generated code the NewOperationRequestDocument returns a single 
MultipleChoice object in the getNewOperationRequest method, and MultpleChoice 
has all possible options in it but there are no arrays anywhere in there either.

I have tried to work around this issue in the shema definition, but apart from 
adding superfluous elements, which changes the structure of the xml, nothing 
works. eg. Putting the choice element as maxOccurs="1" inside a sequence with 
maxOccurs="unbounded" yeilds identical results.

According to this email to the axis-user list, the required functionality was 
present at version 0.94 or so and has been subsequently left out:

http://mail-archives.apache.org/mod_mbox/ws-axis-user/200604.mbox/[EMAIL 
PROTECTED]


-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to