Integration Platform Technologies: Siebel Enterprise Application Integration > Web Services >

About SOAP Fault Schema Support


Service-Oriented Architecture (SOA) applications typically use Web services to expose functionality. The application describes a Web service through a WSDL document that is published. This WSDL document carries information about the input and output schema for each operation.

A client that invokes the Web service can use this WSDL document to determine the format of the request and response messages. Request and response messages are in SOAP format.

Siebel Business Applications consume external Web services by processing the WSDL document and creating proxy business services. These proxy business services send requests to the external application and receive responses in a SOAP format. The responses are presented to the caller as Siebel property sets.

The WSDL document can optionally give a list of named faults (and their schema) that can occur for each operation. If an application error occurs, then the SOAP Fault element is used to capture it. The SOAP Fault element in the SOAP response body defines the following four subelements:

  • faultcode. Identifies the fault.
  • faultstring. Displays text that describes the fault.
  • faultactor. Indicates the source of the fault.
  • detail. Encodes application-specific errors.

The following WSDL example, which shows named faults, is from

http://www.gridlab.org:

  <?xml version="1.0" encoding="UTF-8"?>

  <definitions name="MyService" targetNamespace="urn:myuri:1.0"

xmlns:tns="urn:myuri:1.0"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="urn:myuri:1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>

  <schema targetNamespace="urn:myuri:1.0"

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="urn:myuri:1.0"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">

<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

<!-- fault element -->
<element name="MyFirstException">

  <complexType>

<sequence>

  <element name="text" type="xsd:string" minOccurs="1" maxOccurs="1"
  nillable="false"/>

</sequence>

  </complexType>

</element>

<!-- fault element -->
<element name="MySecondException">

  <complexType>

<sequence>

  <element name="number" type="xsd:int" minOccurs="1" maxOccurs="1"/>

</sequence>

  </complexType>

</element>

<!-- operation request element -->
<element name="myOperation">

  <complexType>

<sequence>

  <element name="myInput" type="xsd:string" minOccurs="0" maxOccurs="1"
  nillable="true"/>

</sequence>

  </complexType>

</element>

<!-- operation response element -->
<element name="myOperationResponse">

  <complexType>

<sequence>

  <element name="myOutput" type="xsd:string" minOccurs="0" maxOccurs="1"
  nillable="true"/>

</sequence>

  </complexType>

</element>

  </schema>

</types>

<message name="myOperationRequest">

<part name="parameters" element="ns1:myOperation"/>

</message>

<message name="myOperationResponse">

<part name="parameters" element="ns1:myOperationResponse"/>

</message>

<message name="MyFirstExceptionFault">

<part name="fault" element="ns1:MyFirstException"/>

</message>

<message name="MySecondExceptionFault">

<part name="fault" element="ns1:MySecondException"/>

</message>

<portType name="MyType">

  <operation name="myOperation">

<documentation>Service definition of function ns1__myOperation</documentation>

<input message="tns:myOperationRequest"/>

<output message="tns:myOperationResponse"/>

<fault name="MyFirstException" message="tns:MyFirstExceptionFault"/>

<fault name="MySecondException" message="tns:MySecondExceptionFault"/>

  </operation>

</portType>

<binding name="MyService" type="tns:MyType">

  <SOAP:binding style="document"
  transport="http://schemas.xmlsoap.org/soap/http"/>

  <operation name="myOperation">

<SOAP:operation soapAction=""/>

<input>

<SOAP:body use="literal"/>

</input>

<output>

<SOAP:body use="literal"/>

</output>

<fault name="MyFirstException">

<SOAP:fault name="MyFirstException" use="literal"/>

</fault>

<fault name="MySecondException">

<SOAP:fault name="MySecondException" use="literal"/>

</fault>

  </operation>

</binding>

<service name="MyService">

  <documentation>gSOAP 2.7.1 generated service definition</documentation>

  <port name="MyService" binding="tns:MyService">

<SOAP:address location="http://localhost:10000"/>

  </port>

</service>

  </definitions>

The following SOAP message shows the first named fault from the example WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="urn:myuri:1.0">

  <SOAP-ENV:Body>

<SOAP-ENV:Fault>

  <faultcode>SOAP-ENV:Client</faultcode>

  <faultstring>Deliberately thrown exception.</faultstring>

  <detail>

<ns1:MyFirstException>

  <text>Input values are wrong.</text>

</ns1:MyFirstException>

  </detail>

</SOAP-ENV:Fault>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

For more information on fault handling in Web services, see the SOAP and WSDL standards listed in Supported Web Services Standards.

Integration Platform Technologies: Siebel Enterprise Application Integration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.