Selasa, 17 Januari 2017

Consume Secure SOAP service in OSB

In this blog, we will call a secured webservice by adding an OWSM client policy to a business service.

For this we will create a Business service that will use the WSDL provided by any client.

Let's see through an example.

1) Create a Service Bus application with Service Bus project

2) Right click on the Right Swim lane, Insert Transport -> Http



3) Choose WSDL Radio button, enter the WSDL URL and click OK


4) Click Next

5) Click Finish

6) Click Next

 7) Click Finish


Business Service is ready. Let's Run the business service and see what happened.


You will get the Security requirement exception.

Let's add the client policy to the Business Service.

8) Open the Business Service, Move to the Policies tab, Choose the From OWSM Policy Store option, Click + sign from Security section and add oracle/wss_username_client_policy from the popup and click OK




Now add the Credentials Map from the em console

9) Login into the em(http://localhost:7001/em) console. Right Click on Domain Name -> Security -> Credentials


10) Click on Create Map button



11) Enter Map Name as oracle.wsm.security. Enter the exact name else you may get error.


 12) Select the created map and click on the Create Key button


 13) Enter the information and click OK


csf-key(secure-key) has been created successfully


Let's add this csf-key to the business service.

Open the business service again, move to the Policies tab -> Security section, select the added policy and click Edit button. Add the csf-key(secure-key) and click OK


Note: csf-key should be the same that you have created from the em console.

Configuration is done. Let's run the service and see the output.

It's done !!



Tidak ada komentar:

Posting Komentar