axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Gourley (JIRA)" <>
Subject [jira] [Created] (AXIS2-5465) ADB parse issue when maxOccurs > 0, element contains an anyType sub-element, and one is nil.
Date Thu, 06 Dec 2012 21:13:09 GMT
Aaron Gourley created AXIS2-5465:

             Summary: ADB parse issue when maxOccurs > 0, element contains an anyType sub-element,
and one is nil.
                 Key: AXIS2-5465
             Project: Axis2
          Issue Type: Bug
          Components: adb, codegen
    Affects Versions: 1.5.6, 1.5.4
         Environment: Windows
            Reporter: Aaron Gourley

ADB fails to parse subsequent elements in a list when one is encountered containing anyType
element with nil value.

Here is my schema example:

    <xs:element name="GenericParameter" type="dtns:GenericParameter" />
    <xs:complexType name="GenericParameter">
            <xs:element name="name" type="xs:string" />
            <xs:element name="value" nillable="true" type="xs:anyType" />

Here is how it's referenced:

    <xs:element name="getSubscriptionProfile" type="tns:getSubscriptionProfile" />
    <xs:complexType name="getSubscriptionProfile">
            <xs:element name="subscriptionRef" type="xs:string" />
            <xs:element name="parameters" nillable="true" minOccurs="0" maxOccurs="unbounded"
type="dtns:GenericParameter" />                    

Here is an offending message:

            <value xsi:type="xsd:long">-1</value>
            <value xsi:type="xsd:long">-1</value>
            <value xsi:type="xsd:string" xsi:nil="true" />
            <value xsi:type="xsd:string">Hello</value>
            <value xsi:type="xsd:decimal">10</value>
            <value xsi:type="xsd:decimal">20</value>

Here is a code snippet I ran to verify:

    reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(request));
    reqObject = GetSubscriptionProfile.Factory.parse(reader);
    for (Object param : reqObject.getParameters())
        out.println(param.getName() + " = " + param.getValue());

And here is the output from that script:

    A = -1
    B = -1
    C = null

Note that "E = 10" and "F = 20" are missing from the output.  The parsed parameter list is
missing all elements after the null one.

I verified the issue against both 1.5.4 and 1.5.6.  Did not try with 1.6.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message