Configure External Web Services

You can configure an object workflow to send an outbound message to a third-party Web service at a specified endpoint URL. An endpoint URL is an external Web service that receives data from your applications.

The third-party Web service must conform to the service WSDL defined by Oracle.

To build the external Web service, use the OutboundMessageService.wsdl and .xsd files. Then, when defining the outbound message event action for the object workflow, you provide the endpoint URL of the external Web service.

This topic provides the following:

  • How to configure a Web service

  • An example of the OutboundMessageService.wsdl

  • An example of the OutboundMessageService.xsd

  • The security policies available

Configuring a Web Service

To configure a Web service, you must replace the parameters in the OutboundMessageService.xsd file using the Web service instructions.

For more information about Web services, see the SOAP Web Services guide.

  1. For a standard object, search the guide by object name.

    For custom objects, search for the generic Web service for all custom objects in the corresponding application, for example, Sales Custom Business Object.

  2. Extract the .xsd files from the live environment URL using the information provided under the service.

  3. Replace the parameters in OutboundMessageService.xsd with the names for the object of your interest.

    The parameters are marked in the .xsd file as parameters, $OBJECT_TARGET_NAMESPACE$ and $OBJECT_NAME$.

Examples of OutboundMessageService.wsdl and OutboundMessageService.xsd are provided here for reference.

WSDL File Example

This section contains an example of the OutboundMessageService.wsdl, for your reference.


//Sample OutboundMessageService.wsdl 
<wsdl:definitions
     name="OutboundMessageService"
     targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
     xmlns:errors="http://xmlns.oracle.com/adf/svc/errors/"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:types="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
    >
    <wsdl:import namespace="http://xmlns.oracle.com/adf/svc/errors/" location="ServiceException.wsdl"/>
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
                 schemaLocation="OutboundMessageService.xsd"/>
        </schema>
    </wsdl:types>
    <wsdl:message name="OutboundMessageService_processOutboundMessage">
        <wsdl:part name="parameters" element="types:processOutboundMessage"/>
    </wsdl:message>
    <wsdl:message name="OutboundMessageService_processOutboundMessageResponse">
        <wsdl:part name="parameters" element="types:processOutboundMessageResponse"/>
    </wsdl:message>
    <wsdl:portType name="OutboundMessageService">
        <wsdl:documentation/>
        <wsdl:operation name="processOutboundMessage">
            <wsdl:input message="tns:OutboundMessageService_processOutboundMessage"/>
            <wsdl:output message="tns:OutboundMessageService_processOutboundMessageResponse"/>
            <wsdl:fault name="ServiceException" message="errors:ServiceException"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="OutboundMessageServiceSoapHttp" type="tns:OutboundMessageService">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="processOutboundMessage">
            <soap:operation soapAction="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/processOutboundMessage"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="ServiceException">
                <soap:fault name="ServiceException" use="literal" encodingStyle=""/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="OutboundMessageService">
        <wsdl:port name="OutboundMessageServiceSoapHttpPort" binding="tns:OutboundMessageServiceSoapHttp">
            <soap:address location="http://adc2111013:7101/OMInterface/OutboundMessageService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

XSD File Example

This section contains an example of the OutboundMessageService.xsd, for your reference. The parameters are marked in the .xsd file as parameters, $OBJECT_TARGET_NAMESPACE$ and $OBJECT_NAME$.


//Sample: OutboundMessageService.xsd

<schema elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
     xmlns:ns0="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns1="$OBJECT_TARGET_NAMESPACE$"
     xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/" xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
     xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/adf/svc/types/" schemaLocation="BC4JService.xsd"/>
    <import namespace="$OBJECT_TARGET_NAMESPACE$" schemaLocation="$OBJECT_NAME$.xsd"/>
    <import namespace="http://xmlns.oracle.com/adf/svc/errors/" schemaLocation="ServiceException.xsd"/>
    <element name="processOutboundMessage">
        <complexType>
            <sequence>
                <element name="object" type="ns1:$OBJECT_NAME$"/>
            </sequence>
        </complexType>
    </element>
    <element name="processOutboundMessageResponse">
        <complexType>
            <sequence/>
        </complexType>
    </element>
</schema>

Security Policy

The outbound messages can use either an authentication-only client-side security policy or a transport-level security policy that protects the message during transfer. The default authentication-only policy used by object workflow outbound message is oracle/wss10_saml_token_client_policy. This policy includes Security Assertion Markup Language (SAML) tokens in outbound Simple Object Access Protocol (SOAP) request messages. This policy should only be used when the target web service is located within a secure network segment.

The corresponding service can use any compatible service policy, such as oracle/wss10_saml_token_service_policy or oracle/wss_saml_or_username_token_service.

When the service is outside your firewall, you must protect the message by selecting the Protect Message option on the Create Action: Outbound Message page. When protected, the outbound message uses oracle/wss_username_token_over_ssl_client_policy with one-way secure socket layer (SSL) enabled by default. The corresponding service must use a compatible service policy, such as oracle/wss_username_token_over_ssl_service_policy.