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 "Michael Krumpus (JIRA)" <ji...@apache.org> on 2006/12/18 22:41:21 UTC

[jira] Created: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.

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: http://issues.apache.org/jira/browse/AXIS2-1885
             Project: Apache 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, 2006.
            Reporter: Michael Krumpus
            Priority: Critical


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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)


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

        

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


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

Posted by "Stefan Lischke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516701 ] 

Stefan Lischke commented on AXIS2-1885:
---------------------------------------

i also have this problem in 1.3 RC2 which was released after your fix date (20.7.2007) is this known and wanted? or did this fix not make it into the 1.3 rc2?

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             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, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Brian Nielsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501043 ] 

Brian Nielsen commented on AXIS2-1885:
--------------------------------------

I'm experiencing the same problem with the nightly (that I've just downloaded). I've tried the 'xmlbeans' ant task and that ran without a problem. I've also tried running WSDL2Java for 'ADB' but that gave me an another unexpected error for my WSDL.

I hope Amila or someone else with the needed insight can solve this one.





> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             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, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1885?page=comments#action_12459652 ] 
            
Amila Chinthaka Suriarachchi commented on AXIS2-1885:
-----------------------------------------------------

As I saw the problem is with the entity resolver. Entity Resolver has a method called 
 public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { 
which has two parameters. whenever xmlbeans wants to get an input source for an schma it calls this method with the publicId and the systemId. when calling it always appends an  project:local prefix to the internally imported schemas. so when call for the message.xsd it uses two systemIds.

this is your xsd in wsdl
<xs:schema targetNamespace="http://service.foobar.com/provider/testprovider/test/" xmlns="http://service.foobar.com/provider/testprovider/test/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msg="http://service.foobar.com/entity/message/" xmlns:runtest="http://service.foobar.com/provider/testprovider/test/runtest/">
			<xs:import namespace="http://service.foobar.com/entity/message/" schemaLocation="../../../entity/message/message.xsd"/>
			<xs:import namespace="http://service.foobar.com/provider/testprovider/test/runtest/" schemaLocation="runTest.xsd"/>
		</xs:schema>

but anyway, if you remove the message.xsd from here every thing works fine. So to avoid this problem we can refrain from importing the internally refered schemas in the wsdl.

> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
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

        

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


[jira] Updated: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.

Posted by "Michael Krumpus (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1885?page=all ]

Michael Krumpus updated AXIS2-1885:
-----------------------------------

    Attachment: axis2bug.zip

This example shows clearly that WSDL2Java fails with XMLBeans binding when message.xsd is imported from the WSDL and from another schema.

Drop the axis2 libraries into 'lib'.

Run 'ant codegen' to demonstrate failure.

Run 'ant codegen-xmlbeans' to demonstrate success using the standalone XMLBeans code generator.



> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
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

        

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


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

Posted by "Eric Johnson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463145 ] 

Eric Johnson commented on AXIS2-1885:
-------------------------------------

I am also seeing this issue with AXIS2 1.1.  As previously stated by another reporter, I'm using AXIS2 with a large corporate schema base that has worked fine in other frameworks.  We're hoping to see a resolution to this one!  Thanks!

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


RE: [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.

Posted by Yanlun Ma <Ya...@businessobjects.com>.
I see the same problem too.

Axis2 1.0 is fine. But 1.1 is not.

Thanks,

-----Original Message-----
From: Amila Chinthaka Suriarachchi (JIRA) [mailto:jira@apache.org] 
Sent: Tuesday, December 19, 2006 10:10 PM
To: axis-dev@ws.apache.org
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.

    [
http://issues.apache.org/jira/browse/AXIS2-1885?page=comments#action_124
59832 ] 
            
Amila Chinthaka Suriarachchi commented on AXIS2-1885:
-----------------------------------------------------

*shouldn't the import be present since types in that schema are used in
the WSDL?*
no I think. It is enough to import it in another imported schema. That
is why I propose this as a solution.

yes, as you have mentioned if there is a problem then we should to fix
it. (but this may take some time) What I want is to give you an option
which you can use to procced immediatly.

*Some SOAP implementations will not work if a referenced schema is not
imported in the WSDL*
I am not sure whether this is a bug or not according to the WSDL and
schema definitions.

By the way can you try with adb instead of xmlbeans?

I'll try to fix that bug.




> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original
global type found in file: ../../../entity/message/message.xsd)
> 	at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaT
ypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
> 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at
org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGener
ationUtility.java:160)
> 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.
-
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

        

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

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


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

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1885?page=comments#action_12459832 ] 
            
Amila Chinthaka Suriarachchi commented on AXIS2-1885:
-----------------------------------------------------

*shouldn't the import be present since types in that schema are used in the WSDL?*
no I think. It is enough to import it in another imported schema. That is why I propose this as a solution.

yes, as you have mentioned if there is a problem then we should to fix it. (but this may take some time) What I want is to give you an option which you can use to procced immediatly.

*Some SOAP implementations will not work if a referenced schema is not imported in the WSDL*
I am not sure whether this is a bug or not according to the WSDL and schema definitions.

By the way can you try with adb instead of xmlbeans?

I'll try to fix that bug.




> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
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

        

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


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

Posted by "Jose Antonio (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488047 ] 

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: https://issues.apache.org/jira/browse/AXIS2-1885
>             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, 2006.
>            Reporter: Michael Krumpus
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516702 ] 

Davanum Srinivas commented on AXIS2-1885:
-----------------------------------------

Stefan,

Please open a new bug and upload your wsdl/xsd's. there are so many usecases, so the symptom may be same, the cause might not be.

thanks,
dims

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, 1.1
>         Environment: Windows XP, JDK 1.4.  Tested on nightly snapshot of December 18, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Mariusz Woloncewicz (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1885?page=comments#action_12459637 ] 
            
Mariusz Woloncewicz commented on AXIS2-1885:
--------------------------------------------

I get the same error while importing schema files from the relative path.
For example, if there is 
<xs:import schemaLocation="common/download-exe-result.xsd" namespace="http://xxx/beans"/> tag in download-exe-response.xsd and 
<xs:import schemaLocation="common/download-rel-result.xsd" namespace="http://xxx/beans"/> in download-rel-response.xsd, 
the following exception is thrown:

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
...
Caused by: org.apache.xmlbeans.XmlException: project://local/common/download-rel-result.xsd:2:1: error: sch-props-correct.2: Duplicate global type: DownloadExecuteResultType@http://xxx/beans (Original global type found in file: common/download-exe-result.xsd)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
        at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:166)

, but it is misleading because DownloadExecuteResultType is defined only in download-exe-result.xsd.

> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
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

        

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


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

Posted by "Michael Krumpus (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1885?page=comments#action_12459727 ] 
            
Michael Krumpus commented on AXIS2-1885:
----------------------------------------

Amila, yes, the problem can be avoided if the import statement is taken out of the WSDL, but shouldn't the import be present since types in that schema are used in the WSDL?  There is still a defect in the way that the resolver works and I believe it needs to be fixed.  It is not a simple option to just say that the import should be removed -- I work in a very large company with hundreds of web services and we are trying to migrate application groups from Axis 1.x to Axis2.  Some SOAP implementations will not work if a referenced schema is not imported in the WSDL, and since consistency in our (very large) enterprise is very important, I hope the resolver problems can be solved somehow.  

It wasn't obvious to me how to solve it, but since XMLBeans scomp has no problem with it, I'm sure something can be fixed.


> 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: http://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
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

        

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


[jira] Resolved: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas resolved AXIS2-1885.
-------------------------------------

    Resolution: Fixed

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             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, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas reassigned AXIS2-1885:
---------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Apache 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, 2006.
>            Reporter: Michael Krumpus
>         Assigned To: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508937 ] 

Davanum Srinivas commented on AXIS2-1885:
-----------------------------------------

Sorry it took so long. fix is in svn revision 551707

thanks,
dims

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             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, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1885) WSDL2Java with XMLBeans binding codegen fails with "Duplicate global type" when schema is imported from WSDL file and another schema file.

Posted by "Stefan Lischke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Lischke updated AXIS2-1885:
----------------------------------

    Affects Version/s:     (was: nightly)
                       1.3

> 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: https://issues.apache.org/jira/browse/AXIS2-1885
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, 1.1
>         Environment: Windows XP, JDK 1.4.  Tested on nightly snapshot of December 18, 2006.
>            Reporter: Michael Krumpus
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         Attachments: axis2bug.zip
>
>
> 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@http://service.foobar.com/entity/message/ (Original global type found in file: ../../../entity/message/message.xsd)
> 	at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> 	at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org