icon-arrow icon-check icon-mail icon-phone icon-facebook icon-linkedin icon-youtube icon-twitter icon-cheveron icon-download icon-instagram play close close icon-arrow-uturn icon-calendar icon-clock icon-search icon-chevron-process icon-skills icon-knowledge icon-kite icon-education icon-languages icon-tools icon-experience icon-coffee-cup
Werken bij Integration & Application Talents
Blog 29/09/2015

Use SOAP-UI to correlate messages

Link message

At a project where I work I had an issue. Messages are put on a queue with the help of SOAP-UI and HermesJMS. The response message is put by the OSB on a separate response queue. In the request message there is a correlationID defined. I want that SOAP-UI checks the correlationID in the response message so that this does match the correlationID in the request message.

This is what I did to accomplish it:

First I created a Groovy script. In this script a correlationID is generated

Groovy script

When you run the script, you can see in the TestCase editor the outcome of the script

TestCase editor

Then in the request message add a reference to the variable. This is the variable name between the double quotes

Variable name

After that add an Assertion to the request. The Assertion is of the type XPath Match.

XPath Match

In the XPatch Match Configuration window declare the namespaces, specify the XPath expression and then press select from current.

I didn’t expect to put quotes surrounding the reference to the variable. It seems to me it’s a literal expression, but it isn’t so!

Literal expression

Now you can run your request and when the outcome of XPath Match is the same as the expected result in the Assertion, it says VALID.

VALID

Geen reacties

Geef jouw mening

Reactie plaatsen

Reactie toevoegen

Jouw e-mailadres wordt niet openbaar gemaakt.

Geen HTML

  • Geen HTML toegestaan.
  • Regels en alinea's worden automatisch gesplitst.
  • Web- en e-mailadressen worden automatisch naar links omgezet.

Wil je deel uitmaken van een groep gedreven en ambitieuze experts? Stuur ons jouw cv!