Skip to Content

Are you making the best out your Test tool? – Tips on SOAP UI

Prologue:

There was a time when I used to use XML Spy trial versions to help me test my SOAP scenarios. Then one day someone recommended SOAPUI. I fell in love…..

Chapter 1: A Disclosure

Most of us use SOAPUI as a test tool for testing Sender SOAP scenarios in PI. Whenever someone wants to simulate a SOAP all into PI, we are happy to recommend SOAPUI or XMLSpy as a testing tool. But then what about a SOAP receiver?

There are situations when there is an ongoing interface build. Lets say in this particular case, the requirement is that PI will be invoking a WS call to an application.The WS team has shared the WSDL to the PI team but they have not yet shared the target URL since they are building the application logic in parallel and hence the WS is not yet hosted. So hard working consultants as we are, we end up finishing our build but the dilemma of unit testing lingers around. I never knew this before but seems this is where SOAPUI can help us again.

Many of you might already know this feature but some ignoramus human such as me might still be left in the dark. Hence hope this blog will be of help to many of those getting bored in that darkness.

Chapter 2: Mock a Service

There is a cool feature in SOAPUI that lets you run or mock a Web Service. In short, you can replicate the functionality and run the web service on your desktop.

/wp-content/uploads/2010/10/29oct2010_1_113318.jpg

Once you load the WSDL as a project, you can use the option Generate MockService.

You can select the particular operation, provide the path (which will result in your Target URL) and the port

/wp-content/uploads/2010/10/29oct2010_2_113319.jpg

Once you have the Mock Service setup, you can edit the response of the operation to whatever value that you may desire.

/wp-content/uploads/2010/10/29oct2010_3_113320.jpg

Setting up the mock response from the Web service:

/wp-content/uploads/2010/10/29oct2010_4_113321.jpg

Once the response is setup, we can start the mock service which will run on the local machine.

/wp-content/uploads/2010/10/29oct2010_5_113322.jpg

All you now need to do is update the SOAP receiver adapter with the Target URL.

The target URL will be http://* :8080/<path defined when creating the mock service>

Run your scenario and you will find a synchronous response coming back to PI from your mock service.

SXMB_MONI:

/wp-content/uploads/2010/10/29oct2010_6_113323.jpg

Well, I hope this information sure does help you 🙂

18 Comments
You must be Logged on to comment or reply to a post.