[ http://issues.apache.org/jira/browse/AXIS2-543?page=comments#action_12375326 ]
Ajith Harshana Ranabahu commented on AXIS2-543: ----------------------------------------------- The first problem is solved (a silly mistake!) > ADB Code generated does not compile > ----------------------------------- > > Key: AXIS2-543 > URL: http://issues.apache.org/jira/browse/AXIS2-543 > Project: Apache Axis 2.0 (Axis2) > Type: Bug > Components: databinding > Versions: 0.95 > Reporter: Arnaud Blandin > Assignee: Ajith Harshana Ranabahu > Attachments: email.wsdl > > Here is the email sent to AXIS-2 user mailing list. > 2 bugs might actually derive from the report. The WSDL used will be attached > to that bug. > > Hi, > > > > I am trying to use ADB in order to reduce the footprint of the > > generated code in AXIS2 and I am facing a problem with cardinalities: > > Roughly speaking, my WSDL defines a schema structure like: > > > > <xsd:element name="A" type="xsd:string" minOccurs="1" > > maxOccurs="unbounded"/> > > <xsd:element name="B" type="xsd:string" minOccurs="0" > > maxOccurs="unbounded"/> > > <xsd:element name="C" type="xsd:string" minOccurs="0" > > maxOccurs="unbounded"/> > > > > The first problem (minor) comes from the generated code that doesn't > > compile: > > > > java.lang.String[] textArray = stateMachine1.getTextArray(); > > object.setTo((java.lang.String[]) > > > > org.apache.axis2.databinding.utils.ConverterUtil.convertToArray( > > java.lang.String.class,stateMachine1.getTextArray())); > > // Move to a start element > > event = reader.getEventType(); > > while (event!= javax.xml.stream.XMLStreamReader.START_ELEMENT) { > > event = reader.next(); > > } > > > > org.apache.axis2.databinding.utils.SimpleArrayReaderStateMachine > > stateMachine2 = new > > org.apache.axis2.databinding.utils.SimpleArrayReaderStateMachine(); > > stateMachine2.setElementNameToTest(new > > javax.xml.namespace.QName("http://www.example.com","B")); > > stateMachine2.read(reader); > > java.lang.String[] textArray = stateMachine2.getTextArray(); > > > > ---> textArray is declared a second time and it is not used in the > > class. > > > > My second problem lies when I want to process like: > > <A>foo</A> > > <C>bar</C> > > <C>bar</C> > > > > The engine sends an IllegalState as it somehow assumes that a B will > > be there. > > -- 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
