soap-fault.h File Reference

Go to the source code of this file.

Defines

#define SOAP_FAULT_VERSION_MISMATCH   0
#define SOAP_FAULT_MUST_UNDERSTAND   1
#define SOAP_FAULT_DATA_ENCODING_UNKOWN   2
#define SOAP_FAULT_RECEIVER   4
#define SOAP_FAULT_SENDER   3

Functions

xmlDocPtr soap_fault_build (int fault_code, const char *fault_string, const char *fault_actor, const char *detail)


Detailed Description

The SOAP Fault element is used to carry error and/or status information within a SOAP message. If present, the SOAP Fault element MUST appear as a body entry and MUST NOT appear more than once within a Body element.

The SOAP Fault element defines the following four subelements:

# faultcode - The faultcode element is intended for use by software to provide an algorithmic mechanism for identifying the fault. The faultcode MUST be present in a SOAP Fault element and the faultcode value MUST be a qualified name as defined in "Namespaces in XML", section 3. SOAP defines a small set of SOAP fault codes covering basic SOAP faults (see section 4.4.1). # faultstring - The faultstring element is intended to provide a human readable explanation of the fault and is not intended for algorithmic processing. The faultstring element is similar to the 'Reason-Phrase' defined by HTTP (see RFC2616, section 6.1). It MUST be present in a SOAP Fault element and SHOULD provide at least some information explaining the nature of the fault. # faultactor - The faultactor element is intended to provide information about who caused the fault to happen within the message path (see section 2). It is similar to the SOAP actor attribute (see section 4.2.2) but instead of indicating the destination of the header entry, it indicates the source of the fault. The value of the faultactor attribute is a URI identifying the source. Applications that do not act as the ultimate destination of the SOAP message MUST include the faultactor element in a SOAP Fault element. The ultimate destination of a message MAY use the faultactor element to indicate explicitly that it generated the fault (see also the detail element below). # detail - The detail element is intended for carrying application specific error information related to the Body element. It MUST be present if the contents of the Body element could not be successfully processed. It MUST NOT be used to carry information about error information belonging to header entries. Detailed error information belonging to header entries MUST be carried within header entries.

Author:
F. Ayaz
Version:
Revision
1.7

Definition in file soap-fault.h.


Define Documentation

#define SOAP_FAULT_DATA_ENCODING_UNKOWN   2
 

A SOAP header block or SOAP body child element information item targeted at the faulting SOAP node is scoped (see 5.1.1 SOAP encodingStyle Attribute) with a data encoding that the faulting node does not support.

Definition at line 96 of file soap-fault.h.

Referenced by soap_fault_build().

#define SOAP_FAULT_MUST_UNDERSTAND   1
 

An immediate child element information item of the SOAP Header element information item targeted at the faulting node that was not understood by the faulting node contained a SOAP mustUnderstand attribute information item with a value of "true" (see 5.2.3 SOAP mustUnderstand Attribute and 5.4.8 SOAP mustUnderstand Faults)

Definition at line 87 of file soap-fault.h.

Referenced by soap_fault_build().

#define SOAP_FAULT_RECEIVER   4
 

The message could not be processed for reasons attributable to the processing of the message rather than to the contents of the message itself. For example, processing could include communicating with an upstream SOAP node, which did not respond. The message could succeed if resent at a later point in time (see also 5.4 SOAP Fault for a description of the SOAP fault detail sub-element).

Definition at line 107 of file soap-fault.h.

Referenced by soap_fault_build().

#define SOAP_FAULT_SENDER   3
 

The message was incorrectly formed or did not contain the appropriate information in order to succeed. For example, the message could lack the proper authentication or payment information. It is generally an indication that the message is not to be resent without change (see also 5.4 SOAP Fault for a description of the SOAP fault detail sub-element).

Definition at line 118 of file soap-fault.h.

Referenced by soap_fault_build().

#define SOAP_FAULT_VERSION_MISMATCH   0
 

The faulting node found an invalid element information item instead of the expected Envelope element information item. The namespace, local name or both did not match the Envelope element information item required by this recommendation (see 2.8 SOAP Versioning Model and 5.4.7 VersionMismatch Faults)

Definition at line 76 of file soap-fault.h.

Referenced by soap_fault_build().


Function Documentation

xmlDocPtr soap_fault_build int  fault_code,
const char *  fault_string,
const char *  fault_actor,
const char *  detail
 

Definition at line 85 of file soap-fault.c.

References _SOAP_FAULT_TEMPLATE_, log_error1, log_error2, log_verbose1, log_verbose2, soap_fault_build(), SOAP_FAULT_DATA_ENCODING_UNKOWN, SOAP_FAULT_MUST_UNDERSTAND, SOAP_FAULT_RECEIVER, SOAP_FAULT_SENDER, SOAP_FAULT_VERSION_MISMATCH, and soap_server_get_name().

Referenced by soap_env_new_with_fault(), and soap_fault_build().


Generated on Thu Jan 25 23:36:04 2007 for csoap by  doxygen 1.4.6