우리는 제 3 자 WSDL로부터 wsdl2java로 Java를 생성하고 있습니다. WSDL은 포함이 xsdschema에서JAXB WSDL 외부의 XSD 바인딩
<wsdl:import namespace="http://somenamespace" location="xsdschema.xsd" />
는 = nillable로 "true"로 발전기는 ObjectFactory를에 충돌 (중복) 보고서 요소입니다. 바인딩 generateElementProperty = "false"를 사용하려고합니다. 그러나 WSDL에 대해 정의 된 바인딩 정의에서 생성기는이를 무시하고 xsd WSDL2Java에 대한 바인딩을 정의 할 때 XSD는 컴파일의 일부가 아니라고 말했습니다. 그것을 해결하는 방법? WSDL에 대한
XJB (generateElementProperty는 무시됩니다 - ObjectFactory를 여전히 중복 오류) : XSD에 대한
<jaxws:bindings version="2.0"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
wsdlLocation="wsdl3rd.wsdl">
<jaxb:bindings>
<jaxb:globalBindings generateElementProperty="false"/>
</jaxb:bindings>
</jaxws:bindings>
XJB (오류 : XSD 컴파일의 일부가 아닙니다) :
<jxb:bindings version="2.1" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="xsdschema.xsd">
<jxb:bindings>
<jxb:globalBindings generateElementProperty="false"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
메이븐 :
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<wsdlRoot>src/main/resources/wsdl</wsdlRoot>
<defaultOptions>
<bindingFiles>bindingFile>bindingFile.xjb</bindingFile>
</bindingFiles>
</defaultOptions>
</configuration>
</execution>
</executions>
</plugin>
이 문제가 해결 되었습니까? 그렇다면 어떻게 해결 했습니까? – Xstian