Thursday, October 3, 2019

12c SOA - Invoke Post Rest SOA service from another SOA composite using REST adapter

Here i will show you how to invoke post rest soa service from another SOA composite using REST adapter.In my previous post, i have created the following expose post rest service. In this blog, i will use this service WADL.
Service WADL:
https://hostname:8001/soa-infra/resources/POC/LoopInBPELProject!1.0/RestService/application.wadl

Implementation:
Create XSD for the synchronous BPEL process
XSD:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cust.abc"
            targetNamespace="http://www.cust.abc" elementFormDefault="qualified">
  <xsd:element name="CustomersReq">
    <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="ID" type="xsd:string"/>
              <xsd:element name="Name" type="xsd:string"/>
              <xsd:element name="Address" type="xsd:string"/>
            </xsd:sequence>
          </xsd:complexType>
  </xsd:element>
   <xsd:element name="CustomersRes">
    <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Outcome" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

Drag a rest adapter in the external references swim lane and provide Name, Type as Reference and checked the Reference will be invoked by components using WSDL interface option
  Click on Configuration shortcut plus sign to add the wadl service.
  Put the WADL in the selection and press enter key
 It has parsed the WADL and fetched all the required resource path and operation details.
 Check for Localize external references.
 Rest adapter is ready. wire the components.
 In the BPEL, Assign the input and output to/from to rest adpater.
 Test from EM console.



No comments:

Post a Comment

Featured Post

OIC - Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent

Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent When configuring the stage fi...