[
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