Forum Discussion
sharmameera
10 years agoContributor
Hi,
That does not help in any way.
Thanks.
nmrao
Champion Level 1
10 years agoWell, you are applying wrong one.
Why do not you show the raw response? And what you want out of it?
Why do not you show the raw response? And what you want out of it?
- sharmameera10 years agoContributor
So, here is part of my request and response in the CData format ...
I would like the response to be displayed in the xml format.
If not possible, is there an easy way to write assertions for the data returning in the CData format?
I couldn't find anything except 'Contains' assertion. I would like to use XPath.
Request:
<soapenv:Body>
<web:CalculateQuote>
<!--Optional:-->
<web:QuoteXML><![CDATA[<QuoteObject>
<Insured>
<Quote>
<EffectiveDate>08/10/2011</EffectiveDate>
<OriginalEffectiveDate>08/10/2011</OriginalEffectiveDate>Response:
<CalculateQuoteResult><![CDATA[<QuoteObject><Insured UnitNumber=""><Quote UnitNumber=""><EffectiveDate>08/10/2011</EffectiveDate>
Thanks.
- nmrao10 years ago
Champion Level 1
As per below link, you can't directly apply xpath on the data that is inside cdata.
http://stackoverflow.com/questions/19745210/what-xpath-to-select-cdata-content-when-some-childs-exist
So first extract value that is in cdata, then use xmlslurper to parse that data and apply xpath on it.- sharmameera10 years agoContributor
Thanks! I will try that out.