nullop
12 years agoOccasional Contributor
Trying to pass values from XML request to Groovy Script
Hello I am new to soap UI. Let me explain what I want to do.
Let's say my request is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sim="http://www.example.org/SimpleSocialSOA/">
<soapenv:Header/>
<soapenv:Body>
<sim:LoginResponse>
<id>4456643453</id>
</sim:LoginResponse>
</soapenv:Body>
</soapenv:Envelope>
After this request is sent ID will be used & stored in a database.
My GroovyScript connects to the database and using a key returned from the response gets the ID in the database.
I want to make sure the ID in the database matches the ID that the request sent.
How do I send the ID the XML request sent to my groovy script?
Do I use XML expansion?
Do I need a XML holder?
Do I use a property transfer?
This is something I would be doing a lot... As in verifying each field of each request...
What is the easiest way to do this?
Let's say my request is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sim="http://www.example.org/SimpleSocialSOA/">
<soapenv:Header/>
<soapenv:Body>
<sim:LoginResponse>
<id>4456643453</id>
</sim:LoginResponse>
</soapenv:Body>
</soapenv:Envelope>
After this request is sent ID will be used & stored in a database.
My GroovyScript connects to the database and using a key returned from the response gets the ID in the database.
I want to make sure the ID in the database matches the ID that the request sent.
How do I send the ID the XML request sent to my groovy script?
Do I use XML expansion?
Do I need a XML holder?
Do I use a property transfer?
This is something I would be doing a lot... As in verifying each field of each request...
What is the easiest way to do this?