oracle web service manager 11 · oracle web service manager 11g interop with wls ws-secuirty (in...

95
Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development Manager Oracle Corporation

Upload: others

Post on 24-Feb-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March 2012

Step-by-Step Instruction Guide

Author Prakash Yamuna Senior Development Manager

Oracle Corporation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 2

Table of Contents Use Case 5

Description 5

Objective 5

Scenario 5

Policies Used 6

Software Requirements 7

Prerequisites 7

Verified Product Version 7

Potentially Applies to Product Version(s) 7

Download Main Page 7

Product URLs 7

Install Locations 7

Topology 8

Install amp Topology Verification 8

Verify all Product Consoles are reachable 8

Step by Step Instructions 10

Create HelloWorld WLS POJO JAX-WS 10

Create Application ldquoHelloWorldApprdquo 10

Create Project ldquoHelloWorldrdquo 11

Create a POJO Java Class ldquoHelloWorldrdquo 12

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo 15

Create Web Service from HelloWorld POJO Class 15

Attach Weblogic WS-Security Policies to the HelloWorld Web Service 21

Deploy HelloWorld Web Service 22

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 3

Create WAR 22

Deploy HelloWorldApp-HelloWorld-context-rootwar 25

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed 28

Validate Web Service 29

Create the HelloWorldClient Web App 30

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo 32

Create ldquoHelloWorldServicerdquo Web Service Proxy 36

Invoke the HelloWorld Web Service from the HelloWorldClientServlet 41

Attach OWSM Client Policy to the HelloWorldClientServlet 43

Setup KeyStore amp WLS Security Configuration 45

Create Keystore using keytool 45

Validate content of keystore 46

Create truststore using keytool 47

Export the certificates from the default-keystorejks 47

Import the certificates into default-truststorejks 47

Validate the contents of the default-truststorejks 48

Copy Keystore amp Truststore 48

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore created above 49

Change SSL to use the Custom Identity and Custom Trust 54

Create Web Service Security Configuration 55

Edit ldquowss-username-configrdquo 58

Use the ldquowss-username-configrdquo in the HelloWorld Service 78

Setup OWSM KeyStore amp Credential Store 78

Configure jps-configxml to use default-keystorejks using EM 78

Validate the necessary credentials for Keystore access has been created using EM 82

Create the credentials ldquomycredsrdquo using EM 83

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 4

Deploy the HelloWorldClient Web App 84

Create Custom Deployment Settings 84

Create helloworldclient WAR 88

Deploy the helloworldclientwar 89

Testing 90

Positive testing 90

Negative testing 90

Delete Credential ldquomycredsrdquo using EM 90

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 5

Use Case

Description

Objective

Provide a detailed step by step instruction for enabling interoperability between OWSM and WLS WS-Security for

username token with message protection scenario

Scenario

This How-To illustrates the following

1 How to Build a HelloWorld WLS POJO JAX-WS 2 How to secure the HelloWorld WLS POJO JAX-WS with WLS WS-Security using username token with message

protection 3 Deploy the HelloWorld WLS POJO JAX-WS 4 How to Build a HelloWorld Client Web App that will invoke the HelloWorld WLS POJO JAX-WS 5 How to secure the HelloWorld Client Web App with OWSM security 6 Setup the Keystore and WLS WS-Security Configuration required for WLS WS-Security 7 Setup the Keystore and Credential Store required for OWSM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 2: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 2

Table of Contents Use Case 5

Description 5

Objective 5

Scenario 5

Policies Used 6

Software Requirements 7

Prerequisites 7

Verified Product Version 7

Potentially Applies to Product Version(s) 7

Download Main Page 7

Product URLs 7

Install Locations 7

Topology 8

Install amp Topology Verification 8

Verify all Product Consoles are reachable 8

Step by Step Instructions 10

Create HelloWorld WLS POJO JAX-WS 10

Create Application ldquoHelloWorldApprdquo 10

Create Project ldquoHelloWorldrdquo 11

Create a POJO Java Class ldquoHelloWorldrdquo 12

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo 15

Create Web Service from HelloWorld POJO Class 15

Attach Weblogic WS-Security Policies to the HelloWorld Web Service 21

Deploy HelloWorld Web Service 22

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 3

Create WAR 22

Deploy HelloWorldApp-HelloWorld-context-rootwar 25

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed 28

Validate Web Service 29

Create the HelloWorldClient Web App 30

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo 32

Create ldquoHelloWorldServicerdquo Web Service Proxy 36

Invoke the HelloWorld Web Service from the HelloWorldClientServlet 41

Attach OWSM Client Policy to the HelloWorldClientServlet 43

Setup KeyStore amp WLS Security Configuration 45

Create Keystore using keytool 45

Validate content of keystore 46

Create truststore using keytool 47

Export the certificates from the default-keystorejks 47

Import the certificates into default-truststorejks 47

Validate the contents of the default-truststorejks 48

Copy Keystore amp Truststore 48

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore created above 49

Change SSL to use the Custom Identity and Custom Trust 54

Create Web Service Security Configuration 55

Edit ldquowss-username-configrdquo 58

Use the ldquowss-username-configrdquo in the HelloWorld Service 78

Setup OWSM KeyStore amp Credential Store 78

Configure jps-configxml to use default-keystorejks using EM 78

Validate the necessary credentials for Keystore access has been created using EM 82

Create the credentials ldquomycredsrdquo using EM 83

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 4

Deploy the HelloWorldClient Web App 84

Create Custom Deployment Settings 84

Create helloworldclient WAR 88

Deploy the helloworldclientwar 89

Testing 90

Positive testing 90

Negative testing 90

Delete Credential ldquomycredsrdquo using EM 90

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 5

Use Case

Description

Objective

Provide a detailed step by step instruction for enabling interoperability between OWSM and WLS WS-Security for

username token with message protection scenario

Scenario

This How-To illustrates the following

1 How to Build a HelloWorld WLS POJO JAX-WS 2 How to secure the HelloWorld WLS POJO JAX-WS with WLS WS-Security using username token with message

protection 3 Deploy the HelloWorld WLS POJO JAX-WS 4 How to Build a HelloWorld Client Web App that will invoke the HelloWorld WLS POJO JAX-WS 5 How to secure the HelloWorld Client Web App with OWSM security 6 Setup the Keystore and WLS WS-Security Configuration required for WLS WS-Security 7 Setup the Keystore and Credential Store required for OWSM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 3: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 3

Create WAR 22

Deploy HelloWorldApp-HelloWorld-context-rootwar 25

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed 28

Validate Web Service 29

Create the HelloWorldClient Web App 30

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo 32

Create ldquoHelloWorldServicerdquo Web Service Proxy 36

Invoke the HelloWorld Web Service from the HelloWorldClientServlet 41

Attach OWSM Client Policy to the HelloWorldClientServlet 43

Setup KeyStore amp WLS Security Configuration 45

Create Keystore using keytool 45

Validate content of keystore 46

Create truststore using keytool 47

Export the certificates from the default-keystorejks 47

Import the certificates into default-truststorejks 47

Validate the contents of the default-truststorejks 48

Copy Keystore amp Truststore 48

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore created above 49

Change SSL to use the Custom Identity and Custom Trust 54

Create Web Service Security Configuration 55

Edit ldquowss-username-configrdquo 58

Use the ldquowss-username-configrdquo in the HelloWorld Service 78

Setup OWSM KeyStore amp Credential Store 78

Configure jps-configxml to use default-keystorejks using EM 78

Validate the necessary credentials for Keystore access has been created using EM 82

Create the credentials ldquomycredsrdquo using EM 83

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 4

Deploy the HelloWorldClient Web App 84

Create Custom Deployment Settings 84

Create helloworldclient WAR 88

Deploy the helloworldclientwar 89

Testing 90

Positive testing 90

Negative testing 90

Delete Credential ldquomycredsrdquo using EM 90

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 5

Use Case

Description

Objective

Provide a detailed step by step instruction for enabling interoperability between OWSM and WLS WS-Security for

username token with message protection scenario

Scenario

This How-To illustrates the following

1 How to Build a HelloWorld WLS POJO JAX-WS 2 How to secure the HelloWorld WLS POJO JAX-WS with WLS WS-Security using username token with message

protection 3 Deploy the HelloWorld WLS POJO JAX-WS 4 How to Build a HelloWorld Client Web App that will invoke the HelloWorld WLS POJO JAX-WS 5 How to secure the HelloWorld Client Web App with OWSM security 6 Setup the Keystore and WLS WS-Security Configuration required for WLS WS-Security 7 Setup the Keystore and Credential Store required for OWSM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 4: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 4

Deploy the HelloWorldClient Web App 84

Create Custom Deployment Settings 84

Create helloworldclient WAR 88

Deploy the helloworldclientwar 89

Testing 90

Positive testing 90

Negative testing 90

Delete Credential ldquomycredsrdquo using EM 90

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 5

Use Case

Description

Objective

Provide a detailed step by step instruction for enabling interoperability between OWSM and WLS WS-Security for

username token with message protection scenario

Scenario

This How-To illustrates the following

1 How to Build a HelloWorld WLS POJO JAX-WS 2 How to secure the HelloWorld WLS POJO JAX-WS with WLS WS-Security using username token with message

protection 3 Deploy the HelloWorld WLS POJO JAX-WS 4 How to Build a HelloWorld Client Web App that will invoke the HelloWorld WLS POJO JAX-WS 5 How to secure the HelloWorld Client Web App with OWSM security 6 Setup the Keystore and WLS WS-Security Configuration required for WLS WS-Security 7 Setup the Keystore and Credential Store required for OWSM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 5: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 5

Use Case

Description

Objective

Provide a detailed step by step instruction for enabling interoperability between OWSM and WLS WS-Security for

username token with message protection scenario

Scenario

This How-To illustrates the following

1 How to Build a HelloWorld WLS POJO JAX-WS 2 How to secure the HelloWorld WLS POJO JAX-WS with WLS WS-Security using username token with message

protection 3 Deploy the HelloWorld WLS POJO JAX-WS 4 How to Build a HelloWorld Client Web App that will invoke the HelloWorld WLS POJO JAX-WS 5 How to secure the HelloWorld Client Web App with OWSM security 6 Setup the Keystore and WLS WS-Security Configuration required for WLS WS-Security 7 Setup the Keystore and Credential Store required for OWSM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 6: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 6

Policies Used

ServiceClient Policy Policy

Type

JEE Client oraclewss11_username_token_with_message_protection_client_policy Client

Hello World Client

JEE App

JDeveloper

bull Policy Attachment

bull Override Config

bull Find Matching Policy

SOAP HTTP

Enterprise Manager

bull Policy Authoring

bull Versioning

bull Usage Tracking

bull Violation Metrics

bull Migration

HelloWorld

Web Service

OWSM Agent WLS WS-Security

oraclewss11_username_token_with

_message_protection_client_policy

Wssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml

Wssp12-2007-SignBodyxml

Wssp12-2007-EncryptBodyxml

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 7: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 7

Software Requirements

Prerequisites

Product Download URL

1 Install SOA Suite 11115 with

JDeveloper

Verified Product Version

Product Release Version

1 WebLogic 1035

2 SOA 11115

3 JDeveloper 11115

Potentially Applies to Product Version(s)

Product Release Version

1 WebLogic 1033 1034 1035 1036

2 SOA 11114 11115 11116

Download Main Page

httpwwworaclecomtechnetworkmiddlewaresoasuitedownloadsindexhtml

Product URLs

Product URL LoginPassword

EM Fusion Middle Control httpadmin_hostadmin_portem User weblogic

Password welcome1

Weblogic Console httpadmin_hostadmin_portconsole User weblogic

Password welcome1

Install Locations

This How-To does not provide installation instructions for the pre-requisite components Please consult the appropriate Install guides The components in this How-To are installed at the following locations

Component Install location

Oracle Weblogic 11g PS4 DOracle11gR1Middlewarewlserver_103

Oracle Web Services Manager (OWSM) 11g PS4

DOracle11gR1Middlewareoracle_common

Oracle SOA Suite (SOA) 11g PS4 DOracle11gR1MiddlewareOracle_SOA1

Oracle Enterprise Manager (EM) 11g PS4 DOracle11gR1Middlewareoracle_common

JDeveloper DOracle11gR1Middlewarejdeveloper

JDK DOracle11gR1Middlewarejdk160_24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 8: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 8

Topology

This How-To uses a single domain The domain includes a one weblogic server The steps provided in this How-To can

vary based on Topology

Domain Name soa_domain

Weblogic Server AdminServer

Install amp Topology Verification

Start the Admin Server Navigate to DOracle11gR1Middlewareuser_projectsdomainssoa_domainbin

Verify all Product Consoles are reachable

Go to the product console URL and provide username as weblogic and password as welcome1

Product URL Note

Oracle WebLogic httplocalhost7001console

WebLogic Administration Console

Oracle Web Services Manager (OWSM)

httplocalhost7001wsm-pm

Indicates status of OWSM Policy Manager Presence of this page indicates that the Policy Manager has started

httplocalhost7001wsm-pmvalidator

Show you all the out-of-the-box

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 9: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 9

policy If you see that page OWSM policy store is properly deployed and running

Oracle SOA Suite (SOA) httplocalhost7001soa-infra

List all deployed SOA Composites Also has a test console to test the SOA Composite

Oracle Enterprise Manager (EM)

httplocalhost7001em Oracle Enterprise Manager

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 10: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 10

Step by Step Instructions

Create HelloWorld WLS POJO JAX-WS

Create Application ldquoHelloWorldApprdquo

Click on File-gtNew to start creation of the HelloWorld App in JDeveloper

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 11: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 11

Create Project ldquoHelloWorldrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 12: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 12

Create a POJO Java Class ldquoHelloWorldrdquo

Right Click on HelloWorld project and select ldquoNewrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 13: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 13

Select ldquoJava Classrdquo and click ldquoOKrdquo button as shown below

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 14: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 14

Enter the name of the Java class as ldquoHelloWorldrdquo and click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 15: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 15

Add method ldquohellordquo to the Java Class ldquoHelloWorldrdquo

Create Web Service from HelloWorld POJO Class

Right Click on the HelloWorld class and click on ldquoCreate Web Servicerdquo

public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 16: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 16

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 17: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 17

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 18: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 18

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 19: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 19

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 20: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 20

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 21: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 21

Attach Weblogic WS-Security Policies to the HelloWorld Web Service

You can attach Weblogic WS-Security Policies using the Policy and Policies annotation

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 22: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 22

The final class looks as follows

Deploy HelloWorld Web Service

Create WAR

Right Click on the HelloWorld project Select ldquoDeployrdquo item from the menu

package hello import javaxjwsWebMethod import javaxjwsWebService import weblogicjwsPolicies import weblogicjwsPolicy WebService Policy(uri=policyWssp12-2007-Wss11-UsernameToken-Plain-EncryptedKey-Basic128xml) public class HelloWorld public HelloWorld() super() WebMethod Policies( Policy(uri=policyWssp12-2007-SignBodyxml) Policy(uri=policyWssp12-2007-EncryptBodyxml)) public String hello(String str) return Hello + str

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 23: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 23

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 24: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 24

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 25: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 25

Deploy HelloWorldApp-HelloWorld-context-rootwar

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 26: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 26

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 27: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 27

Click on ldquoFinishrdquo to complete the deployment

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 28: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 28

Validate HelloWorldApp-HelloWorld-context-rootwar successfully deployed

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 29: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 29

Validate Web Service

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 30: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 30

Create the HelloWorldClient Web App

Click on File-gtNew to start creating a new Application

Select JSP and Servlets as the ldquoProject Technologiesrdquo for the project and click on ldquoNextrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 31: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 31

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 32: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 32

Create a HTTP Servlet ldquoHelloWorldClientServletrdquo

Right Click on the HelloWorldClient Project and click on ldquoNewrdquo menu item

Select ldquoServletsrdquo and Select ldquoHTTP Servletrdquo and click on ldquoOKrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 33: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 33

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 34: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 34

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 35: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 35

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 36: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 36

Create ldquoHelloWorldServicerdquo Web Service Proxy

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 37: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 37

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 38: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 38

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 39: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 39

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 40: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 40

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 41: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 41

Invoke the HelloWorld Web Service from the HelloWorldClientServlet

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 42: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 42

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 43: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 43

Make the following modifications to the generated code in the HelloWorldClientServlet

Attach OWSM Client Policy to the HelloWorldClientServlet

HelloWorldService helloWorldService = new HelloWorldService() HelloWorld helloWorld = null try helloWorld = helloWorldServicegetHelloWorldPort() outprintln(ltpgtCalling Web Service+ helloWorldhello(HelloWorldClient app calling) +ltpgt) outprintln(ltbodygtlthtmlgt) outclose() finally outclose() ((javaioCloseable)helloWorld)close()

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 44: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 44

Make the following code changes to attach the OWSM Client Policy

SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] new SecurityPolicyFeature(policyoraclewss11_username_token_with_message_protection_client_policy) try helloWorld = helloWorldServicegetHelloWorldPort(securityFeature) ((BindingProvider) helloWorld)getRequestContext()put(SecurityConstantsClientConstantsWSS_CSF_KEY mycreds)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 45: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 45

