WS-Addressing callback interception using Service Bus by Jeroen Ninck

 clip_image002

Maarten Smeets posted a nice article describing asynchronous interaction in BPEL and BPM using WS-Addressing and correlation sets. I wanted to use Service Bus 12c to force the callback to go through a Service Bus proxy instead of going directly to the consumer. This can be useful when the target service should not have the ability to call services outsite of its trusted domain or network.

All sources can be found in my GitHub repository.

WS-Addressing

WS-Addressing provides a way for message routing and correlation using SOAP headers. It is an official specification. Service Bus, SOA Suite, JAX-WS and quite a lot of other frameworks and tools support it one way or the other. There are two versions of WS-Addressing: 200508 and 200408.

In an synchronous interaction the following headers are important:

  • Request:
    • ReplyTo
    • MessageId
  • Callback:
    • RelatesTo

In the request the ReplyTo specifies the address where the reply must be send to (or http://www.w3.org/2005/08/addressing/anonymous if no reply address is specified). The MessageId headers contains a unique id which can be used to to correlate the request to a future callback. In the callback the RelatesTo header contains the original MessageId. There are others headers for example Action which are important, but for creating an asynchronous interaction ReplyTo, MessageId and RelatesTo are all that are required.

SOA Suite 11g and 12c support WS-Addressing (don’t mention SOA Suite 10g…) and provide out of the box correlation support. Using BPEL no code is required to use WS-Addressing for correlation (both as consumer and as producer).

Test scenario

A SOA composite will implement an asynchronous webservice (a fire & forget request followed by a future fire & forget callback). It will be exposed using a Service Bus project which will ‘hide’ the implementation for the outside world. For example the SOA composite might be running in a local domain, while the Service Bus project migt be running in a SOA CS cloud instance. This will allow to SOA composite to only receive traffic from ‘trusted’ networks and the Service Bus will handle all security.

This will be the test setup, where SoapUI will play the external consumer: Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

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

Cloud Adapter SDK – Part 2: Functionality by Jeroen Ninck

clip_image002

 

Introduction

So this is part 2 of a series of blog post describing building a Cloud Adapter for MongoDB. In this part I want to discuss the functionality I want to achieve.

I will use Windows 10 and PowerShell (my favourite Windows shell!) for these blogs. All sources can be found on GitHub.

Parts:

Just a small warning: Always keep track of Oracle license information and the Oracle certification matrix!

What should it do?

MongoDB has a lot of features we might want to expose in the Cloud Adapter. However I want to start relative simple and I might expend the functionality in the feature. So I want to start with inserting data. A second step will be to find the data by querying it.

MongoDB

MongoDB is a NoSQL database and stores documents. These documents are basically JSON documents (actually BSON):

{
                    "_id" : ObjectId("56fa75781f1378215c215709"),
                    "field1" : "value1"
}

Basically there are no foreign keys. Of course you refer to other documents, however these is no foreign key like in a relational database. Each document does have a primary key called _id (which is of type ObjectId). A document is stored in a collection and a MongoDB database can have multiple collections. A single instance of MongoDB can host multiple databases. Read the complete article here.

SOA & BPM Partner Community

For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center.

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