Tampilkan postingan dengan label SOAP Adapter. Tampilkan semua postingan
Tampilkan postingan dengan label SOAP Adapter. Tampilkan semua postingan

Sabtu, 25 November 2017

Create an Integration in ICS to expose SOAP service

In this blog, we'll demonstrate how we can use Integration Cloud Service to expose SOAP service. In one of my blog we have showcased how to expose REST services.

In this blog, we will create an Orchestrated integration that will be exposed as a SOAP service.

Use Case
  • Develop a SOAP service using ICS
  • Request parameter would be a user id
  • Response would be username
  • Service will return fault if user not found
Below are the steps to achieve the use case
  1. Create DB Connection
  2. Create SOAP Connection
  3. Create Orchestrated Integration
  4. Test SOAP service
Let's go ahead and achieve all the steps one by one
  1. Create DB Connection: DB connection will work as a Target point. Please check the blog how to create DB connection.
  2. Create SOAP Connection: SOAP connection will work as a Trigger point. Please check the blog how to create SOAP connection.
  3. Create Orchestrated Integration: Create an Orchestration integration using below steps:
  • Click on Create button from Integration page and select Orchestration pattern from the dialog box
  • Enter Below information and click on Create button
    • Select Application event or business object radio button
    • Enter Integration Name in What do you want to call your integration text box
    • An Identifier would be picked up automatically from Integration name, however, we can update this
    • Let the Version as it is
    • Enter the description in What does this integration do box
    • Leave the package box as it is
  • Drag SOAP_Conn on the canvas from the SOAP connection
  • Complete the SOAP wizard with some clicks Next -> Next -> Next -> Next - > Done. Once the SOAP wizard is complete, integration will look like below
  • Drag Test_DB_Conn on the canvas from the DB connection just below the Map GetUserName

  •  Enter the endpoint name and select Run a SQL Statement from What operation do you want to perform drop down then click Next

  • Enter below query then click Validate SQL Query button. Click Next  -> Done button to complete the configuration wizard

select name from xx_employee_t where id=#userId


  • Edit GetUserDetails map and map id -> userId

  • Now let's check if a user exists or not. To do so, drop the Switch activity below the DB adapter and configure if action. Put the condition, username is not blank
  • Drop the map activity in the if block and map, name -> name
  • Drop the Fault Return activity under the otherwise. A mapper will get automatically added between the otherwise and Fault Return
  • Edit the newly added mapper and you will notice that fault object that was in the WSDL will be shown automatically. Put the expression 'User doesn't exist' in the reason
Now the integration is complete. Activate the integration that will provide one WSDL once the integration is activated successfully.

Let's test the integration using SOAP UI tool.

TEST-1 : Send valid id, hit the request and notice the valid response

TEST-2 : Send invalid id, hit the request and notice fault will occur



Create Connection using external WSDL in Oracle Integration Cloud Service

Let's assume we have some custom WSDL and want to use this WSDL in Oracle Integration Cloud Service.

ICS provides SOAP adapter that allows us to create SOAP connection with the WSDL that is locally saved in our desktop.

Let's deep dive and see how to use the existing WSDL.

Create a SOAP connection with below steps:
  • Click Create button from the Connection page
  • Search SOAP and Select SOAP adapter
  • Enter below information and click on Create button
    • Name: Any meaningful name of your choice
    • Identifier: Identifier would be picked up automatically from the Name however we can update this
    • Role: Select Trigger and Invoke
    • Description: Optional description
  • Click on Configure Connectivity button
  • From the opened Connection properties dialog box, select the checkbox corresponding to WSDL URL and upload the WSDL


<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="urn:EmployeeWSDL" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:EmployeeWSDL"
             xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:weo="http://www.example.org">
  <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org"
            targetNamespace="http://www.example.org" elementFormDefault="qualified">
  <xsd:element name="request">
    <xsd:annotation>
      <xsd:documentation>A sample element</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="id" type="xsd:integer"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="response">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="name" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="fault">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="error" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
  </types>
  <portType name="EmpServicePort">
    <operation name="requestOperation">
      <input message="tns:EmpServicePort_request"/>
      <output message="tns:EmpServicePort_response"/>
      <fault name="EmpFault" message="tns:EmpSeriveFault"/>     
    </operation>
  </portType>
  <message name="EmpServicePort_request">
    <part name="part" element="weo:request"/>
  </message>
  <message name="EmpServicePort_response">
    <part name="part" element="weo:response"/>
  </message>
  <message name="EmpSeriveFault">
    <part name="part" element="weo:fault"/>
  </message> 
</definitions>
  • Once uploaded click on OK button
  • Click on Configure Security button then enter ICS credentials and click on OK button

  • Click Test button from upper corner then click Validate and Test button
  • If WSDL is valid then connection will reach to 100%

Now we can use this SOAP connection as a Trigger point in the ICS integration to expose SOAP service.

Rabu, 13 September 2017

SOAP adapter in Oracle Integration Cloud Service

Simple Object Access Protocol(SOAP) adapter in one of the powerful adapter provided by Oracle Integration Cloud Service(ICS). The SOAP adapter can consume any external SOAP API in an ICS.

Service can be passed as payload to an external SOAP endpoint by the SOAP Adapter. Any response received from the endpoint can be sent to the next action in the integration for further processing.

Capabilities of SOAP Adapter


SOAP Adapter as a trigger
  • Supports only HTTPS protocol-based SOAP endpoints for accepting incoming SOAP requests.
  • Supports following securities policies:
    • HTTP Basic Authentication
    • WS-Username token-based authentication
    • Security Assertion Markup Language (SAML)
  • Supports following exchange pattern:
    • Synchronous request/response
    • One-way request
    • Asynchronous request with callback support
  • Supports accessing of standard and custom SOAP/HTTP header properties present in the incoming SOAP request and making them available as part of an Oracle ICS message for any processing in subsequent actions

SOAP Adapter as a invoke
  • Supports invocation of an HTTPS protocol-based external SOAP endpoint, thereby encrypting the communications using transport layer security (TLS)
  • Supports invocation of HTTP protocol-based SOAP endpoints
  • Allows invocation of external SOAP endpoints that are unprotected and protected using HTTP Basic Authentication and WS-Username token-based authentication.
  • Supports following TLS versions:
    • TLS v1
    • TLS v1.1
    • TLS v1.2
  • Supports configuration of standard and custom SOAP/HTTP header
  • Supports invocation of external SOAP endpoints that implement the following message exchange patterns: 
    • Synchronous request/response
    • Oneway request
    • Asynchronous request with callback support
Let's see how to create a SOAP connection in Oracle Integration Cloud Service.

SOAP Connection as a trigger
  • Login into the Oracle ICS
  • Select Connection tile from home page and select Create button from upper right side corner
  • Search SOAP and Select SOAP adapter

  • Enter below information and click Create button
    • Enter Name
    • Identifier would be automatically picked up based on name entered however we can edit it.
    • Select Role as Trigger
    • Enter Description

  • Click on Configure Connectivity button, enter following information and click on OK button:
    • WSDL URL: Enter WSDL URL or select WSDL from local computer by selecting the Upload File checkbox
    • Suppress insertion of timestamp into request(Optional)


  • Click on Configure Security button and choose any one of the following:
    • Basic Authentication: Basic authentication is used in HTTP where user name and password will be encoded and passed with the request as a HTTP header
    • Username Password Token: Secure webservices using WS-Security username/password authentication mechanism that is a simple mechanism to secure services. It enforces user to provide Username Token security header in the SOAP requests.
    • No Security Policy: If don't want to secure your service.
    • Security Assertion Markup Language(SAML)
See difference between Basic Authentication and User Name Password Token policy here

Let's select Basic Authentication and move forward

  • Select Test button from upper right corner. If all the details are correct then we will see the connection is successful and progress bar will reach to 100%

  • Select Save & Close button from upper right corner
SOAP Connection as a invoke
  • Login into the Oracle ICS
  • Select Connection tile from home page and select Create button from upper right side corner
  • Search SOAP and Select SOAP adapter
  • Enter below information and click Create button
    • Enter Name
    • Identifier would be automatically picked up based on name entered however we can edit it.
    • Select Role as Invoke
    • Enter Description
  • Click on Configure Connectivity button and enter following information
    • WSDL URL: Enter WSDL URL
    • Select TLS version(Optional)
    • Suppress insertion of timestamp into request(Optional)
    • Ignore timestamp in the response message(Optional)
    • Enable two way SSL for outbound connection(Optional)
    • Identify keystore alias name(Optional)

  • Click on Configure Security button and choose any one of the following depending on how external SOAP service is secured
    • Basic Authentication
    • Username Password Token
    • No Security Policy:If external service is not secured
As external service is secured via Username Password Token policy so select the Username Password Token and enter User Name and Password to authenticate the service


  • If the external service is deployed on premise environment then select Agent. In my case service is on cloud so don't require to select Agent.
  • Select Test button from upper right corner. If all the details are correct then we will see the connection is successful and progress bar will reach to 100%
  • Select Save & Close button from upper right corner