Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 18303 invoked from network); 9 Jan 2007 02:01:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 02:01:55 -0000 Received: (qmail 52538 invoked by uid 500); 9 Jan 2007 02:01:55 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 52520 invoked by uid 500); 9 Jan 2007 02:01:55 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 52509 invoked by uid 99); 9 Jan 2007 02:01:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 18:01:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 18:01:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C2AD1714295 for ; Mon, 8 Jan 2007 18:01:27 -0800 (PST) Message-ID: <11102881.1168308087794.JavaMail.jira@brutus> Date: Mon, 8 Jan 2007 18:01:27 -0800 (PST) From: "Davanum Srinivas (JIRA)" To: axis-dev@ws.apache.org Subject: [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. In-Reply-To: <12426482.1166478081288.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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