Friday, May 21, 2010

Create Axis Web Service stubs/artifacts using soapUI

It is very easy to generate Axis web service stubs (artifacts) using soapUI tool. NOTE: This can also be done using the commands

Put file in C:\Projects\Jars\axis-1_4\lib
cd C:\Projects\Jars\axis-1_4\lib
java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -p<packageName> <WSDLFileName/ URL>

soapUI is a web service, SOA, SOAP testing tool which provides a GUI for generating these stubs for those who do not like the command line. soapUI is a free open source desktop application for inspecting contract, invoking, developing, testing (functional, load, compliance, simulation) web services.

First in File-> Preferences->Tools tab set the Axis 1.x directory where you have downloaded the library files. Axis libraries can be downloaded out here : http://www.apache.org/dyn/closer.cgi/ws/axis/1_4

image

Tools->Axis 1.0 Artifacts

image

Put in the WSDL and the directory where you want the stubs to be located

image

In the Advanced tab you can specify the package where stubs should be placed

image

Generate button will start the task of generating stubs

image

image

image

In the following articles I will demonstrate how I called the web service using these stubs.