Enter your keyword

post

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!

Some Toughts (11)

  1. added on 7 Apr, 2017
    Reply

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

  2. added on 8 Dec, 2017
    Reply

    Are you able to successfully call this from any clinet?

  3. added on 8 Dec, 2017
    Reply

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

    Regards,
    Ankur

  4. added on 23 Feb, 2018
    Reply

    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 'http://10.3.4.15' is therefore not allowed access. The response had HTTP status code 404."

    OSB version: 12.2.1.0

    Service: REST

    Using transport header in response pipeline.

    Direction: Inbound response

    Any help/suggestion is highly appreciated.

  5. added on 9 Mar, 2018
    Reply

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

  6. added on 24 Oct, 2018
    Reply

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

  7. added on 21 Nov, 2018
    Reply

    Can u tell me how u did it?

  8. added on 19 Mar, 2019
    Reply

    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

  9. added on 1 Apr, 2019
    Reply

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

  10. added on 14 May, 2019
    Reply

    How this can be work ??

  11. added on 10 Jun, 2019
    Reply

    Just work with GET verb! OSB don't have options verb!

Leave a Reply

Your email address will not be published.