Skip to Content
Author's profile photo Shabarish V Nair

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 🙂

Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Great info! That really a good and very useful feature 🙂 Thanks for sharing!

      Arman

      Author's profile photo Fred Verheul
      Fred Verheul
      ...that I, being another 'ignoramus human', didn't know about yet. Thanks for blogging!

      Cheers, Fred

      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author
      good to know this feature sounds helpful 🙂
      so one bit of that 'ignoramus' quotient is reduced ... 😉
      Author's profile photo Former Member
      Former Member
      Shabz, SoapUI has slowed down the process of my hair starting to grey very early 🙂
      And I've only just scrathed the surface with it.

      It's the most awesome tool & I hope it grows from strength to strength!

      Regards, Trevor

      Author's profile photo Tim Drury
      Tim Drury
      soapUI is a great tool; I've been using it since before 2.0.  We frequently develop both unit tests and integration tests of our web services in SAP ME with it.  Then, you can execute those tests via Hudson - a continuous build server.  The Groovy-scripting capabilities let you create some complicated integration tests.
      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author
      thanks for the input Tim.
      Think I should explore what you have mentioned 🙂
      Author's profile photo Stefan Bosshard
      Stefan Bosshard
      Thanks for this useful blog - I was looking for this requirement!!!!!

      Regards
      Stefan

      Author's profile photo Former Member
      Former Member
      I have not yet used it to mock a service, but whenever somebody tells me I am going to be calling a service, soapUI is the first thing I fire up.  Perfect for "exploring" a service you haven't called before.  Also great for testing new services that you've written.
      Author's profile photo Samiullah Qureshi
      Samiullah Qureshi
      Thanks Shabarish for sharing this.
      I was also one of those ignoramus:)

      Thanks,
      Sami.

      Author's profile photo Zameer Hamza Farook
      Zameer Hamza Farook

      Hi Shabarish Vijayakumar,

      This blog has lost its content formatting. I have gone through this blog in the earlier days, thought of referring now, but not able to read, is there a way to fix it?

      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author

      yeah .. guess this was post migration of SCN onto Jive platform. Let me find sometime to fix this. thanks for notifying me!

      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author

      Zameer Farook , hope the blog is now formatted.

      Author's profile photo Zameer Hamza Farook
      Zameer Hamza Farook

      Yes 🙂

      Author's profile photo Former Member
      Former Member

      Hi Shabarish,

      We can help out in case there are any issues with the images. Just let me know.

      And you may also want to move it into the correspondent space afterwards. Reference: Why move your blogs into SCN spaces

      Thanks,

      Mariana

      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author

      Mariana Mihaylova , would you be able to help me get back the images on this blog? would do me a lot of good in terms of reduced efforts in rewritting this one 🙂

      Author's profile photo Former Member
      Former Member

      Sure - will get back to you promptly.

      Have a great weekend everyone!

      Author's profile photo Jason Lax
      Jason Lax

      I just added them back.

      Author's profile photo Shabarish Vijayakumar
      Shabarish Vijayakumar
      Blog Post Author

      thanks Jason Lax and Mariana Mihaylova . The blog is now back in format.