0
WSDL을 사용하여 Java 클래스를 생성하도록 구성된 wsdl2java 플러그인을 아래에서 사용하고 있습니다.CXF wsdl2java가 스키마를 제대로 읽지 못합니다.
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/resources/XXXXService.wsdl</wsdl>
<validate>none</validate>
<extraargs>
<extraarg>-server</extraarg>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://XXX/YY=XXX</extraarg>
<extraarg>-autoNameResolution</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
이제 WSDL에 아래 스키마가 포함되었습니다.
<xsd:element name="myElement">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="a" type="xsd:string"
minOccurs="1">
</xsd:element>
<xsd:element name="b" type="xsd:string"
minOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
그러나이 WSDL 내 요소 정의가 참조 :
<xsd:include schemaLocation="myschema.xsd" xmlns="tns"></xsd:include>
내 요소 정의는 아래처럼 내 WSDL 내에
, 그것은 괜찮 myElement을위한 클래스를 생성 스키마의 ComplexType 정의로 이동합니다. 그런 다음 요소 클래스 aaa이 생성되지 않습니다. aaaType 클래스가 생성됩니다.<xsd:element name="aaa"
type="tns:aaaType">
</xsd:element>
나는 두 클래스 AAA 및 aaaType 참조 aaaType 내부 AAA를 생성 할 WSDL2Java의를 지정할 수있는 방법이 있나요?