You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Arnaud Blandin (JIRA)" <ji...@apache.org> on 2006/04/02 23:05:43 UTC
[jira] Created: (AXIS2-543) ADB Code generated does not compile
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
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
[jira] Assigned: (AXIS2-543) ADB Code generated does not compile
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-543?page=all ]
Deepal Jayasinghe reassigned AXIS2-543:
---------------------------------------
Assign To: Ajith Harshana Ranabahu
too many bugs for you
> 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
[jira] Updated: (AXIS2-543) ADB Code generated does not compile
Posted by "Arnaud Blandin (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-543?page=all ]
Arnaud Blandin updated AXIS2-543:
---------------------------------
Attachment: email.wsdl
The WSDL used to demonstrate the problem.
> 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
> 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
[jira] Resolved: (AXIS2-543) ADB Code generated does not compile
Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-543?page=all ]
Ajith Harshana Ranabahu resolved AXIS2-543:
-------------------------------------------
Resolution: Fixed
This works fine in the generated code. The compiler error is fixed and a test case is added to the ADB test suite to test the behavior of minoccurs=0 case
> 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
[jira] Commented: (AXIS2-543) ADB Code generated does not compile
Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
[ 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