Ask a Question

How to Validate Text/Plain response inside an xml

SOLVED
Ajay_Singh_Pari
Frequent Visitor

How to Validate Text/Plain response inside an xml

Below is the sample body

 

<data contentType="text/plain" contentLength="3169"><![CDATA[{ "RequestOutTime": "20201125 041439.710", "ResponseInTime": "20201125 041442.916", "inboundContentType": "application/json", "TransactionStatus": "SUCCESS", ......(and so on)......... , "partBEffectiveDate": "08/01/2020" } } }]]></data>

1 REPLY 1
richie
Community Hero

Hey @Ajay_Singh_Pari,

If you need to extract values out of an xml response that contains cdata (everything in the cdata handler is ignored by the xml parser) then you have a couple of different choices to handle it.

1. Use an in script groovy script to replace the cdata handler with empty characters
2. Use an event handler to replace the cdata handler with empty characters
3. Use sequential property transfers tp extract the values you want.

I've linked to option 3 below:

https://www.soapui.org/docs/functional-testing/working-with-cdata/

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: