This project is a primitive example of Axis2 client and server generation via Gradle. It automates much of the tasks required to build and deploy from a provided WSDL file.
- Download and extract the Apache Axis2 binary distribution
- Assuming your version is
1.7.9
, set the following environment variables:- Append
PATH
with:/path/to/axis2-1.7.9/bin
- Set
AXIS2_HOME
to:/path/to/axis2-1.7.9
- Append
If you have your IDE open, you may have to restart it for Gradle to pick up the new environment.
Inside this project's root directory, run gradlew generate
. This will invoke the code generation for both the client and server using ApproverService.wsdl.
Then, edit server/generated/resources/services.xml and set ServiceClass
to the full name of the implemented server class:
<serviceGroup>
...
<parameter name="ServiceClass">com.axisapp.ApproverService</parameter>
...
</serviceGroup>
Note that every time you make a change in the WSDL file, you will have to re-generate the code via gradlew generate
.
This will revert all manual changes, such as the server class above, so make sure to apply it again.
In the project's root directory, run gradlew jar
. Once complete, you will find the client and server JARs in the following directories, respectively:
- Download and extract the Apache Tomcat binary distribution
- Download the Apache Axis2 WAR distribution
You will now need to start a Tomcat server and deploy the Axis2 WAR to it, so it can host the server generated by this project.
If running IntelliJ, you can open this project and configure a Run/Debug Configuration
for Tomcat Server > Local
, selecting TomCat's home directory. Then, in the Deployment
tab, you can select the Axis2 WAR you downloaded earlier. This way, once you click Run
or Debug
, Tomcat will automatically start, Axis2 will be deployed, and your browser will open the configuration page.
If not running IntelliJ, you will need to start Tomcat and deploy the Axis2 WAR manually.
Finally, deploy the server JAR to Axis2. Once that finishes, you can either run the client JAR or run the client via an IDE to see it interact with the server.