Forum Discussion
SmartBear_Suppo
15 years agoSmartBear Alumni (Retired)
Hello,
The reason that the response is not parsed as XML is that it is invalid, the contents of the faultstring is being parsed as an element (), which has no closing tag and contains illegal characters in the element name (namely %). This whole block should be escaped using a CDATA section. If possible, this needs to be changed on the server, as no conforming XML parser should treat the response as it is now correctly. A workaround you can do is to manually escape the string in soapUI. For example:
Regards,
Dain
eviware.com
The reason that the response is not parsed as XML is that it is invalid, the contents of the faultstring is being parsed as an element (), which has no closing tag and contains illegal characters in the element name (namely %). This whole block should be escaped using a CDATA section. If possible, this needs to be changed on the server, as no conforming XML parser should treat the response as it is now correctly. A workaround you can do is to manually escape the string in soapUI. For example:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def escaped = context.expand('${SOAP Request#Response}').replace('<faultstring>', '<faultstring><![CDATA[').replace('</faultstring>', ']]></faultstring>')
def response = groovyUtils.getXmlHolder( escaped )
Regards,
Dain
eviware.com
Related Content
- 6 years agodbaray
- 8 years agokolisko
- 6 months agormrosen6
- 3 years agosirping
- 6 years agoSuperTester
Recent Discussions
- 6 days agoruchisingh