타사 웹 서비스를 통합 할 때 문제가 있습니다. [오류] 목표 org.apache.cxf를 실행하지 못했습니다 : cxf-codegen-plugin : 2.4.2 : 프로젝트에서 wsdl2java (generate-sources) pcm_portal : JAXB에 의해 던졌습니다 : 'string15'는 이미 있습니다. 스키마의 305 행 2에 정의 된 ... -> [도움말 1]동일한 대상 네임 스페이스에 중복 형식 정의가있는 wsdl
실제로이 파일에는 동일한 대상 네임 스페이스에 대한 전체 스키마가 들어 있으며 두 가지 모두에 정의 된 동일한 simpleType (string15)을 찾을 수 있습니다. 스키마.
그것은이 같은 뭔가 :
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://siebel.com/CustomUI" ...>
<types>
<!-- ... -->
<xsd:schema elementFormDefault="qualified"
attributeFormDefault="unqualified"
targetNamespace="http://myNs/"
xmlns:xsdLocal3="http://myNs/">
<!-- ... -->
<xsd:simpleType name="string15">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"></xsd:maxLength>
</xsd:restriction>
</xsd:simpleType>
<!-- ... -->
</xsd:schema>
<!-- ... -->
<xsd:schema elementFormDefault="qualified"
attributeFormDefault="unqualified"
targetNamespace="http://myNs/"
xmlns:xsdLocal3="http://myNs/">
<!-- ... -->
<xsd:simpleType name="string15">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"></xsd:maxLength>
</xsd:restriction>
</xsd:simpleType>
<!-- ... -->
</xsd:schema>
<!-- ... -->
</types>
</definitions>
내 질문
1) WSDL2Java가 같은 파일을 처리 할 수 있도록하는 방법이 있나요?
오늘은 받는다는 CXF-CODEGEN - 플러그인을 통해 그것을 사용하고 있는데이 구성되어 있지 누군가가 있기 때문에 나에게 인수 될 수있는 참조 문서를 알고있는 경우
<defaultOptions>
<extraargs>
<extraarg>-exsh</extraarg>
<extraarg>true</extraarg>
<extraarg>-xjc-npa</extraarg>
</extraargs>
</defaultOptions>
2) 팀이 저에게 wsdl에게 문제가 없다고 말했습니다 (실제로 SoapUI는이 WSDL에 문제가 없습니다).
http://stackoverflow.com/questions/6681265/is-there-a-way-to-deal-with-duplicate-element-definitions-across-multiple-xsd-f http://cxf.apache.org/cxf-xjc-plugin.html –
답변 해 주셔서 감사합니다. 실제로 제 문제와 매우 비슷합니다. 글쎄, 내 복제본이 동일한 wsdl 파일 (수정되지 않았거나 분리되지 않았 으면 좋음)에 있기 때문에 해결 방법이 적용되는지 잘 모르겠습니다. – scherzoteller
어떻게 해결 했습니까? 같은 문제에 직면 해있다. – ronnyfm