While coding to use the WebApp takes time, for this reason both a Maven plugin and an Ant Task are provided.
This way you can integrate SoaBox in your project build.
The Maven plugin permits to start a Virtual Client job, with the following parameters:
An example of configuration follows:
<plugin>
<groupId>com.blacksoa.box</groupId>
<artifactId>virtualClient-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<url>http://localhost:8080/soaBox/rest/virtualClient/registerJob/</url>
<group>Flows</group>
<name>Chain</name>
<delay>5000</delay>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>virtualClient</goal>
</goals>
</execution>
</executions>
</plugin>
To run the virtuaClient-plugin you will need to download it from sourceforge and install it in your maven repository.
To make it work you will also need the following dependency:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
</dependency>
Also an Ant task is provided. To use it you'll have to download the virtualClient-plugin from sourceforge.
To use both Maven and Ant the jar is the same.
An example of configuring and using the Ant task follows:
<target name="virtualClient" description="Starts the virtualClient" >
<taskdef name="virtualClient" classname="com.blacksoa.box.ant.VirtualClient">
<classpath>
<fileset file="target/virtualClient-plugin-1.0.1.jar"/>
<fileset file="../../lib">
<include name="**/httpclient-4.1.jar"/>
<include name="**/httpcore-4.1.jar"/>
<include name="**/commons-logging.jar"/>
</fileset>
</classpath>
</taskdef>
<virtualClient
url="http://localhost:8080/soaBox/rest/virtualClient/registerJob/"
group="Flows" name="Chain" delay="10000"/>
</target>
as you can see the Task need httpClient to work.
The task have the following parameters: