Forum Discussion

ballard123's avatar
ballard123
Occasional Contributor
8 years ago

Looking for help with Soap UI to update XML and inject into JMS Queue.

I have around 10000 messages stored from a production environment which I need to manipulate two tags if they are present. I am using soap ui free and set up a data reader within Groovy script to retrieve the data that needs to be input into the XMLs as it loops through the messages and submits.

 

But the problem is I cant think of a way to only update if a particular path is present within the XML

 

eg:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope">
<soap:Header/>
<soap:Body>
<tem:Add xmlns:tem="http://tempuri.org">
<tem:intA>5</tem:intA>
<tem:intB>7</tem:intB>
</tem:Add>

**Rest of message**


</soap:Body>
</soap:Envelope>

 

but path <tem:Add xmlns:tem="http://tempuri.org">
<tem:intA>5</tem:intA> is not always present but need to update the value contained within these tags if it is present.

 

 

The data looper is reading a csv and storing the value into a properties. I need to paste that property into the XML and fire then loop to next file.

No RepliesBe the first to reply