cancel
Showing results for 
Search instead for 
Did you mean: 

Error in parsing CDATA response

Highlighted
New Contributor

Error in parsing CDATA response

Hello, I'm using SOAPUI Open Source tool and fairly new to the tool. After much googling and understanding CDATA parsing, I have finally come to the forum to ask for help.

Actuall call 

ActualCall.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Response from above call

ReponseFromCall.png

I'm trying to extract guest_no tag that is inside CDATA which is inside rInvokeResult tags. I then want to use the value of guest_no in subsequent call. So, I tried using Property Transfer by first, extracting the value from CDATA and then transfering to other test step/call but so far I'm getting following error.

Error.png

 

If I use //ns1:rInvokeRespone[1]/ns1:rInvokeResult[1] then I get everything.Everything.png

 

I'll really appreicate your help or guidance. Thanks.

3 REPLIES 3
Highlighted
Community Hero

Re: Error in parsing CDATA response

Couple of things.

1. find few samples on reading cdata
https://github.com/nmrao/soapUIGroovyScripts/search?q=cdata&unscoped_q=cdata
2. The data inside CDATA does not seemed to be valid in your response, check with your team.


Regards,
Rao.
Highlighted
New Contributor

Re: Error in parsing CDATA response

Thank you NMRao. 

I did reach out to the team and format is not real XML. However, as suggested, when I added <root></root> after removing 'OK:' to the response, I was able to get just the guest_no. I'll look into some of your script on if any node can be added to the response or not. 

Your scripts and reply helped.

 

Highlighted
Community Hero

Re: Error in parsing CDATA response

Hmm..the response should be a valid xml (standard).

Appreciate if you can mark the previous reply if it solved.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors