AHo
15 years agoOccasional Contributor
manipulate SoapResponse - extract CDATA-Section
Hi soapUI Community,
i have a problem with "Property Transfer".
Unfortunately I receive my response with a CDATA-Section. (see example below)
To call my other webservices I need the isbn of the books which is inside the CDATA-Section.
I tried these:
As a result of CDATA this XPath Selection throws an error ("Missin match of Source XPath...").
Is it possible to manipulate the response with SoapUI and extract the "<response xmlns="http://www.test.com/test"> ... </response>" Tag?
Or can I delete the CDATA-Tag from the response before I start the "Property Transfer"?
I hope you can help me.
so long,
AHo
i have a problem with "Property Transfer".
Unfortunately I receive my response with a CDATA-Section. (see example below)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns1:callResponse xmlns:ns1="http://example.com">
<callReturn>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.test.com/test">
<serviceresult name="myService">
<array name="lib" type="library">
<object>
<string name="name">The Old Man and the Sea</string>
<string name="desc">Some text</string>
<string name="isbn">315009075X</string>
</object>
<object>
<string name="name">Alices Adventures in Wonderland</string>
<string name="desc">Lorem ipsum dolor sit amet.</string>
<string name="isbn">0688110878</string>
</object>
</array>
</serviceresult>
</response>
]]>
</callReturn>
</ns1:callResponse>
</soapenv:Body>
</soapenv:Envelope>
To call my other webservices I need the isbn of the books which is inside the CDATA-Section.
I tried these:
declare namespace tst='http://www.test.com/test';
//tst:object[1]/tst:string[@name='isbn']
As a result of CDATA this XPath Selection throws an error ("Missin match of Source XPath...").
Is it possible to manipulate the response with SoapUI and extract the "<response xmlns="http://www.test.com/test"> ... </response>" Tag?
Or can I delete the CDATA-Tag from the response before I start the "Property Transfer"?
I hope you can help me.
so long,
AHo