ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
REST job Response cannot parse XPath query.
book
Article ID: 186413
calendar_today
Updated On:
Products
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)
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.
Environment
Release : 4.5.0 Component : RA WEB SERVICE REST
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