NonStop SOAP User's Manual
Customizing the SOAP Server
NonStop SOAP User’s Manual—520501-012
8-45
Customized Fault Reporting and Error or Status
Logging
Customized Fault Reporting and Error or 
Status Logging
NonStop SOAP lets you customize fault reporting and error logging in methods that 
you customize.
Fault Reporting
NonStop SOAP reports faults to SOAP clients, as described in SOAP Faults on 
page 4-64 and Fault Messages on page 6-46. If you wish to report additional faults, set 
the SOAP fault object sf as follows:
sf->setFaultCode("code");
sf->setFaultString("string");
sf->setDetailCode(-nnn);
sf->DetailString(message);
where
code
is a fault code, such as “SOAP-ENV:Client”. The SOAP specifications includes 
conventions for fault codes.
string
is a fault string of your choice, for example “Error while unmarshaling the XML 
document”. 
nnn
is a number greater than 2000. (Numbers less than 2000 could conflict with 
NonStop SOAP detail codes.)
message
is a message of your choice, enclosed in quotation marks or a character buffer 
(char *). 
Writing to Error Log and Trace Files
You can log error messages to the NonStop SOAP error log and trace file, or only to 
the trace file. 
To log a message to the log and the trace file, call this static function:
TdmSoapUtils::logAll(
message
);
where 
message
 is a message of your choice, enclosed in quotation marks or a 
character buffer (char *). 










