How to retrieve a node from a soap response?

capsloc

New Member
I am new to SoapUI and SoapUI Pro. I came across a property transfer problem recently, of which I tried with no luck in googling for the solution. I was practising with "country codes" from webservicex.net, and when I run the ""GetCountry" test request I will get a list of countries as the response. \[code\]<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetCountriesResponse xmlns="http://www.webserviceX.NET"> <GetCountriesResult><![CDATA[<NewDataSet> <Table> <Name>Afghanistan, Islamic State of</Name> </Table> <Table> <Name>Albania</Name> </Table> <Table> <Name>Algeria</Name> </Table> .....</NewDataSet>]]></GetCountriesResult> </GetCountriesResponse> </soap:Body></soap:Envelope>\[/code\]That is all good until the point that I want to retrieve only one of the countries from the data set, Algeria for instance. It's because I want to transfer the country name to the next test step which is a service taking a country name as a request. I tried to select the node from the response, however I noticed that the XPath I got was pointing to whole response instead of one of those nodes \[code\]declare namespace ns1='http://www.webserviceX.NET';//ns1:GetCountriesResponse[1]/ns1:GetCountriesResult[1] \[/code\]I guess it is probably very simple question to some of you here, but my XPath skills is kind of limiting my ability to solve it myself. Much appreciated if anyone could help.
 
Back
Top