Setup KeyStore amp WLS Security Configuration

Create Keystore using keytool

We will create a keystore using keytool The keystore will be called default-keystorejks We will use the alias orakey and

oratest

Note All passwords will be welcome1 (keystore truststore passwords and alias passwords)

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 46: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 46

Validate content of keystore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 47: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 47

Create truststore using keytool

Export the certificates from the default-keystorejks

Import the certificates into default-truststorejks

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 48: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 48

Validate the contents of the default-truststorejks

Copy Keystore amp Truststore

Copy the keystore amp truststore to the $MW_HOMEuser_projectsdomainssoa_domainconfigfmwconfig

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 49: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 49

Change WLS Keystore Configuration to use the Cusom Keystore and Truststore

created above

Login into WLS Console

Click on ldquoServersrdquo under Environment on the Left Hand Navigation

Click on ldquoAdminServerrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 50: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 50

Click on the ldquoKeystorerdquo tab Click on ldquoChangerdquo button to change the keystore and truststore

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 51: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 51

Select ldquoCustom Identity and Custom Trustrdquo option and click on ldquoSaverdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 52: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 52

Enter the following values in the Custom Identity and Custom Trust page and click on ldquoSaverdquo button

Key Value

Custom Identity Keystore

DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-keystorejks

Custom Identity Keystore Type

