Invoking an HTTP Basic secured web service

In this recipe, we will consume a web service protected by HTTP Basic authentication.

How to do it...

Create a reference to the web service that is protected by HTTP Basic authentication. Ensure that you have created a credential key that can be used to identify the requestor.

  1. Configure WS Policy.

    Right-click on the reference that requires HTTP Basic authentication, and select Configure WS Policies....

    How to do it...
  2. Attach the HTTP token client policy. In the SOA Client WS Policies dialog, click on the plus (How to do it...) icon next to Security. Choose oracle/wss_http_token_client_policy and click on OK.
    How to do it...
  3. Configure the HTTP token client policy. Select the policy in the SOA Client WS Policies dialog and then click on the pencil (How to do it...) icon to bring up the Config Override Properties dialog.
    How to do it...

    Set the csf-key property to be the name of the credential key, previously created, by entering the name into the Override Value field. Click on OK to set the value of the key.

  4. Finally, in the Configure SOA WS Policies dialog, click on OK to apply the policy to the reference.
    How to do it...

How it works...

After attaching the policy to the outbound endpoint (reference), we needed to identify the particular set of credentials that we need to use. We did this by pointing to a set of credentials we previously created in the credential store.

The entry in the credential store can be re-used across multiple references in the same or different composites.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.32.222