Wednesday, November 27, 2019

OIC - SOAP Trigger type connection creation

Objective: Create a one way WSDL based SOAP trigger connection

XSD used:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://org.cognizant.com/Employees/v1.0"
            targetNamespace="http://org.cognizant.com/Employees/v1.0" elementFormDefault="qualified">
  <xsd:element name="Employees">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Employee" type="EmployeeType" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:complexType name="EmployeeType">
    <xsd:sequence>
      <xsd:element name="EMPLOYEE_ID" type="xsd:int"/>
      <xsd:element name="FIRST_NAME" type="xsd:string"/>
      <xsd:element name="LAST_NAME" type="xsd:string"/>
      <xsd:element name="AGE" type="xsd:int"/>
      <xsd:element name="DEPARTMENT_NAME" type="xsd:string"/>
      <xsd:element name="DEPARTMENT_ID" type="xsd:string"/>
      <xsd:element name="COUNTRY" type="xsd:string"/>
      <xsd:element name="SALARY" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>
WSDL used:
<wsdl:definitions name="Employees" targetNamespace="http://org.cognizant.com/Employees/wsdl/v1.0"
                  xmlns:tns="http://org.cognizant.com/Employees/wsdl/v1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:top="http://org.cognizant.com/Employees/v1.0">
  <wsdl:types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://org.cognizant.com/Employees/v1.0" schemaLocation="Employees.xsd"/>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="InsertEmployeesRequest_msg">
    <wsdl:part name="parameters" element="top:Employees"/>
  </wsdl:message>
  <wsdl:portType name="InsertEmployees_ptt">
    <wsdl:operation name="insert">
      <wsdl:input message="tns:InsertEmployeesRequest_msg"/>
    </wsdl:operation>
  </wsdl:portType>

</wsdl:definitions>

Implementation steps:
Designer⇾Connections⇾Create
 Select SOAP

 Provide Name and Role
 Click Configure Connectivity
 Select Upload file checkbox and upload the WSDL and XSD in zip




 Select Service WSDL
 Click Configure Security
 Select Basic Authentication

 Test and Save




OIC - Publish to OIC and Subscribe to OIC

Usecase: Here, I will show you how to publish a SOAP meesge to a OIC inbuilt JMS topic and then subscribe message from that topic.

Publish to OIC:
Designer⇾Integrations⇾Create
 Select Publish to OIC Style
 Provide Name and description
 Pulish canvas opened
 Drag and Drop the Trigger SOAP connection. Click here oic-soap-trigger-type-connection for steps.

Provide Endpoint Name and Function details.
Next
Next
Next

Use the Tracking field


Publish to OIC is ready
Subscribe to OIC:
Create
Select Subscribe to OIC Style
Provide Name and Description
Select the Publish integration.

Select the DB connection
Here I choose "Perform an Operation On a Table"
Select Table


Create a Map
Mapping done for each employee

Publish and Subscribe are ready. Just activate



Open the publish WSDL in SOAPUI
Add New basic Authorization

Test


Notes:
  1. The messages are pushed to JMS topic that means one published message can be subscribed by more than one subscriber.
  2. Suppose we have more than one subcriber and one or couple of subscribes are down, then if we publish any messgae that will be lossed permanently for those inactive subscribers. This is really a reliability concern while using a PUB SUB model in OIC.

Tuesday, November 26, 2019

OIC - Tracking an Instance

Go to Monitoring⇾Tracking⇾Track Instances
 Open one instance
 Right side corner⇾Action ⇾we can see view audit trails,activity stream,View Errors etc.
 Audit Trail
View Error(sample)

If we set the input payload checkbox while activating the integration, we can also track all input payloads in this section(view activity stream and audit trails sections).

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...