BPEL Component as a REST SERVICE(using HTTP Adapter)
Task: To expose a SOA Component (a BPEL Service Here ) as a REST (HTTP based) service using HTTP Binding Adapter
- Open A new Empty SOA Project.
- Go to Composite.xml->Drop the HTTPBinding Adapter from component pallet @ the left to to the Exposed Services Swimlane at the LeftHandSide
- Follow the below screen shot to configure & complete the HTTP Binding Wizard.
- You may use any schema for configuring the request and response Message structure withing the HTTPBinding .BPELProcess1.xsd<?xml version="1.0" encoding="UTF-8"?><schema attributeFormDefault="unqualified"elementFormDefault="qualified"targetNamespace="http://xmlns.oracle.com/Application1/Project1/BPELProcess1"xmlns="http://www.w3.org/2001/XMLSchema"><element name="process"><complexType><sequence><element name="input" type="string"/></sequence></complexType></element><element name="processResponse"><complexType><sequence><element name="result" type="string"/></sequence></complexType></element></schema>
- Step 1,Step2 and Step3 for HTTP Binding Wizard
- Note:In HTTP Binding wizard Step 4:Verb and Payload-Type can be manipulated by manually edited in the composite.xml later and
Once The Adapter is configure for being exposed as a service.,
- Drop an empty BPEL Process in the component area.
- Open the BPEL and complete the desired flow using a receive and reply activity witha desired transformation between these .
To make available all the HTTP Methods for the service both GET and POST , composite so that HTTP Bindings comes with its default behavior remove the properties that appear in composite
So that once deployed the composite , you have the blow shown methods available for invocation.
No comments:
Post a Comment