Thursday, 1 January 2015

Changing Endpoint in Business service in OSB

Before we start thinking of the ways available to achieve this task. We need to think the cases where exactly it’s required.

1.     As per environment, where the service is getting deployed we need to change endpoint url of the business service. (Static and well planned)
2.     As per the input from user we need to call the Business service dynamically with the same service contract. (Dynamic)
3.     Business service which belongs to external vendor has suddenly changed the URL, we need to accommodate the change ASAP. (Static and adhoc)

In my opinion the solution will also vary as per the use case:

For first case: we can write scripts to change the endpoint url in .bz service itself. As Business service URLs will be available as per the environment, while deploying only we can change the url. So that once the service is deployed it will be pointing to correct backend system. This is more generic in terms of implementation.

Also in OSB console, we can generate customize file for the project, which contains all the data which can be configured like endpoint URL. So we can make use of customized file as well to do endpoint configuration for different environments.

For Second Case:  This can be done by using dynamic routing, where the format of the request remains same only the endpoint needs to be decided at the runtime.
Also, we can use routing options, where we can set the targetendpoint url. We can create the targetendpoint url dynamically in xq and then save it in routing options.

For Third Case:  where the URL is static and has been changed for some environment, we can
This can be done by Login to sbconsole and in the Proxy Service Message Flow and click on Edit Route
Select Request Actions and select URI

No comments:

Post a Comment