About Oracle Database Adapter Use Cases

The Oracle Database Adapter can be used in scenarios such as the following.

Defining Fault Mapping in Orchestrated Integrations with the Oracle Database Adapter

You can define fault mappings in integrations that include the Oracle Database Adapter. This mapping transforms an Oracle Database Adapter fault when used as a target into the source format defined in its WSDL. You add the Oracle Database Adapter to a scope action in an orchestrated integration and select this fault in the Fault Handler part of the scope action.

Assume an exception (for example, NumberFormatException) occurs in an invoke (outbound) Oracle Database Adapter. Exceptions are mapped in fault mappings and returned to the source format as defined in its WSDL contract. In this use case, a stored procedure is used that accepts only an integer type. If you invoke the Oracle Database Adapter by passing a noninteger value, Oracle Integration Cloud Service reports the fault back to you.

To define fault mapping:

  1. Create connections for the SOAP Adapter and Oracle Database Adapter.
  2. Create an orchestrated integration.
  3. Drag the SOAP Adapter into the integration canvas as a trigger.
    The Adapter Endpoint Configuration wizard is displayed.
  4. Configure the SOAP Adapter (for this example, named s1).
  5. From the Actions palette, drag a Scope action below the SOAP Adapter.
  6. From the Invokes palette, drag the Oracle Database Adapter inside the scope.
    Description of db_fault_hanlder1.png follows
    Description of the illustration db_fault_hanlder1.png
    The Adapter Endpoint Configuration wizard is displayed.
  7. Select an operation to invoke any stored procedure that accepts only an integer as the input parameter (for this example, the adapter is named db1).
  8. Define mappings for the Oracle Database Adapter.
    Description of db_fault_hanlder2.png follows
    Description of the illustration db_fault_hanlder2.png
  9. In the integration canvas, click Reposition and move the s1 map inside the scope.
  10. Define mappings for s1.
    Description of db_fault_hanlder3.png follows
    Description of the illustration db_fault_hanlder3.png
  11. Click the Fault Handler part and select Oracle Database : serviceInvocationError db1.
    Description of db_fault_hanlder4.png follows
    Description of the illustration db_fault_hanlder4.png
  12. From the Actions palette, drag a Fault Return action inside the Fault Handler part.
  13. Define fault mappings.
    Description of db_fault_hanlder5.png follows
    Description of the illustration db_fault_hanlder5.png
    The root element for the fault is serviceInvocationError. The fault includes other elements that carry the fault details: type, title, detail, errorCode, and remedialAction. The detail element carries information about the fault cause. The remedialAction element suggests the action to fix the fault.
  14. From the Actions menu menu, select Tracking and define the tracking field.
  15. Activate and invoke the integration by passing a string value (that is, a noninteger value) from the SOAP UI.

    The fault response returns information similar to the following:

    <nstrgmpr:code>XSD object conversion error</nstrgmpr:code>
      <nstrgmpr:message>An error occurred while parsing XML representing a Java object.</nstrgmpr:message>
    <nstrgmpr:severity>Unable to convert the XSD element DATA_IN whose SQL type is INTEGER and JDBC type is INTEGER. Cause: java.lang.NumberFormatException: For input string: "test"</nstrgmpr:severity>
    <nstrgmpr:message>Check to ensure that the XML data describing the object matches the definition of the element in the XSD.</nstrgmpr:message>
    <nstrgmpr:detail xsi:type="nstrgmpr:ServiceErrorMessage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>