Showing posts with label soapui. Show all posts
Showing posts with label soapui. Show all posts

Friday, June 29, 2012

How to deploy a .aar service in Axis2 server.

I am going to explain this using a simple service which has only a echoString method, which is in-out operation and a ping method, which is in-only operation.

Write your sample service.

write services.xml file for your sample service



There is a folder structure for .aar file, In this case it should be


services.xml file should be inside the META-INF directory. Otherwise you will get an error saying services.xml file is not detecte. Ok now your are ready to create Sample.aar file.

Step 1. Compile above project and Select META-INF and org(which contain SimpleService.class) directories and create sample.zip file using that directories. If you created this in correct way, when you unzip this sample.zip file you will get above both directories not a sample directory.

Step 2. Now rename this sample.zip file to sample.aar (just change the extension .zip to .aar)

Step 3. Now you can deploy this service in axis2. For that you should copy this sample.aar file to AXIS2_HOME/repository/services/

Step 4. Start Axis2 server. (How to start Axis2 server).

Step 5. Open you web browser and go to http://localhost:8080/axis2/services/ you will see your sample service withing this deployed services.

Step 6. You can use soapUI to check the above service(How to use SoapUI). (Hint- click on the SampleService in service list you will get wsdl of this service, save it )

Wednesday, June 27, 2012

How to use SoapUI client

You can download SoapUI from here  ,
Unzip the soapui-4.*.*-*-bin.zip to your preferable place , lets assume you unzip to your home directory ,
Then go to bin directory - run this command in terminal "cd soapui-4.*.*/bin/".
To run the SoapUI client use "sh soapui.sh " command.



Ok now you ready to create a new soapui project using your wsdl :)

Go to File--> New soapui Project



Then you can see a pop up window like below


Give a name to your project , and select you wsdl file
click ok button to create a new project.

select a operation in request window and fill out the request message. Now click on green arrow button which is at the top left conner of Request window to send your request to the service. Here I am sending echoString request giving "sample" as my string.


 If you have deploy your service at particular endpoint then you will receive response and you can see it right side pane of Request window.




Sample Text

Website counter

Categories