Friday 1 May 2009

UDDI lookup based dynamic routing Oracle ESB

Intro

There is a scenario when a service request comes into the ESB (Enterprise Service Bus) and we need to look at the payload and determine which endpoint to route this service.

There are two ways

1) Look up in DB or XML file to dynamic route to a business service

2) End point lookup in UDDI and route message


End point lookup in UDDI and route message



Step 1

Create WSDL, that contains information based on which we can look up endpoints example version, brand country etc- not going into details :)

Step 2

Create proxy service for WSDL in step 1

Create Business service, based on end service implementation, its wsdl might be similar to step 1 sans added info to help us do routing

Create proxy service for UDDI Inquiry service.

Step 3

Retrieve routing information from message using XPath

Service calls out to get_serviceDetails or if one needs to find business first one can do it. Retrieve access point from response message via XPath

Step 4

Route to business service

Edit routing option for outgoing message, change url to access point retrieved in step 3 and voila

No comments: