Wednesday, 11 January 2017

Enable CORS in the Oracle Service bus

Enabling CORS(Cross Origin Resource Sharing) is one of the primary requirement when we are playing with multiple environments and want to access service from the different environment.

Considering, we have a OSB service that is deployed in one environment(Oracle Cloud) and want to access this service outside from the Oracle cloud environment, let's say share point environment.

To achieve this, We have to send the Access-Control-Allow-Origin header in the service response.

Drop the Transport Header Component from the component pallet in the response Pipeline with the below property:

That's it!


  1. Hi Ankur. According with Doc ID 2210010.1, Oracle Service Bus does not support CORS.

    1. yes. we spoke to Oracle and they are saying the OSB does not support CORS. How did you get it to work?

  2. Are you able to successfully call this from any clinet?

    1. Yes Hari. We have consumed the OSB service in Sharepoint.


  3. Hello ANkur,
    Thank you for the post.

    I have requirement, where I have to pass CROSS ORIGIN to call the AJAX page. I have used transport header and set "Access-Control-Allow-Origin" = '*' . While testing from POSTMAN plugin, i can see all the values passed in transport header but when we test from application, it is giving below error :

    " No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access. The response had HTTP status code 404."

    OSB version:

    Service: REST

    Using transport header in response pipeline.

    Direction: Inbound response

    Any help/suggestion is highly appreciated.

  4. Thanks dude it worked after soo much research !!!!

    1. You just need to add it in your response pipeline thats it. They same way in the screenshot

  5. The 'Access-Control-Allow-Origin' header is not in the list that is in the "name" field. What I did is to flag the "Copy all" because I found that the 'Access-Control-Allow-Origin' header is in the response but not being sent to the clien