Unlock new patterns of integration by controlling the HTTP Response status in OIC REST based integrations by Anuj Kaushal

image

Integration flows with a REST based trigger can be called using any HTTP client. In this blog post we illustrate how an integration developer can control the HTTP response code from within the integration flow and how doing so can unlock interesting patterns of integration.

By default, REST based integration flows return the following HTTP response status:

-       HTTP 200 (OK) in case of success

-       HTTP 202 (Accepted) in case of Asynchronous flows.

-       HTTP 4xx in case of client side errors like calling the integration flow with the wrong method or URL etc.

-       HHTP 5xx or user-defined in case of failures during the integration flow but with a fixed error format.

The integration developer needs to assign the HTTP response status code from the mapper as follows: This option provides a number of possibilities to integration developers, few applications of which are:

1.     Return a redirect (3xx) code.

-       There exist several re-direct codes that have specific meaning. For instance method forwarding is usually performed by some clients only when the status code is 307. While in some cases a POST is always redirected as a GET (PRG) to avoid double posts. When a web form is submitted to a server through an HTTP POST request, attempts to refresh the server response can cause the contents of the original POST to be resubmitted, possibly causing undesired results, such as a duplicate insert. Read the complete article here.

PaaS Partner Community

For regular information on Oracle PaaS become a member in the PaaS (Integration & Process) Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook clip_image002[8][4][2][2][2] Wiki

Technorati Tags: SOA Community,Oracle SOA,Oracle BPM,OPN,Jürgen Kress

About Jürgen Kress
As a middleware expert Jürgen works at Oracle EMEA Alliances and Channels, responsible for Oracle’s EMEA Fusion Middleware partner business. He is the founder of the Oracle SOA & BPM and the WebLogic Partner Communities and the global Oracle Partner Advisory Councils. With more than 5000 members from all over the world the Middleware Partner Community is the most successful and active community at Oracle. Jürgen manages the community with monthly newsletters, webcasts and conferences. He hosts his annual Fusion Middleware Partner Community Forums and the Fusion Middleware Summer Camps, where more than 200 partners get product updates, roadmap insights and hands-on trainings. Supplemented by many web 2.0 tools like twitter, discussion forums, online communities, blogs and wikis. For the SOA & Cloud Symposium by Thomas Erl, Jürgen is a member of the steering board. He is also a frequent speaker at conferences like the SOA & BPM Integration Days, JAX, UKOUG, OUGN, or OOP.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: