3

wsdl2javaApache CXF Maven Plugin を目標にWeb サービス クライアントを生成しようとしています。WSDL URL リンクがありますが、Maven プラグインを使用すると、ソースが生成されません。サンプルの WSDL リンクはhttp://www.webservicex.com/globalweather.asmx?WSDLです。

<properties>
        <src.generated.dir>src/main/java</src.generated.dir>
        <artifact.cxf.version>3.1.6 </artifact.cxf.version>
        <xerces.version>2.11.0</xerces.version>
        <inbound.wsdl>http://www.webservicex.com/globalweather.asmx?WSDL</inbound.wsdl>
        <inbound.wsdl.location>http://www.webservicex.com/globalweather.asmx?WSDL</inbound.wsdl.location>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${artifact.cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${src.generated.dir}</sourceRoot>
                            <defaultOptions>
                                <noAddressBinding>true</noAddressBinding>
                                <faultSerialVersionUID>3105839350746982386</faultSerialVersionUID>
                            </defaultOptions>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${inbound.wsdl}</wsdl>
                                    <wsdlLocation>${inbound.wsdl.location}</wsdlLocation>
                                    <serviceName>webservicex</serviceName>
                                    <extraargs>
                                        <extraarg>-client</extraarg>
                                        <extraarg>-verbose</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>http://webservicex.ent.com/arm/=com.ent.webservicex.arm</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>xerces</groupId>
                        <artifactId>xercesImpl</artifactId>
                        <version>${xerces.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
4

1 に答える 1