axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Antonio (JIRA)" <>
Subject [jira] Commented: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.
Date Wed, 11 Apr 2007 10:31:32 GMT


Jose Antonio commented on AXIS2-1885:

I can confirm this bug using Axis2 1.2 RC2.
The code generation fails with xmlbeans but not with adb.

> WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema
is imported from WSDL file and another schema file.
> ------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-1885
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1, nightly
>         Environment: Windows XP, JDK 1.4.  Tested on nightly snapshot of December 18,
>            Reporter: Michael Krumpus
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments:
> WSDL2Java fails with the following error when a schema is imported from a WSDL file and
also imported from another schema:
> ...
> Caused by: org.apache.xmlbeans.XmlException: project://local/../../../entity/message/message.xsd:6:1:
error: sch-props-correct.2: Duplicate global type: MessageContext_Type@
(Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(
> The problem here seems to be that when message.xsd is imported in the WSDL file *and*
imported in another schema that is also imported in the WSDL file, the code generation process
does not realize that they are the same schema, thus leading it to believe that the type MessageContext_Type
is a duplicate global type when it is not.  I will attach an example that demonstrates the
problem clearly.
> This problem does NOT occur when XMLBeans 'scomp' is used as a standalone tool.
> Of particular interest is the behavior of the method baseURLForDoc() in org.apache.xmlbeans.impl.schema.StscImporter.
 When running scomp as a standalone utility, fully qualified absolute paths are passed into
this method, but when using WSDL2Java, relative paths are passed in.

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:
For additional commands, e-mail:

View raw message