Using SoapUI 4.5.1 (not SoapUI Pro). Need help figuring out the property transfer step. Need the response from step 1 to be inserted as the parameter for step 2. Do not know how how add xPath manually.
Re: Property Transfer
As you have mentioned you would have to access the correct xPath to retrieve the value that you need. For an example if you are accessing the post code from a web service response,you would have to mention the following in the "source" section by selecting your Test Request and by selecting the property value as "Response"
And in the "Target" section you would have to select your target Test Request and select the property value as "Request" and probably enter something like the followingdepending on your xml node hierarchy of course)
If you want to programmatically access a value in the response, something like the following would do
def responseHolder = groovyUtils.getXmlHolder(testRunner.testCase.testS teps["Test Request - My Request"].testRequest.responseContent);
myPostCode = responseHolder.getNodeValue("//Address/BusinessAddress/Postcode")
Originally Posted by qapkrmden
I didn't think the property transfer was available in the free version of SoapUI?
I'm using 2 method's for extracting data from one step and using in another step:
The in-built property transfer which works for me most of the time, where that doesn't extract what I want I write some Groovy code to capture the necessary data, here's an example:
// Get value from a node
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
// The param in the getXmlHolder is Test Step & Response
def holder = groovyUtils.getXmlHolder ("Get-GUID#Response")
//Get account ID from the response
context.accountId = holder.getNodeValue ("//return")
log.info ("@@@@ RESPONSE @@@=" + context.accountId );
The param in the first step ("Get-GUID#Response") is the step name#and the returned data your string is contained in.
The second step gets the data from the specific node where your required data resides in the response string.
Here's how I would use the captured string in another step:
Hope this helps, Mark Smith.