Oracle Web Services On Demand Guide > Best Practices for Designing Client Application > Best Practices for Integration Design >

Error Handling and Logging


Error handling and logging are essential when developing a client application. The client application must provide for:

  • Logging of detailed information about the error observed.
  • Logging of the body and header information of all SOAP requests and responses. For the resolution of some errors, the actual SOAP request can be extremely useful in identifying the root cause of a problem. For more information, see Logging of SOAP Requests and Responses.
  • A call stack, which can be extremely important when analyzing problems and can provide useful hints that might reveal contributing factors to the problem.
  • Entry points wrapped in log messages. The ability to identify entry and exit of Web service calls is important when analyzing issues.
  • If a Web service request returns an error, the ability to analyze the result, stop immediately, or continue depending on the severity of the issue reported.
  • End points that are not hard-coded.
  • Dynamic server name and protocol configuration

To handle the errors, a client application needs to be able to understand the SOAP fault that is returned in the SOAP response when an error is encountered in processing a Web service request.

For information about SOAP faults and error codes returned by Oracle CRM On Demand, see Oracle Web Services On Demand Troubleshooting Guide.

Logging of SOAP Requests and Responses

SOAP requests and SOAP responses are important information that can assist you in troubleshooting your integration when issues arise, as they capture exactly what was sent to and received from Oracle CRM On Demand. Logging the requests and responses can also help you better understand your integration.

It is a best practice and strongly recommended that your integration logs any SOAP request sent to Oracle CRM On Demand Web Services and any SOAP response received for easier troubleshooting of your integration. It is also beneficial to log the SOAP requests and responses when an issue arises that requires a service request to be created by technical support. The logs with the SOAP requests and responses can help the Oracle CRM On Demand team with reproducing and identifying the issue.

There are different ways in which you can log SOAP requests and responses, for example:

  • Depending on the technology that you use to implement your client application, your client application can output the SOAP requests and responses to log files when they are sent and received in the application. For example, with Java API for XML Web Services (JAX-WS) this can be done by implementing SOAP message handlers. With ASP.NET it can be implemented by using the SOAP extensions framework.
  • You can use proxies to record any HTTP traffic between the client and Oracle CRM On Demand.
Oracle Web Services On Demand Guide, Version 21.0 (Oracle CRM On Demand Release 33) Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.