Apache CXF Mavenプラグインの目標wsdl2java
を使用してWebサービスクライアントを生成しようとしています。私はWSDL URLリンクを持っていますが、Mavenプラグインを使用している場合、ソースを生成していません。サンプルWSDLリンクはhttp://www.webservicex.com/globalweather.asmx?WSDLです。オンラインWSDL URLリンク用のCXF wsdl2javaを使用してWebServiceクライアントを生成する方法
<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>