CA Automic Workload Automation - Automation Engine
Issue/Introduction
A RA Web Service Rest job cannot utilize XPath parsing the response. The following exception is shown:
Error: there was a problem with parsing... java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: ERROR Cannot execute query. ch.ethz.mxquery.exceptions.DynamicException: Error creating validating input: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; The document type declaration for root element type "ChannelAdminResult" must end with '>'. Used script: exists(//AdminErrorInformation)
Environment
Release : 4.5.0 Component : RA WEB SERVICE REST
Cause
The line <!DOCTYPE ChannelAdminResult SYSTEM "/AdapterFramework/channelAdmin/ChannelAdmin.dtd"> points to an external dtd. The XPath parser tries to resolve the address, but cannot do so, because its not a valid URL.
Resolution
Either remove the line <!DOCTYPE ChannelAdminResult SYSTEM "/AdapterFramework/channelAdmin/ChannelAdmin.dtd">, or use Groovy to parse the response.
Expression:
String s = input as String s.indexOf ('<AdminErrorInformation>') >= 0