
Web Services API Reference July 2006 29
PayPal Web Services API Architecture
SOAP Implementation
Error Responses
If a request is malformed or some other error, the body of the SOAP response contains an
<Errors> element with other elements that can help you troubleshoot the cause of the error.
The most important of these additional elements are as follows:
z ShortMessage
z LongMessage
z ErrorCode
For a description of the contents of these elements, see Appendix A, “Error Codes and
Messages for All PayPal APIs.”
The following example shows the error response if your API username and password do not
match a legitimate API username and password on file with PayPal.
EXAMPLE 2.1 Example of SOAP Error Response: Bad Username or Password
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope details not shown>
<SOAP-ENV:Header>
.
. details not shown
.
</SOAP-ENV:Header>
<SOAP-ENV:Body id="_0">
T
ABLE 2.6 Annotation of Generic SOAP Response
Lines Comment
22 and 31 The specific_api_name_Response start and end elements.
23 Each API response contains a timestamp with its date and time in UTC/GMT.
24 The
<Ack> element contains the string Success after the corresponding request has been
successfully processed. (For a complete list of possible returned strings, see
“AbstractResponseType” on page 36.)
In the case of errors, Ack is set to a value other than
Success, and the response body contains an
<Errors> element with information to help you troubleshoot the cause of the error. See “Error
Responses” on page 29
.
26 The
<CorrelationID> element contains information about the PayPal application that
processed the request.
27 through
30
The different PayPal APIs return different structures depending on their response definitions. For
detailed information, see the description of the individual APIs.
N
OTE: Because a field is defined in the formal structure of an API response does not mean that
that field is necessarily returned. Data are returned in a response only if PayPal has
recorded data that corresponds to the field.
Comentarios a estos manuales