axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-2598) Adb Codegen does not handle xs:any correctly.
Date Fri, 27 Apr 2007 04:50:15 GMT

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

Amila Chinthaka Suriarachchi resolved AXIS2-2598.
-------------------------------------------------

    Resolution: Fixed

I just had this fix one day ago. So should be available with the 1.2 release

> Adb Codegen  does not handle xs:any correctly.
> ----------------------------------------------
>
>                 Key: AXIS2-2598
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2598
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.2
>         Environment: Java 1.5, Tomcat 5.5,  Axis2 1.2 RC2, Axis2 Eclipse codegen plugin
1.2, Eclipse 3.2, WTP 1.5.1, Windows 2003 server
>            Reporter: Tim Buss
>            Priority: Critical
>
> The code generated from a schema element that has the type xs:any  eg:
> 	<xs:complexType name="DetailExtensionType">
> 		<xs:sequence>
> 			<xs:any maxOccurs="unbounded" namespace="##other"
> 				processContents="lax" />
> 		</xs:sequence>
> 		<xs:anyAttribute />
> 	</xs:complexType>
> gets it wrong and throws an error - generally this one
> "java.lang.Exception: javax.xml.stream.XMLStreamException: End of the document reached"
> The problem appears to be in the parse method of the generated Factory for the object
that contains the xs:any typed element.
> There is a loop that attempts to build an array of OMElements contained by the xs:any
typed element but the loop only looks for 
>      "XMLStreamConstants.END_DOCUMENT"
> when it should look for 
>     "XMLStreamConstants.END_ELEMENT"
> first.  I'm not sure if it really needs to look for XMLStreamConstants.END_DOCUMENT but
its probably a good check.
> I edited the code to include a check for  XMLStreamConstants.END_ELEMENT and a this seems
to fix the problem with xs:any typed elements.
> ....
> //Added code
> 	} else if (javax.xml.stream.XMLStreamConstants.END_ELEMENT == event) {
> 		loopDone1 = true;
> //End Added code
> 	} else if (javax.xml.stream.XMLStreamConstants.END_DOCUMENT == event) {
> 		loopDone1 = true;
> 	} else {
> 		reader.next();
> 	}
> I have a test case I can upload if this is not clear but it will take me some time so
I thought it better to report the bug first

-- 
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