Jks

Custom Identity Keystore Passphrase

welcome1

Confirm Custom Identity Keystore Passphrase

welcome1

Custom Trust Keystore DOracle11gR1Middlewareuser_projectsdomainssoa_domainconfigfmwconfigdefault-truststorejks

Custom Trust Keystore Type

Jks

Custom Trust Keystore Passphrase

welcome1

Confirm Custom Trust Keystore Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 53: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 53

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 54: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 54

Change SSL to use the Custom Identity and Custom Trust

Enter the following values in the SSL configuration page

Key Value

Private Key Alias orakey

Private Key Passphrase welcome1

Confirm Private Key Passphrase

welcome1

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 55: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 55

Create Web Service Security Configuration

Click on ldquosoa_domainrdquo under the Domain Structure on the Left Hand Tree

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 56: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 56

Click on ldquoWeb Service Securityrdquo tab on the Right hand side

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 57: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 57

Click on the ldquoNewrdquo button to create new web service security configuration

Provide the following value ldquowss-username-configrdquo and then click on ldquoOKrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 58: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 58

Edit ldquowss-username-configrdquo

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 59: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 59

Click on the ldquoCredential Providerrdquo tab to create Credential providers

Create Credential Provider

Enter the following values

Key Value

Name Username

Class Name weblogicwseesecuritybstServerBSTCredentialProvider

Token Type X509

Click on ldquoFinishrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 60: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 60

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 61: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 61

Create Credential Provider Properties

Create ConfidentialityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 62: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 62

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 63: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 63

Create ConfidentialityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 64: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 64

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 65: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 65

Create ConfidentialityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 66: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 66

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 67: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 67

Create ConfidentialityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 68: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 68

Create IntegrityKeyStore Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 69: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 69

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 70: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 70

Create IntegrityKeyStorePassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 71: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 71

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 72: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 72

Create IntegrityKeyAlias Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 73: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 73

Create IntegrityKeyPassword Credential Provider Property

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 74: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 74

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 75: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 75

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 76: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 76

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 77: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 77

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 78: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 78

Use the ldquowss-username-configrdquo in the HelloWorld Service

Redeploy the app as described in section 3

Setup OWSM KeyStore amp Credential Store

For the purposes of this How-To we will use the same default-keystorejks created in section 0

Configure jps-configxml to use default-keystorejks using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 79: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 79

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 80: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 80

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 81: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 81

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 82: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 82

Validate the necessary credentials for Keystore access has been created using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 83: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 83

Create the credentials ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 84: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 84

Deploy the HelloWorldClient Web App

Create Custom Deployment Settings

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 85: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 85

Select ldquoUse Custom Settingsrdquo and Click on ldquoCustomize Settingsrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 86: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 86

