[
https://issues.apache.org/jira/browse/CXF-4764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colm O hEigeartaigh resolved CXF-4764.
--------------------------------------
Resolution: Cannot Reproduce
> WSDLToJava Error: ...is already defined
> ---------------------------------------
>
> Key: CXF-4764
> URL: https://issues.apache.org/jira/browse/CXF-4764
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Affects Versions: 2.7.2
> Environment: Windows 7 x64, Eclipse, Ant, Ivy, Apache Tomcat 7.0.22
> Reporter: Sergii Pavlenko
> Priority: Major
> Attachments: wsdl_test.zip
>
>
> I've got wsdl with three xsd-s:
> * tpml-trade_2_0.xsd (imports two others)
> * fpml-4-6-7-rec-1/www.fpml.org/spec/2009/fpml-4-6-7-rec-1/fpml1.xsd
> * fpml-4-6-7-rec-1/www.fpml.org/spec/2009/fpml-4-6-7-rec-1/fpml2.xsd
> (includes fpml1.xsd)
> I run ant wsdl2java against above xsd-s and get generated java classes
> without errors:
> {noformat}
> wsdl2java -verbose -d D:\Projects\workspace\wsdl_test\src\gen-api
> D:\Projects\workspace\wsdl_test\src\schema/calcservice.wsdl
> {noformat}
> Then I deploy webservice on server, try to generate java classes and receive
> errors:
> {noformat}
> wsdl2java -verbose -d D:\Projects\workspace\wsdl_test\src\gen-api
> http://localhost:8080/calculationservice/services/gate?wsdl
> {noformat}
> {noformat}
> [java] wsdl2java -verbose -d D:\Projects\workspace\wsdl_test\src\gen-api
> http://localhost:8080/calculationservice/services/gate?wsdl
> [java] wsdl2java - Apache CXF 2.7.2
> [java] WSDLToJava Error:
> http://localhost:8080/calculationservice/services/gate?xsd=fpml1.xsd [0,0]:
> 'Entry1' is already defined
> [java]
> http://localhost:8080/calculationservice/services/gate?xsd=fpml-4-6-7-rec-1/www.fpml.org/spec/2009/fpml-4-6-7-rec-1/fpml1.xsd
> [0,0]: (related to above error) the first definition appears here
> [java] org.apache.cxf.tools.common.ToolException:
> http://localhost:8080/calculationservice/services/gate?xsd=fpml1.xsd [0,0]:
> 'Entry1' is already defined
> [java]
> http://localhost:8080/calculationservice/services/gate?xsd=fpml-4-6-7-rec-1/www.fpml.org/spec/2009/fpml-4-6-7-rec-1/fpml1.xsd
> [0,0]: (related to above error) the first definition appears here
> {noformat}
> Seems that CXF is still unable to resolve same xsd from different
> import/include.
> I used JAXB 2.2.2, CXF 2.7.2 and Apache Tomcat 7.0.22.
> After deploying fpml1.xsd is available under two different urls.
> * http://localhost:8080/calculationservice/services/gate?xsd=fpml1.xsd
> *
> http://localhost:8080/calculationservice/services/gate?xsd=fpml-4-6-7-rec-1/www.fpml.org/spec/2009/fpml-4-6-7-rec-1/fpml1.xsd
> Looks like CXF treates same XSD under different aliases as a different ones.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)