rthupakula
14 years agoNew Contributor
Property Transfer : Unable to write XPath for SOAP Response
Hi Friends,
I'm using SOAPUI for testing of SOAP based web services.
My current task is as follows. I created a Project, TestSuite and one TestCase in it with the following Test Steps:
1. Test Step1 which makes a request to a service (Returns list of cities in that country) : SOAP REQUEST
input: Takes country name as input
output: Returns list of cities in that country as SOAP RESPONSE
2. Test Step 2 - Property Transfer : It collects one specified city name from response of Test Step1 and passes that value as input to Test Step3.
3. Test Step 3 - Will make a service call to another service (Weather Report of a city) : SOAP REQUEST
input : collects a parameter from Test Step2 (one city name)
output : Returns the weather report of that city (SOAP RESPONSE)
Issue: I'm unable to write a proper XPath expression to enter in the "SOURCE" and "DESTINATION". I need your help to write proper XPath expression for the SOAP RESPONSE AND SOAP REQUEST.
Bootom Line: Please provide the XPath SOURCE and DESTINATION for the Property Transfer created value.
MORE DETAILS:
.............................
Please find the Test Case - Test Steps below:
TEST STEP 1 # ############## (WSDL is : http://www.webservicex.net/globalweather.asmx?WSDL )
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
<web:GetCitiesByCountry>
<!--Optional:-->
<web:CountryName>CANADA</web:CountryName>
</web:GetCitiesByCountry>
</soapenv:Body>
</soapenv:Envelope>
TEST STEP 2 ###############################
Created a Property Transfer to the test case - (The script for SOURCE AND DESTINATION is what I need).
I need to capture the value of a city ("Halifax International Airport") from the Response output and assign it as input to TEST STEP 3
I wrote a couple of XPath scripts which didn't work.
TEST STEP 3 #################################(WSDL is : http://www.webservicex.net/globalweather.asmx?WSDL )
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
<web:GetWeather>
<!--Optional:-->
<web:CityName></web:CityName> <!-- This is the node which is needs the input from the Property Transfer -->
<!--Optional:-->
<web:CountryName>CANADA</web:CountryName>
</web:GetWeather>
</soapenv:Body>
</soapenv:Envelope>
I'm using SOAPUI for testing of SOAP based web services.
My current task is as follows. I created a Project, TestSuite and one TestCase in it with the following Test Steps:
1. Test Step1 which makes a request to a service (Returns list of cities in that country) : SOAP REQUEST
input: Takes country name as input
output: Returns list of cities in that country as SOAP RESPONSE
2. Test Step 2 - Property Transfer : It collects one specified city name from response of Test Step1 and passes that value as input to Test Step3.
3. Test Step 3 - Will make a service call to another service (Weather Report of a city) : SOAP REQUEST
input : collects a parameter from Test Step2 (one city name)
output : Returns the weather report of that city (SOAP RESPONSE)
Issue: I'm unable to write a proper XPath expression to enter in the "SOURCE" and "DESTINATION". I need your help to write proper XPath expression for the SOAP RESPONSE AND SOAP REQUEST.
Bootom Line: Please provide the XPath SOURCE and DESTINATION for the Property Transfer created value.
MORE DETAILS:
.............................
Please find the Test Case - Test Steps below:
TEST STEP 1 # ############## (WSDL is : http://www.webservicex.net/globalweather.asmx?WSDL )
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
<web:GetCitiesByCountry>
<!--Optional:-->
<web:CountryName>CANADA</web:CountryName>
</web:GetCitiesByCountry>
</soapenv:Body>
</soapenv:Envelope>
TEST STEP 2 ###############################
Created a Property Transfer to the test case - (The script for SOURCE AND DESTINATION is what I need).
I need to capture the value of a city ("Halifax International Airport") from the Response output and assign it as input to TEST STEP 3
I wrote a couple of XPath scripts which didn't work.
TEST STEP 3 #################################(WSDL is : http://www.webservicex.net/globalweather.asmx?WSDL )
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
<web:GetWeather>
<!--Optional:-->
<web:CityName></web:CityName> <!-- This is the node which is needs the input from the Property Transfer -->
<!--Optional:-->
<web:CountryName>CANADA</web:CountryName>
</web:GetWeather>
</soapenv:Body>
</soapenv:Envelope>