jayrdi
12 years agoOccasional Contributor
CDATA Event Handler
Some of the data I am trying to perform a Property-Transfer upon is nested inside CDATA tags. I have tried to work round this by adding an Event Handler to the Project (as per the guide at: http://www.soapui.org/Functional-Testing/working-with-cdata.html) but it doesn't work.
I have added the code:
to the Events tab in the Project View under the Event Handler name 'RequestFilter.afterRequest' which should apparently do the trick, but it doesn't. Can anyone think why this might not be working?
BTW I am using the Pro version but haven't been given a username and password yet.
Thanks for your help,
John
I have added the code:
def content = context.httpResponse.responseContent
content = content.replaceAll( "<!\\[CDATA\\[", "" )
content = content.replaceAll( "]]>", "" )
//log.info( content )
context.httpResponse.responseContent = content
to the Events tab in the Project View under the Event Handler name 'RequestFilter.afterRequest' which should apparently do the trick, but it doesn't. Can anyone think why this might not be working?
BTW I am using the Pro version but haven't been given a username and password yet.
Thanks for your help,
John