Click on ldquoNewrdquo button

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 87: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 87

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 88: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 88

Create helloworldclient WAR

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 89: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 89

Deploy the helloworldclientwar

Deploy the helloworldclientwar via Weblogic Console The steps are similar to those described in section 0

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 90: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 90

Testing

Positive testing

Negative testing

Just to make sure things are working as we would expect Delete the ldquomycredsrdquo from the Credential Store using EM

Delete Credential ldquomycredsrdquo using EM

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 91: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 91

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 92: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 92

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 93: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 93

Restart the server

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 94: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 94

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109

Page 95: Oracle Web Service Manager 11 · Oracle Web Service Manager 11g Interop with WLS WS-Secuirty (in WLS) March, 2012 Step-by-Step Instruction Guide Author: Prakash Yamuna Senior Development

Interop with WLS WS-Security in WLS using Oracle Web Services Manager 11g

Oracle Corporation | Interop with WLS WS-Security | Version 10 95

Oracle Web Services Manager

December 2011

Author Anand Kothari

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores CA 94065

USA

Worldwide Inquiries

Phone +16505067000

Fax +16505067200

oraclecom

Copyright copy 2011 Oracle andor its affiliates All rights reserved This document is provided for

information purposes only and the contents hereof are subject to change without notice This

document is not warranted to be error-free nor subject to any other warranties or conditions whether

expressed orally or implied in law including implied warranties and conditions of merchantability or

fitness for a particular purpose We specifically disclaim any liability with respect to this document and

no contractual obligations are formed either directly or indirectly by this document This document may

not be reproduced or transmitted in any form or by any means electronic or mechanical for any

purpose without our prior written permission

Oracle is a registered trademark of Oracle Corporation andor its affiliates Other names may be

trademarks of their respective owners

0109