27.07.2010

maven org.codehaus.mojo jaxws plugin generate source files from local wsdl files

In a development phase, sometimes webservices are not online. So when generating java sources from remote wsdl file is not possible in that situations. If you are using org.codehaus.mojo jaxws maven plugin  generating java sources from local wsdl files is possible in a few steps.
1. download wsdl files and save into src/wsdls directory
2. add the codes below into webservive consumer project’s pom.xml

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlDirectory>${basedir}/src/wsdls</wsdlDirectory>
<packageName>com.montoya.ferp.client</packageName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>



Hiç yorum yok: