View Source

The maven-wsoui-plugin has only two goals, bpel2java and wsdl2java.

This allows Maven 2 to generate all codes to deploy and run a SOA application based on bpel process using bpel2java or just a Web Service using wsdl2java. This plugin is based on [cxf plugin|http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html].

If you want use maven-wsoui-plugin in your maven project, you MUST add this dependency in your *pom.xml* file

{code:XML}
<!-- Add maven-wsoui-plugin dependency -->
<dependency>
<groupId>com.ebmwebsourcing.easiestdemo</groupId>
<artifactId>maven-wsoui-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
{code}



h2. bpel2java goal

The code below presents how to use this plugin with the goal *_bpel2java_*:

{code:XML}
<build>
<plugins>
<plugin>
<groupId>com.ebmwebsourcing.easiestdemo</groupId>
<artifactId>maven-wsoui-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<bpelOptions>
<bpelOption>
<bpel>
<!-- Set your bpel file here .... -->
${basedir}/src/main/resources/nrbc.bpel
</bpel>
</bpelOption>
</bpelOptions>
</configuration>
<goals>
<goal>bpel2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}

The bpelOption element is the place where you can customize the code generation. It contains under elements to parameterized this plugin. These elements are listed below:

|| element || type || required || description ||
| *bpel* | url | true | corresponde to bpel url address that allows plugin to generate SOA Application |
| *generateBusinessClass* | boolean | false | allows developer to generate business classes. These Business classes are Java Class where developer MUST code the specific business implementation of web service (by default, value is *true*) |
| *overrideOlderBusinessClass* | boolean | false | this options provokes overriden of business classes (by default, value is *false*) |


h2. wsdl2java goal

The code below presents how to use this plugin with the goal *_wsdl2java_*:

{code:XML}
<build>
<plugins>
<plugin>
<groupId>com.ebmwebsourcing.easiestdemo</groupId>
<artifactId>maven-wsoui-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>
<!-- Set your wsdl file here .... -->
${basedir}/src/main/resources/fireman.wsdl
</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
{code}

|| element || type || required || description ||
| *wsdl* | url | true | corresponde to wsdl url address that allows plugin to generate Web Service |
| *generateBusinessClass* | boolean | false | allows developer to generate business classes. These Business classes are Java Class where developer MUST code the specific business implementation of web service (by default, value is *true*) |
| *overrideOlderBusinessClass* | boolean | false | this options provokes overriden of business classes (by default, value is *false*) |