THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
This plugin can generate WSDL, server side code used to start web service and client side code from
a java class.
Here is a simple example:
Code Block | ||||
---|---|---|---|---|
| ||||
<plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-java2ws-plugin</artifactId> <version>2.1.3<<version>${cxf.version}</version> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.1.3<<version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-simple</artifactId> <version>2.1.3<<version>${cxf.version}</version> </dependency> </dependencies> <executions> <execution> <id>process-classes</id> <phase>process-classes</phase> <configuration> <className>org.apache.hello_world.Greeter</className> <genWsdl>true</genWsdl> <verbose>true</verbose> </configuration> <goals> <goal>java2ws</goal> </goals> </execution> </executions> </plugin> |
Here are the options you can use and their defaults:
Code Block |
---|
<configuration> <className>...</className> <classpath>...</classpath> <outputFile>...</outputFile> <genWsdl>..<<genWsdl>true</genWsdl> <genServer>..<<genServer>false</genServer> <genClient>..<<genClient>false</genClient> <genWrapperbean>..<<genWrapperbean>false</genWrapperbean> <frontend>...<<frontend>jaxws</frontend> <databinding>...<<databinding>jaxb</databinding> <serviceName>...</serviceName> <soap12>...<<soap12>false</soap12> <targetNameSpace>...</targetNameSpace> <verbose>...</verbose><verbose>false</verbose> <quiet>false</quiet> <attachWsdl>true</attachWsdl> <quiet><address>...</quiet>address> </configuration> |
For detailed descriptions of the configuration elements see Java to WS page.
The outputFile value by default will be:
Code Block |
---|
${project.build.directory}/generated/wsdl/${className}.wsdl |
...