10-99
Cisco CRS-1 Series Carrier Routing System XML API Guide
OL-4596-01
Chapter 10 Error Reporting in Cisco CRS-1 Series XML Responses
Types of Reported Errors
<Get>
<Configuration>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>3</AS>
</Naming>
<BGPEntity>
</AS>
</BGP>
</Configuration>
</Set>
</Request>
Sample XML Response from the Cisco CRS-1 Series Router
<?xml version="1.0" encoding="UTF-8"?>
<Response MajorVersion="1" MinorVersion="0">
<Get xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ErrorCode="0x43679000"
ErrorMsg="'XML Service Library' detected the 'warning'
condition 'An error was encountered in the XML beneath this operation tag
'">
<Configuration ErrorCode="0xa240da00" ErrorMsg="'XML Infrastructure '
detected the 'fatal' condition 'Opening and ending tag does not
match'"/>
</Get>
</Response>
XML Schema Errors
XML schema errors are detected by the XML operation providers. This general category of errors
includes those resulting from invalid operation types, invalid object hierarchies, and invalid naming or
value elements. However, some schema errors may go undetected because, as previously noted, the
Cisco CRS-1 Series router does not validate the request against an XML schema.
In the following example, the client application has requested a <Set> operation specifying an object
<ExternalRoutes> that does not exist at this location in the Border Gateway Protocol (BGP) component
hierarchy. This example illustrates the format and placement of the error attributes.
Note The actual error codes and messages may be different than those shown in the example.
Sample XML Client Request Specifying an Invalid Object Hierarchy
<?xml version="1.0" encoding="UTF-8"?>
<Request MajorVersion="1" MinorVersion="0">
<Set>
<Configuration>
<BGP MajorVersion=”1” MinorVersion=”0”>
<AS>
<Naming>
<AS>3</AS>
</Naming>
<Global>
<ExternalRoutes>10</ExternalRoutes>
</Global>
</AS>
</BGP>
</Configuration>
</Set>