axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Ludwig (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-3401) choice of sequence of union causes infinite loop in generated ADB binding
Date Wed, 12 Dec 2007 11:20:43 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christoph Ludwig updated AXIS2-3401:
------------------------------------

    Attachment: axis2test.wsdl

WSDL file that triggers the described bug.

> choice of sequence of union causes infinite loop in generated ADB binding
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-3401
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3401
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb, wsdl
>    Affects Versions: 1.3
>         Environment: Eclipse (Europa) with Axis2 Code generated by the Code Generator
Wizard
>            Reporter: Christoph Ludwig
>         Attachments: axis2test.wsdl
>
>
> We have a WSDL file that contains a schema similar to the following snippet:
> 			<xsd:complexType name="dateType">
> 				<xsd:choice>
> 					<xsd:sequence>
> 						<xsd:element name="notBefore"
> 							type="tns:DateOrDateTime" minOccurs="1" maxOccurs="1">
> 						</xsd:element>
> 						<xsd:element name="notAfter"
> 							type="tns:DateOrDateTime" minOccurs="0" maxOccurs="1">
> 						</xsd:element>
> 					</xsd:sequence>
> 					<xsd:element name="notAfter"
> 						type="tns:DateOrDateTime" minOccurs="1" maxOccurs="1">
> 					</xsd:element>
> 				</xsd:choice>
> 			</xsd:complexType>
> 			<xsd:simpleType name="DateOrDateTime">
> 				<xsd:union memberTypes="xsd:dateTime xsd:date"></xsd:union>
> 			</xsd:simpleType>
> The intention is that an element of type DateType has two optional elements notBefore
and notAfter, but at least one of these elements has to be there.
> However, the generated DateType.parse(javax.xml.stream.XMLStreamReader reader) enters
an infinite loop when both elements are provided. The problem is that it correctly evaluates
the type attribute in the notBefore element in DateTypeSequence_type0.parse(javax.xml.stream.XMLStreamReader
reader), but fails to find the Java class this type is bound to.
> The generated code exhibits another problem as well, I think: When parsing an element
of Type DateOrDateTime, it expects a type attribut. But if there is no type attribute, then
it should try the various union types in the order of their declaration, cf. section 2.5.1.3
of <URL:http://www.w3.org/TR/xmlschema-2/#atomic-vs-list>. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message