Use SOAP-UI to correlate messages
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
When you run the script, you can see in the TestCase editor the outcome of the script
Then in the request message add a reference to the variable. This is the variable name between the double quotes
After that add an Assertion to the request. The Assertion is of the type 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!
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.