You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Paul Baker (Created) (JIRA)" <ji...@apache.org> on 2011/12/09 17:41:40 UTC

[jira] [Created] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
----------------------------------------------------------------------------

                 Key: CXF-3968
                 URL: https://issues.apache.org/jira/browse/CXF-3968
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.5
         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
            Reporter: Paul Baker


cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  

The error reported is:
 [ERROR] Thrown by JAXB: 'xxxx' is already defined

Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  

Steps to recreate - files to be attached

*CXFService*
# Create Dynamic Web Project that is maven enabled
# Create WebContent/WEB-INF/web.xml
# Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
# Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
# Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
# Run wsdl2java 
# Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)

*CXFClient*
# Create Dynamic Web Project that is maven enabled
# Create WebContent/WEB-INF/web.xml
# Run wsdl2java (referece deployed wsdl)
http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl

Errors are generated... 

Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.

Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
  <extraargs>
     <extraarg>-v</extraarg>
     <extraarg>-verbose</extraarg>
  </extraargs>






--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3968.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1
         Assignee: Daniel Kulp
    
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>            Assignee: Daniel Kulp
>              Labels: wsdl2java
>             Fix For: 2.5.1
>
>         Attachments: CXF-3968.jpg, CXF-3968.zip
>
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Paul Baker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Baker updated CXF-3968:
----------------------------

    Attachment: CXF-3968.zip

The attached zip file contains the CXFService and CXFClient projects (Eclipse - Helios).  The key files are the wsdl/xsd and the pom files.  To duplicate the issue the service stubs are generated and then the service is disployed to JBoss AS6.  Then when trying to generate the client stubs using the deployed wsdl errors are generated for dup types.
                
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>              Labels: wsdl2java
>         Attachments: CXF-3968.zip
>
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Paul Baker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Baker updated CXF-3968:
----------------------------

    Attachment: CXF-3968.jpg

This image shows this "little" issue that I have when I comment out the duplicate include.  By commenting out the duplicate include the sources can be generated but then some wsdl/xsd tools have problem resolving the types.
                
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>              Labels: wsdl2java
>         Attachments: CXF-3968.jpg, CXF-3968.zip
>
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Paul Baker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Baker updated CXF-3968:
----------------------------

    Comment: was deleted

(was: This zip contains the CXFService and CXFClient Eclipse projects. The key files are the wsdl/xsd and the pom to generate the sources.  To duplicate the error the service must be deployed to JBoss AS6.)
    
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>              Labels: wsdl2java
>         Attachments: CXF-3968.jpg, CXF-3968.zip
>
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Paul Baker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Baker updated CXF-3968:
----------------------------

    Attachment: CXF-3968.zip

This zip contains the CXFService and CXFClient Eclipse projects. The key files are the wsdl/xsd and the pom to generate the sources.  To duplicate the error the service must be deployed to JBoss AS6.
                
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>              Labels: wsdl2java
>         Attachments: CXF-3968.zip
>
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3968) WSDLToJava Error: ...is already defined at... when referencing deployed wsdl

Posted by "Paul Baker (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Baker updated CXF-3968:
----------------------------

    Attachment:     (was: CXF-3968.zip)
    
> WSDLToJava Error: ...is already defined at... when referencing deployed wsdl
> ----------------------------------------------------------------------------
>
>                 Key: CXF-3968
>                 URL: https://issues.apache.org/jira/browse/CXF-3968
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.5
>         Environment: Windows 7 x64, Eclipse Helios, Maven Plugin (Sonatype - 0.12.1), Maven 3.0.3, cxf-codegen-plugin 2.5.0, JBoss 6.
>            Reporter: Paul Baker
>              Labels: wsdl2java
>
> cxf-codegen-plugin generates service stubs but is unable to generate client stubs. When generating the service stubs the wsdl and xsds are referenced localy within the project space. When generating the client code the same cxf-codegen-plugin description is used that generated the service stubs except the wsdl location is changed to refer to the deployed wsdl.  
> The error reported is:
>  [ERROR] Thrown by JAXB: 'xxxx' is already defined
> Where xxxx is a type that is defined in an xsd that is referred to by multiple files (wsdl and another xsd).  
> Steps to recreate - files to be attached
> *CXFService*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Create WebContent/WEB-INF/wsdl/myservice/MyService.wsdl
> # Create WebContent/WEB-INF/xsd/myservice/MyService.xsd
> # Create WebContent/WEB-INF/xsd/mycommon/MyCommon.xsd
> # Run wsdl2java 
> # Deploy service (no changes) to JBoss (i.e. jboss:hard-deploy)
> *CXFClient*
> # Create Dynamic Web Project that is maven enabled
> # Create WebContent/WEB-INF/web.xml
> # Run wsdl2java (referece deployed wsdl)
> http://localhost:8080/CXFService-0.0.1-SNAPSHOT?wsdl
> Errors are generated... 
> Work around (for this issue) is to comment out the MyCommon.xsd include in the MyService.wsdl.  But this causes the wsdl editor graphic to display a linkage error.  But asside from that with the duplicate include removed the cient stubs can be generated.
> Note originally I thought that adding the extraargs resolved the issue. But it appears that when -v (version) is added then only the version is displayed.  There is no code generation and consequently no errors.
>   <extraargs>
>      <extraarg>-v</extraarg>
>      <extraarg>-verbose</extraarg>
>   </extraargs>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira