Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Sample Code with SOAP Messages for OpenEdge Web Services : Receiving a SOAP fault message
 

Receiving a SOAP fault message

The following sample SOAP fault shows the response to a request sent for an object (OrderInfo) of a disabled Web service:

Sample SOAP fault for disabled Web service

<?xml version="1.0" encoding="UTF-8" ?>
<soap:Envelope namespaces defined here…>
  <soap:Body>
    <soap:Fault>
      <faultcode>SOAP-ENV:Server</faultcode>
      <faultstring>An error was detected ... request. (10893) </faultstring>
      <detail>
        <FaultDetail ... >
          <errorMessage>The urn:OrderSvc:OrderInfo service is unavailable
                        (10921)</errorMessage>
          <requestID> 2e62cab6b81150d5:-17c6a3c:f1dffbd11b:-8000#1f
          </requestID>
        </FaultDetail>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
Caution: When exiting the program in response to a SOAP fault, you must release all Web service objects you created in the program.
Note: SOAP fault messages conform to SOAP 1.1.
The contents of the highlighted SOAP elements include some of the key components of the fault message, containing such error information as a general error code (<faultcode>) and message (<faultstring>). These elements are followed by more detailed information, including the message indicating a more precise cause for the error (<errorMessage>), and a unique identifier for the request that returned the error (<requestID>). The contents of the <detail> element is defined in the WSDL Types section. For more information on handling errors, including SOAP fault messages generated for WSA-managed Web services, see Testing and Debugging OpenEdge SOAP Web Services.