Typically each web service request has a separate XML reply document to reflect the unique response for that particular operation. However, when an error occurs, the same XML error document is returned for every web service request.
The HTTP Status code is a standard numeric indicator of the result of an HTTP method.
The status code is always available in an HTTP header of the reply to any request. The client application can check the HTTP Status code to determine the success or failure of the operation. When the request is successful, the applicable reply document is returned. When the request fails, an error document is returned.
The CA Automation Point web services follow the standard definitions for HTTP success and error codes. For information on special error code interpretation applicable to a given web service request, see the documentation for each API request.
If the HTTP status indicates a Method Not Allowed (405) error, the document that is returned by the CA Automation Point web service request is an XML document named AllowedMethods. That XML document is defined by the AllowedMethods.xsd schema.
If the HTTP status indicates an error other than Method Not Allowed, the document returned by the CA Automation Point web service request is an XML document named WSResult. That XML document is defined by the WSResult.xsd schema. The WSResult document contains detailed error codes and descriptive text about the cause of the error.
An exception to this behavior is the HTTP HEAD method. The HTTP specification states that the HEAD method only returns HTTP headers and must not return a body. Thus, HEAD will not return a WSResult document after an error. Use the HTTP status value in the header to detect an error. A HEAD operation can be issued against any CA Automation Point URI that accepts a GET operation. Because it returns no body, HEAD has limited value and thus is not documented in this guide. One possible use of HEAD would be to implement a heartbeat check of an CA Automation Point server. A heartbeat check only requires an indication of success or failure.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|