Skip Headers
Oracle® Fusion Middleware WebLogic Scripting Tool Command Reference
11g Release 1 (10.3.5)

Part Number E13813-10
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

14 Web Services Custom WLST Commands

The following sections describe the WebLogic Scripting Tool (WLST) commands for Oracle Fusion Middleware Infrastructure Web services, which includes SOA composites, ADF Business Components, and WebCenter services. You can use these commands to manage Web services from the command line.

Topics in this chapter include:

For additional details about using these WLST commands for Web services, see the Security and Administrator's Guide for Web Services.

Note:

To use the Web Services custom WLST commands, you must invoke WLST from the Oracle Common home directory. See "Using Custom WLST Commands" in the Oracle Fusion Middleware Administrator's Guide.

Overview of Web Services WLST Commands

You can use the Web services WLST commands, in online mode, to:

The Web services WLST commands manage deployed, active, and running Web services applications. They can be executed everywhere in WLST online mode, for example:

wls:/domain/serverConfig
wls:/domain/domainRuntime

The Web services WLST configuration and policy management commands perform many of the same management functions that you can complete using Fusion Middleware Control. When using the WLST commands to manage a Web service of an ADF or WebCenter application, you can apply the change only to a Web service deployed in an application on a specific server. If the application is deployed in a cluster or multi-server environment, you need to make the same change to each of the servers to which the application is deployed. Additionally, when you set or change an attached policy in ADF and WebCenter Web service and client applications, you must restart the application for the changes to take effect.

In contrast, if you are using the WLST commands to manage a SOA composite, you only need to issue the command once, and the change is propagated to all the server instances in the composite. When you set or change an attached policy in a SOA composite, you do not need to restart it. The SOA fabric runtime engine internally implements all of the policy management changes.

Specifying Application and Composite Names

The Web service WLST commands configure a Web service for a specific application. Therefore, the application path name has to uniquely identify the application and the server instance to which it is deployed.

Specifying a Web Service Application Name

To specify a Web service application in a WLST command, use the following format:

[/domain/server/]application[#version_number]

Parameters shown in brackets [] are optional. The following examples show the sample format for a Web service application name:

/soainfra/AdminServer/HelloWorld#1_0
/soainfra/server1/HelloWorld#1_0

If there is only one deployed instance of an application in a domain, you may omit the domain/server parameter, as shown in the following example:

HelloWorld#1_0

In all other instances, the domain/server parameter is required. If it is not specified and WLST finds more than one deployment of the same application on different servers in the domain, you are prompted to specify the domain and the server names.

Oracle Infrastructure Web Services client applications are deployed directly to WebLogic Server server instances. Each client application is managed separately. For example, if the application myapp is deployed to both the AdminServer and server1 instances in the domain mydomain, then you need to issue configuration commands to each of the servers using the appropriate application path name:

/mydomain/AdminServer/myapp#1_0
/mydomain/server1/myapp#1_0

Specifying a SOA Composite Name

When there are multiple SOA partition folders in a domain, you must specify the partition name and the composite name using the following format:

partition/composite[version]

The following example shows the sample format for a SOA composite application name:

default/myComposite[1.0]

If there is a single SOA server (non-clustered) and only one SOA partition folder in a domain, you may omit the partition parameter, as shown in the following example:

myComposite[1.0]

Web Services WLST Command Categories

Web services WLST commands are divided into the categories described in Table 14-1.

Table 14-1 Web Services WLST Command Categories

Command Category Definition

Web Service and Client Management Commands

View and manage Web services for the service and client.

Policy Management Commands

View and manage directly-attached policies for the service and client.

Policy Set Management Commands

View and manage globally-available policy sets within repository sessions.

Oracle WSM Repository Management Commands

Manage the Oracle WSM repository with new predefined policies provided in the latest installation of the software, as well as import and export documents into and from the repository.

Deployment Descriptor Migration Commands

Migrate proprietary deployment descriptors for scaling post-deployment policy configuration changes in a cluster or propagating the changes to all server instances of the application in the domain.


Web Service and Client Management Commands

Use the WLST commands listed in Table 14-2 to view and manage Web services for deployed, active, and running Web service applications.

Table 14-2 Web Service and Client Management WLST Commands

Use this command... To... Use with WLST...

listWebServices

List the Web service information for an application, composite, or domain.

Online

listWebServicePorts

List the Web service ports for a Web service application or SOA composite.

Online

listWebServiceConfiguration

List Web services and port configuration for an application or SOA composite.

Online

setWebServiceConfiguration

Set or change the Web service port configuration for a Web service application or SOA composite.

Online

listWebServiceClients

List Web service client information for an application, SOA composite, or domain.

Online

listWebServiceClientPorts

List Web service client ports information for an application or SOA composite.

Online

listWebServiceClientStubProperties

List Web service client port stub properties for an application or SOA composite.

Online

setWebServiceClientStubProperty

Set, change, or delete a single stub property of a Web service client port for an application or SOA composite.

Online

setWebServiceClientStubProperties

Configure the set of stub properties of a Web service client port for an application or SOA composite.

Online


listWebServices

Command Category: Web Service and Client Management

Use with WLST: Online

Description

Lists the Web service information for an application, SOA composite, or domain. If you don't specify a Web service application or a SOA composite, the command lists all services in all applications and composites for every server instance in the domain. You can specify the amount of information to be displayed using the detail argument.

The output is listed by each application deployed as shown in the following example:

/domain/server/application#version_number:
     serviceName=service, moduleType=web, moduleName=helloModule
/soainfra/AdminServer/soa-infra:
     serviceName=service, moduleType=soa, compositeName=default/HelloWorld[1.0]

Note:

The listWebServices command output does not include details on SOA components, including policy attachments.

Syntax

listWebServices (application,composite,[detail])
Argument Definition
application Name and path of the application for which you want to list the Web services. For example, /domain/server/application#version_number

If specified, all Web services in the application are listed.

composite Name of the SOA composite for which you want to list the Web services. For example, default/HelloWorld[1.0]

If specified, all Web services in the composite are listed.

detail Optional. Specifies whether to list port and policy details for the Web service.

Valid values are:

  • true—Output includes details about the service, the port, and the policies.

  • false—Output lists only the services. The default is false.


Examples

The following example lists all the Web services in all applications and composites in the domain. Sample output is also shown in this example.

wls:/soainfra/serverConfig> listWebServices()
/soainfra/AdminServer/soa-infra :
     serviceName=service, moduleType=soa, compositeName=default/HelloWorld[1.0]
     serviceName=bpelprocess1_client_ep, moduleType=soa,
             compositeName=default/Project1[1.0]        
 
/soainfra/AdminServer/HelloWorld#1_0 :
     serviceName=WssUsernameService, moduleType=web, moduleName=j2wbasicPolicy
 
 

The following example sets the detail argument to true. The output from this command provides endpoint (port) and policy details for all applications and composites in the domain, and indicates if the endpoints are secure. Sample output is also shown in this example.

wls:/jrfServer_domain/serverConfig> listWebServices(detail='true')
 
/jrfServer_domain/jrfServer/jaxws-sut-no-policy :
        moduleName=jaxws-service, moduleType=web, serviceName=TestService
        enableTestPage: true
        enableWSDL: true
 
                TestPort        http://host.us.oracle.com:7010/jaxws-service/TestService
                enable: true
                enableREST: false
                enableSOAP: true
                maxRequestSize: -1
                loggingLevel: NULL
                No policies attached; endpoint is not secure.
 
 
/jrfServer_domain/jrfServer/jaxws-sut :
        moduleName=jaxws-sut-service, moduleType=web, serviceName=TestService
        enableTestPage: true
        enableWSDL: true
 
                TestPort        http://host.us.oracle.com:7010/jaxws-sut-service/TestService
                enable: true
                enableREST: false
                enableSOAP: true
                maxRequestSize: -1
                loggingLevel: NULL
                management : oracle/log_policy, enabled=true
                security: oracle/wss_username_token_service_policy, enabled=true
                security: oracle/binding_authorization_denyall_policy, enabled=true
                (global) security: oracle/wss10_message_protection_service_policy, enabled=true
                        /policysets/global/global_app_mess_prot: Application("jaxws-sut")
                Attached policy or policies are valid; endpoint is secure.

listWebServicePorts

Command Category: Web Service and Client Management

Use with WLST: Online

Description

List the Web service port names and the endpoint URLs for a Web service application or SOA composite.

The output will display the port name and endpoint URL of the Web service port. For example:

JRFWssUsernamePort         http://localhost:7001/j2wbasicPolicy/WssUsername

Syntax

listWebServicePorts(application,moduleOrCompName,moduleType,serviceName)
Argument Definition
application Name and path of the application for which you want to list the Web services port information. For example, /domain/server/application#version_number

To list the port information for an application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web services port information.

To list the port information for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with Web modules (including EJB Web services.)

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite for which you want to list the port information.

Example

The following example lists the Web service ports and endpoint URLs for the j2wbasicPolicy service in the soainfra/AdminServer/HelloWorld#1_0 application. Note that the WssUsernameService module name is specified, and the moduleType is set to web.

wls:/soainfra/serverConfig> listWebServicePorts
( '/soainfra/AdminServer/HelloWorld#1_0',
'WssUsernameService','web','j2wbasicPolicy')

JRFWssUsernamePort      http://localhost:7001/j2wbasicPolicy/WssUsername

listWebServiceConfiguration

Command Category: Web Service and Client Management

Use with WLST: Online

Description

List the Web service port configuration for a Web service application or SOA composite.

The output will display the configuration information for the Web service port. For example:

enableREST: false
maxRequestSize: -1

Syntax

listWebServiceConfiguration(application,moduleOrCompName,moduleType,serviceName,
[subjectName])
Argument Definition
application Name and path of the application for which you want to list the Web services port configuration. For example, /domain/server/application#version_number

To list the port configuration for a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web services port configuration.

To list the port configuration for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with Web modules (including EJB Web services.).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite for which you want to list the port configuration.
subjectName Optional. Policy subject, port, or operation for which you want to list configuration information.

Example

The following example lists the Web service and port configuration information for the application HelloWorld#1_0 for the server soa1 in the domain soainfra. In this example, the Web module name is j2wbasicPolicy, the service name is WssUsernameService, and the subject is a port named JRFWssUsernamePort.

wls:/wls-domain/serverConfig>listWebServiceConfiguration
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort')

setWebServiceConfiguration

Command Category: Web Service and Client Management

Use with WLST: Online

Description

Set or change the Web service port configuration for a Web service application or SOA composite.

Additional information about using this command is provided in "Configuring the Web Service Endpoint" in Security and Administrator's Guide for Web Services.

Syntax

setWebServiceConfiguration(application,moduleOrCompName,moduleType,serviceName,
subjectName,itemProperties)
Argument Definition
application Name and path of the application for which you want to set or change the Web services port configuration. For example, /domain/server/application#version_number

To set or change the port configuration for a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to set or change the Web services port configuration.

To set or change the port configuration for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with Web modules (including EJB Web services.).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite for which you want to set or change the port configuration.
subjectName Policy subject, port or operation name for which you want to set or change the configuration information.
itemProperties Configurable properties that you can set or change. Specify the properties using the following format:

("name","value")

Valid port configuration name and value pairs are as follows:

  • enabletrue or false. Default is true.

  • enableTestPagetrue or false. Default is true.

  • enableWSDLtrue or false. Default is true.

  • enableRESTtrue or false. Default is false.

  • maxRequestSize—long integer, -1 for values not set. The default is -1.

  • loggingLevelNULL, FINEST...SEVERE (java.util.logging.Level). The default is NULL.

  • wsat.flowOption—Atomic transaction flow option. Valid values are: NEVER—Do not export transaction coordination context. (This is the default.), SUPPORTS—Export transaction coordination context if transaction is available, MANDATORY—Export transaction coordination context. An exception is thrown if there is no active transaction. This property is valid for SOA services only.

  • wsat.version—Atomic transaction version. Valid values are: WSAT10, WSAT11,WSAT12, and DEFAULT. This property is valid for SOA services only.

For additional information about the atomic transaction properties, see "Configuring Web Services Atomic Transactions" in Security and Administrator's Guide for Web Services.

Note: If any configuration item contains an unrecognized property name or invalid value, this set command is rejected and an error message is displayed.


Example

The following example enables the port JRFWssUsernamePort for the service WssUsernameService in the Web module j2wbasicPolicy. The service is in the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>setWebServiceConfiguration
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort',[("enable", "true")])

listWebServiceClients

Command Category: Web Service and Client Management

Use with WLST: Online

Description

List Web service clients information for an application, SOA composite, or domain. If neither an application nor a composite is specified, the command lists information about all Web service clients in all applications and composites for every server instance in the domain. You can specify the amount of information to be displayed using the optional detail argument.

The output is listed by each application deployed as shown in the following examples:

This example shows the output of an unsecured endpoint:

/soa_domain/soa_server1/soa-infra :        compositeName=default/Basic_SOA_Client[1.0], moduleType=soa, serviceRefName=Service1
                Basic_soa_service_pt    serviceWSDLURI=http://dadvmc0318.us.oracle.com:38001/soa-infra/services/default/Basic_SOA_service/Basic_soa_service.wsdl
                oracle.webservices.contentTransferEncoding=base64
                oracle.webservices.charsetEncoding=UTF-8
                oracle.webservices.operationStyleProperty=document
                wsat.flowOption=WSDLDriven
                oracle.webservices.soapVersion=soap1.1
                oracle.webservices.chunkSize=4096
                oracle.webservices.session.maintain=false
                oracle.webservices.preemptiveBasicAuth=false
                oracle.webservices.encodingStyleProperty=http://schemas.xmlsoap.org/soap/encoding/
                oracle.webservices.donotChunk=true
                No attached policies found; endpoint is not secure.

This example shows the output for secured endpoints:

/soa_domain/soa_server1/AsynchronizedBC_asyncbc :        moduleName=Asychronized-AsynchronizedBC-context-root, moduleType=web, serviceRefName=callback
                owsm.qa.server.serviceinterface.AppModule_asyncServiceImpl/_oracleAsyncResponseClient
                (global) security : oracle/wss_username_token_client_policy, enabled=true
                        /policysets/global/web_callback_add_1 : Module("*")
                Attached policy or policies are valid; endpoint is secure.

 /soa_domain/soa_server1/ADF_DC_4 :        moduleName=wsdl, moduleType=wsconn, serviceRefName=TestService
                TestPort        serviceWSDLURI=http://host.us.oracle.com:12345/jaxws-sut-service/TestService?wsdl
                security : oracle/wss_username_token_client_policy, enabled=true
                Attached policy or policies are valid; endpoint is secure.

                                /soa_domain/AdminServer/adf_dc_to_bc :        moduleName=ADF_BC, moduleType=wsconn, serviceRefName=AppModuleService
                AppModuleServiceSoapHttpPort    serviceWSDLURI=http://host.us.oracle.com:12345/ADF_BC-ADF_BC-context-root/AppModuleService?wsdl
                (global) security : oracle/wss11_username_token_with_message_protection_client_policy, enabled=true
                        /policysets/global/web_reference_add_1 : Domain("soa_domain")
                Attached policy or policies are valid; endpoint is secure.

Syntax

listWebServiceClients(application,composite,[detail])
Argument Definition
application Name and path of the application for which you want to list the Web service clients. For example, /domain/server/application#version_number

If specified, all Web services clients in the application are listed.

composite Name of the SOA composite for which you want to list the Web service clients. For example, default/HelloWorld[1.0]

If specified, all Web service clients in the composite are listed.

detail Optional. Specifies whether to list port and policy details for the Web service clients.

Valid values are:

  • true—Output includes details about the clients, ports, policies, and whether the endpoint is secure or not.

  • false—Output lists only the clients. The default is false.


Examples

The following example lists information for all Web service clients in the domain.

wls:/wls-domain/serverConfig>listWebServiceClients()

The following example lists the Web service clients for the application jwsclient_1#1.10 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>listWebServiceClients('soainfra/soa1/jwsclient_1#1.10')

The following example lists the Web service clients for the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>listWebServiceClients(None,'default/HelloWorld[1.0]')

The following example lists details for all of the Web service clients in the domain.

wls:/wls-domain/serverConfig>listWebServiceClients(None,None,true)

listWebServiceClientPorts

Command Category: Web Service and Client Management

Use with WLST: Online

Description

List the Web service port names and the endpoint URLs for Web service clients in an application or SOA composite.

The output will display the name of the Web service client/reference port. For example:

AppModuleServiceSoapHttpPort

Syntax

listWebServiceClientPorts(application,moduleOrCompName,moduleType,serviceRefName)
Argument Definition
application Name and path of the application for which you want to list the Web services port information. For example, /domain/server/application#version_number

To list the client port information for an application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web service client port information.

To list the client port information for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName Service reference name of the application or SOA composite for which you want to list the Web service client port information.

When the client is an asynchronous Web service callback client, the serviceRefName argument must be set to callback.


Examples

The following example lists the client ports for the WssUsernameClient Web module in the /soainfra/soa1/jwsclient_1#1.1.0 application. Note that the moduleType is set to wsconn, and the serviceRefName is set to WssUsernameClient.

wls:/soainfra/serverConfig> listWebServiceClientPorts
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient')

The following example lists the client ports in the default/HelloWorld[1.0] SOA composite. Note that the moduleType is set to soa, and the serviceRefName is set to client.

wls:/soainfra/serverConfig> listWebServiceClientPorts(None, 'default/HelloWorld[1.0]','soa','client')

listWebServiceClientStubProperties

Command Category: Web Service and Client Management

Use with WLST: Online

Description

List Web service client port stub properties for an application or SOA composite.

Syntax

listWebServiceClientStubProperties(application, moduleOrCompName, moduleType, 
serviceRefName, portInfoName)
Argument Definition
application Name and path of the application for which you want to list the Web services client port stub properties. For example, /domain/server/application#version_number

To list the client port stub properties information for an application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web services client port stub properties.

To list the client port stub properties information for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName Service reference name of the application or SOA composite for which you want to list the Web service client port stub properties.
portInfoName The name of the client port for which you want to list the stub properties.

Example

The following example lists the client port stub properties for the JRFWssUsernamePort port of the WssUsernameClient Web module in the /soainfra/soa1/jwsclient_1#1.1.0 application. Note that the moduleType is set to wsconn, and the serviceRefName is set to WssUsernameClient.

wls:/soainfra/serverConfig>listWebServiceClientStubProperties
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort')

setWebServiceClientStubProperty

Command Category: Web Service and Client Management

Use with WLST: Online

Description

Set, change, or delete a single stub property of a Web service client port for an application or SOA composite.

Syntax

setWebServiceClientStubProperty(application, moduleOrCompName, moduleType, 
serviceRefName,portInfoName,propName,[propValue])
Argument Definition
application Name and path of the application for which you want to set the Web services client port stub property. For example, /domain/server/application#version_number

To set a client port stub property for an application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to set the Web services client port stub property.

To set a client port stub property for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName Service reference name of the application or SOA composite for which you want to set the Web service client port stub property.
portInfoName The name of the client port for which you want to set the stub property.
propName Stub property name that you want to set, change, or delete. For example, 'keystore.recipient.alias' .
propValue Optional. The stub property value, for example 'orakey'.

To remove the property, specify a blank "" value.


Example

The following example sets the client port stub property keystore.recipient.alias to the value oracle for the client port JRFWssUsernamePort. The port is a client port of the WssUsernameClient Web module in the /soainfra/soa1/jwsclient_1#1.1.0 application. Note that the moduleType is set to wsconn, and the serviceRefName is set to WssUsernameClient.

wls:/soainfra/serverConfig>setWebServiceClientStubProperty
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort','keystore.recipient.alias','oracle')

setWebServiceClientStubProperties

Command Category: Web Service and Client Management

Use with WLST: Online

Description

Configure the set of stub properties of a Web service client port for an application or SOA composite.

This command configures or resets all of the stub properties for the Oracle WSM client security policy attached to the client. Each property that you list in the command is set to the value you specify. If a property that was previously set is not explicitly specified in this command, it is reset to the default for the property. If no default exists, the property is removed.

Syntax

setWebServiceClientStubProperties(application, moduleOrCompName, moduleType, 
serviceRefName, portInfoName, properties)
Argument Definition
application Name and path of the application for which you want to reset the Web services client port stub properties. For example, /domain/server/application#version_number

To configure or reset the client port stub properties for an application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to reset the Web services client port stub properties.

To configure or reset client port stub properties for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName Service reference name of the application or SOA composite for which you want to reset the Web service client port stub properties.
portInfoName The name of the client port for which you want to reset the stub properties.
properties The list of properties to be set or changed. Properties must be specified using the following format:

("property","value")

For example:

[("keystore.recipient.alias","oracle"), ("csf-key","oracle")]

To remove a property or clear the value assigned to it, specify a blank "" value. For example:

[("csf-key","")]

To remove all the properties of the client port, set this argument to None.

Sample client port stub properties are as follows:

  • oracle.webservices.auth.username

  • oracle.webservices.auth.password

  • keystore.recipient.alias

  • csf-key

  • saml.issuer.name

  • javax.xml.ws.session.maintain

  • wsat.Version —SOA references only

  • wsat.flowOption—SOA references only

For a complete list of the configurable properties, see "Configuring the Web Service Client" in Security and Administrator's Guide for Web Services.


Example

The following example resets the client port stub properties wsat.flowOption and wsat.Version to SUPPORTS and DEFAULT, respectively. Any other properties that were previously set for this client port are either reset to the default or removed. The client port is JRFWssUsernamePort of the WssUsernameClient Web module in the /soainfra/soa1/jwsclient_1#1.1.0 application. Note that the moduleType is set to wsconn, and the serviceRefName is set to WssUsernameClient.

wls:/soainfra/serverConfig>setWebServiceClientStubProperties('/soainfra/soa1/jwsclient_1#1.1.0',
'WssUsernameClient','wsconn','WssUsernameClient','JRFWssUsernamePort',
[("wsat.flowOption","SUPPORTS"),("wsat.Version","DEFAULT")] )

Policy Management Commands

Use the WLST commands listed in Table 14-3 to manage directly-attached Oracle WSM Web service and client policies.

When you set or change an attached policy in ADF and WebCenter Web service and client applications, you must restart the application for the changes to take effect. After the policy change is completed, a reminder message is displayed prompting you to restart the application. You can stop and restart the application using the standard stopApplication and startApplication WLST commands. For more information about these commands, see "Deployment Commands".

Table 14-3 Web Services WLST Directly-attached Policy Management Commands

Use this command... To... Use with WLST...

listAvailableWebServicePolicies

Display a list of all the available Oracle Web Services Manager (WSM) policies by category or subject type.

Online

listWebServicePolicies

List Web service port policy information for a Web service in an application or SOA composite.

Online

attachWebServicePolicy

Attach a policy to a Web service port of an application or SOA composite.

Online

attachWebServicePolicies

Attach multiple policies to a Web service port of an application or SOA composite.

Online

enableWebServicePolicy

Enable or disable a policy attached to a port of a Web service application or SOA composite.

Online

enableWebServicePolicies

Enable or disable multiple policies attached to a port of a Web service application or SOA composite.

Online

detachWebServicePolicy

Detach an Oracle WSM policy from a Web service port of an application or SOA composite.

Online

detachWebServicePolicies

Detach multiple Oracle WSM policies from a Web service port of an application or SOA composite.

Online

listWebServiceClientPolicies

List Web service client port policies information for an application or SOA composite.

Online

attachWebServiceClientPolicy

Attach an Oracle WSM policy to a Web service client port of an application or SOA composite.

Online

attachWebServiceClientPolicies

Attach multiple policies to a Web service client port of an application or SOA composite.

Online

enableWebServiceClientPolicy

Enable or disable a policy of a Web service client port of an application or SOA composite.

Online

enableWebServiceClientPolicies

Enable or disable multiple policies of a Web service client port of an application or SOA composite.

Online

detachWebServiceClientPolicy

Detach a policy from a Web service client port of an application or SOA composite.

Online

detachWebServiceClientPolicies

Detach multiple policies from a Web service client port of an application or SOA composite.

Online

setWebServicePolicyOverride

Configure the Web service port policy override properties of an application or SOA composite.

Online


listAvailableWebServicePolicies

Command Category: Policy Management

Use with WLST: Online

Description

Display a list of all the available Oracle Web Services Manager (WSM) policies by category or subject type.

Syntax

listAvailableWebServicePolicies([category],[subject])
Argument Definition
category Optional. The policy category, for example: 'security' , 'management'.
subject Optional. The policy subject type, for example: 'server' or 'client'.

Example

The following example lists all the available Oracle WSM server security policies in the domain.

wls:/wls-domain/serverConfig>listAvailableWebServicePolicies('security','server')

listWebServicePolicies

Command Category: Policy Management

Use with WLST: Online

Description

List Web service port policy information for a Web service in an application or SOA composite.

The output will display the Web service port name, the OWSM policies it has attached to it, and if applicable, any policy override properties. For example:

HelloWorldPort:
security : oracle/wss_username_token_service_policy , enabled=true

Syntax

listWebServicePolicies(application,moduleOrCompName,moduleType,serviceName,subjectName)
Argument Definition
application Name and path of the application for which you want to list the Web services port policy information. For example, /domain/server/application#version_number

To list the port policy information for a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web services port policy information.

To list the port policy information for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite for which you want to list the port policy information.
subjectName Policy subject, port, or operation name.

Examples

The following example lists the Web service port policy information for the application HelloWorld#1_0 for the server soa1 in the domain soainfra. In this example, the Web module name is j2wbasicPolicy, the service name is WssUsernameService, and the subject is a port named JRFWssUsernamePort.

wls:/wls-domain/serverConfig>listWebServicePolicies
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort')

The following example lists the port policy information for the SOA composite default/HelloWorld[1.0]. Note that the moduleType is set to SOA, the service name is HelloService, and the subject is a port named HelloWorld_pt.

wls:/wls-domain/serverConfig>listWebServicePolicies
(None, 'default/HelloWorld[1.0]','soa','HelloService','HelloWorld_pt')

attachWebServicePolicy

Command Category: Policy Management

Use with WLST: Online

Description

Attach a policy to a Web service port of an application or SOA composite.

The policyURI is validated through the Oracle WSM Policy Manager APIs if the wsm-pm application is installed on WebLogic Server and is available. If the PolicyURI that you specify in this command already is attached or exists, then this command enables the policy if it is disabled.

If the wsm-pm application is not installed or is not available, this command is not executed.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

attachWebServicePolicy(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURI, [subjectType=None])
Argument Definition
application Name and path of the application to which you want to attach a Web service policy. For example, /domain/server/application#version_number

To attach a policy to a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) to which you want to attach a Web service policy.

To attach a policy to a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURI Oracle WSM policy name URI, for example 'oracle/log_policy'
subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example attaches the policy oracle/wss_username_token_service_policy to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>attachWebServicePolicy
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort','oracle/wss_username_token_service_policy')

The following example attaches the policy oracle/log_policy to the port HelloWorld_pt of the service HelloService in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>attachWebServicePolicy(None, 'default/HelloWorld[1.0]',
'soa','HelloService','HelloWorld_pt','oracle/log_policy')

attachWebServicePolicies

Command Category: Policy Management

Use with WLST: Online

Description

Attach multiple policies to a Web service port of an application or SOA composite.

The policyURIs are validated through the Oracle WSM Policy Manager APIs if the wsm-pm application is installed on WebLogic Server and is available. If any of the policies that you specify in this command are already attached or exist, then this command enables the policies that are already attached (if they are disabled), and attaches the others.

If the wsm-pm application is not installed or is not available, this command is not executed.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

attachWebServicePolicies(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURIs, [subjectType=None])
Argument Definition
application Name and path of the application to which you want to attach the Web service policies. For example, /domain/server/application#version_number

To attach the policies to a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) to which you want to attach Web service policies.

To attach the policies to a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURIs List of Oracle WSM policy name URIs, for example ["oracle/log_policy","oracle/wss_username_token_service_policy"]

If any of the policies that you specify are already attached or exist, then this command enables the policies that are already attached (if they are disabled), and attaches the others.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Example

The following example attaches the policies "oracle/log_policy", "oracle/wss_username_token_service_policy" to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>attachWebServicePolicies
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort',
["oracle/log_policy", "oracle/wss_username_token_service_policy"])

enableWebServicePolicy

Command Category: Policy Management

Use with WLST: Online

Description

Enable or disable a policy attached to a port of a Web service application or SOA composite.

If the policy that you specify in this command is not attached to the port, an error message is displayed and/or an exception is thrown.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

enableWebServicePolicy(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURI, [enable], [subjectType=None] ))
Argument Definition
application Name and path of the application for which you want to enable a Web service policy. For example, /domain/server/application#version_number

To enable a policy that is attached to a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to enable a Web service policy.

To enable a policy that is attached to a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURI Oracle WSM policy name URI, for example 'oracle/log_policy'

If the policy that you specify is not attached, an error message is displayed and/or an exception is thrown.

enable Optional. Specifies whether to enable or disable the policy. Valid options are:
  • true—Enables the policy. The default is true.

  • false—Disables the policy.

If you omit this argument, the policy is enabled.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example enables the policy oracle/wss_username_token_service_policy attached to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>enableWebServicePolicy
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort',"oracle/wss_username_token_service_policy",true)

The following example enables the policy oracle/log_policy attached to the port HelloWorld_pt for the service HelloService in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>enableWebServicePolicy(None, 'default/HelloWorld[1.0]',
'soa','HelloService','HelloWorld_pt','oracle/log_policy')

The following example disables the policy oracle/log_policy attached to the port HelloWorld_pt for the service HelloService in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>enableWebServicePolicy(None, 'default/HelloWorld[1.0]',
'soa','HelloService','HelloWorld_pt','oracle/log_policy',false)

enableWebServicePolicies

Command Category: Policy Management

Use with WLST: Online

Description

Enable or disable multiple policies attached to a port of a Web service application or SOA composite.

If the policyURIs that you specify in this command are not attached to the port, an error message is displayed and/or an exception is thrown.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

enableWebServicePolicies(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURIs,[enable],[subjectType=None] ))
Argument Definition
application Name and path of the application for which you want to enable the Web service policies. For example, /domain/server/application#version_number

To enable policies that are attached to a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to enable Web service policies.

To enable policies that are attached to a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURIs List of Oracle WSM policy name URIs, for example ["oracle/log_policy","oracle/wss_username_token_service_policy"]

If the policyURIs that you specify are not attached, an error message is displayed and/or an exception is thrown.

enable Optional. Specifies whether to enable or disable the policies. Valid options are:
  • true—Enables the policies. The default is true.

  • false—Disables the policies.

If you omit this argument, the policies are enabled.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Example

The following example enables the policies ["oracle/log_policy","oracle/wss_username_token_service_policy"] attached to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>enableWebServicePolicy
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort',["oracle/log_policy",
"oracle/wss_username_token_service_policy"],true)

detachWebServicePolicy

Command Category: Policy Management

Use with WLST: Online

Description

Detach an Oracle WSM policy from a Web service port of an application or SOA composite.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

detachWebServicePolicy(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURI, [subjectType=None])
Argument Definition
application Name and path of the application from which you want to detach a Web service policy. For example, /domain/server/application#version_number

To detach a policy from a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) from which you want to detach a Web service policy.

To detach a policy from a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURI Oracle WSM policy name URI, for example 'oracle/log_policy'

If the policy specified is not attached, an error message is displayed and/or an exception is thrown.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example detaches the policy oracle/wss_username_token_service_policy from the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>detachWebServicePolicy
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort','oracle/wss_username_token_service_policy')

The following example detaches the policy oracle/log_policy from the port HelloWorld_pt of the service HelloService in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>detachWebServicePolicy(None, 'default/HelloWorld[1.0]',
'soa','HelloService','HelloWorld_pt','oracle/log_policy')

detachWebServicePolicies

Command Category: Policy Management

Use with WLST: Online

Description

Detach multiple Oracle WSM policies from a Web service port of an application or SOA composite.

If the wsm-pm application is not installed or is not available, this command is not executed.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

detachWebServicePolicies(application, moduleOrCompName, moduleType, serviceName, 
subjectName, policyURIs, [subjectType=None])
Argument Definition
application Name and path of the application from which you want to detach the Web service policies. For example, /domain/server/application#version_number

To detach policies from a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) from which you want to detach the Web service policies.

To detach policies from a port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application (including EJB Web services).

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURIs List of Oracle WSM policy name URIs, for example ["oracle/log_policy","oracle/wss_username_token_service_policy"]

If a policyURI specified is not attached, an error message is displayed and/or an exception is thrown.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Example

The following example detaches the policies "oracle/log_policy", "oracle/wss_username_token_service_policy" from the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>detachWebServicePolicies
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy','web',
'WssUsernameService','JRFWssUsernamePort',
["oracle/log_policy","oracle/wss_username_token_service_policy"])

listWebServiceClientPolicies

Command Category: Policy Management

Use with WLST: Online

Description

List Web service client port policies information for an application or SOA composite.

The output will display the Web service client/reference port name and the Oracle WSM policies it has attached to it. For example:

test-port:
security: oracle/wss_username_token_client_policy, enabled=true

Syntax

listWebServiceClientPolicies(application, moduleOrCompName, moduleType, 
serviceRefName,portInfoName)
Argument Definition
application Name and path of the application for which you want to list the Web service client port policy information. For example, /domain/server/application#version_number

To list the client port policy information for a Web services application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to list the Web services port policy information.

To list the client port policy information for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The client port name.

Example

The following example lists the Web service client port policy information for the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra. In this example, the Web module name is WssUsernameClient, the module type is wsconn, the service reference name is WssUsernameClient, and the client port name is JRFWssUsernamePort.

wls:/wls-domain/serverConfig>listWebServiceClientPolicies
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort') 

attachWebServiceClientPolicy

Command Category: Policy Management

Use with WLST: Online

Description

Attach a Oracle WSM policy to a Web service client port of an application or SOA composite.

The policyURI is validated through the Oracle WSM Policy Manager APIs if the wsm-pm application is installed on WebLogic Server and is available. If the PolicyURI that you specify in this command already is attached or exists, then this command enables the policy if it is disabled.

If the wsm-pm application is not installed or is not available, this command is not executed.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

attachWebServiceClientPolicy(application,moduleOrCompName,moduleType, 
serviceRefName, portInfoName, policyURI, [subjectType=None] )
Argument Definition
application Name and path of the application for which you want to attach a policy to the Web service client port. For example, /domain/server/application#version_number

To attach a policy to a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to attach the policy to the client port.

To attach a policy to a client port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The client port to which you want to attach the Oracle WSM client policy.
policyURI The Oracle WSM policy name URI, for example oracle/wss_username_token_client_policy"

If the policy that you specify is already attached or exists, then this command enables the policy if it is disabled.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example attaches the client policy oracle/wss_username_token_client_policy to the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>attachWebServiceClientPolicy
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort',"oracle/wss_username_token_client_policy")

The following example attaches the client policy oracle/log_policy to the client port HelloWorld_pt in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>attachWebServiceClientPolicy
(None, 'default/HelloWorld[1.0]','soa','client','HelloWorld_pt','oracle/log_policy') 

attachWebServiceClientPolicies

Command Category: Policy Management

Use with WLST: Online

Description

Attach multiple policies to a Web service client port of an application or SOA composite.

The policyURIs are validated through the Oracle WSM Policy Manager APIs if the wsm-pm application is installed on WebLogic Server and is available. If the policies that you specify in this command are already attached or exist, then this command enables the policies that are already attached (if they are disabled), and attaches the others.

If the wsm-pm application is not installed or is not available, this command is not executed.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

attachWebServiceClientPolicies(application,moduleOrCompName,moduleType, 
serviceRefName,portInfoName,policyURIs, [subjectType=None] )
Argument Definition
application Name and path of the application for which you want to attach Oracle WSM client policies to the Web service client port. For example, /domain/server/application#version_number

To attach policies to a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to attach the policies to the client port.

To attach policies to a client port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The client port to which you want to attach the Oracle WSM client policy.
policyURI The Oracle WSM policy name URIs, for example ["oracle/log_policy","oracle/wss_username_token_client_policy"]

If the policies that you specify in this command are already attached or exist, then this command enables the policies that are already attached (if they are disabled), and attaches the others.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example attaches the policy oracle/wss_username_token_client_policy to the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>attachWebServiceClientPolicy
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort',"oracle/wss_username_token_client_policy")

The following example attaches the policy oracle/log_policy to the client port HelloWorld_pt in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>attachWebServiceClientPolicy
(None, 'default/HelloWorld[1.0]','soa','client','HelloWorld_pt','oracle/log_policy') 

enableWebServiceClientPolicy

Command Category: Policy Management

Use with WLST: Online

Description

Enable or disable a policy of a Web service client port of an application or SOA composite.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

enableWebServiceClientPolicy(application,moduleOrCompName,moduleType, 
serviceRefName,portInfoName,policyURI,[enable],[subjectType=None] )
Argument Definition
application Name and path of the application for which you want to enable or disable a policy of a Web service client port. For example, /domain/server/application#version_number

To enable or disable a policy of a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to enable or disable a policy of a client port.

To enable or disable a policy of a client port for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The name of the client port to which you want to attach the Oracle WSM client policy.
policyURI The Oracle WSM policy name URI, for example oracle/wss_username_token_client_policy"
enable Optional. Specifies whether to enable or disable the policy. Valid options are:
  • true—Enables the policy. The default is true.

  • false—Disables the policy.

If you omit this argument, the policy is enabled.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example enables the client policy oracle/wss_username_token_client_policy of the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>enableWebServiceClientPolicy
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort', "oracle/wss_username_token_client_policy",true)

The following example enables the client policy oracle/log_policy of the client port HelloWorld_pt in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>enableWebServiceClientPolicy(None,
'default/HelloWorld[1.0]','soa','client','HelloWorld_pt','oracle/log_policy')

The following example disables the client policy oracle/log_policy of the client port HelloWorld_pt in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>enableWebServiceClientPolicy(None,
'default/HelloWorld[1.0]','soa','client','HelloWorld_pt','oracle/log_policy', false )

enableWebServiceClientPolicies

Command Category: Policy Management

Use with WLST: Online

Description

Enable or disable multiple policies of a Web service client port of an application or SOA composite.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

enableWebServiceClientPolicies(application,moduleOrCompName,moduleType, 
serviceRefName,portInfoName,policyURIs,[enable], [subjectType=None] )
Argument Definition
application Name and path of the application for which you want to enable or disable multiple policies of a Web service client port. For example, /domain/server/application#version_number

To enable or disable multiple policies of a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to enable or disable multiple policies of a client port.

To enable or disable multiple policies of a client port for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The name of the client port to which you want to attach the Oracle WSM client policies.
policyURIs The list of Oracle WSM policy name URIs, for example ["oracle/log_policy","oracle/wss_username_token_client_policy"].
enable Optional. Specifies whether to enable or disable the policies. Valid options are:
  • true—Enables the policy. The default is true.

  • false—Disables the policy.

If you omit this argument, the policies are enabled.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Example

The following example enables the client policies oracle/log_policy and oracle/wss_username_token_client_policy of the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>enableWebServiceClientPolicies
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort',
["oracle/log_policy", "oracle/wss_username_token_client_policy"], true ) 

detachWebServiceClientPolicy

Command Category: Policy Management

Use with WLST: Online

Description

Detach a policy from a Web service client port of an application or SOA composite.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

detachWebServiceClientPolicy(application,moduleOrCompName,moduleType, 
serviceRefName, portInfoName, policyURI, [subjectType=None] )
Argument Definition
application Name and path of the application for which you want to detach a policy from a Web service client port. For example, /domain/server/application#version_number

To detach a policy from a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to detach the policy from a client port.

To detach a policy from a client port of a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The client port from which you want to detach the Oracle WSM client policy.
policyURI The Oracle WSM policy name URI, for example oracle/wss_username_token_client_policy"

If the policy specified is not attached, an error message is displayed and/or an exception is thrown.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Examples

The following example detaches the client policy oracle/wss_username_token_client_policy from the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>detachWebServiceClientPolicy
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort','oracle/wss_username_token_client_policy')

The following example detaches the client policy oracle/log_policy from the client port HelloWorld_pt in the SOA composite default/HelloWorld[1.0].

wls:/wls-domain/serverConfig>detachWebServiceClientPolicy(None, 
'default/HelloWorld[1.0]','soa','client','HelloWorld_pt','oracle/log_policy' ) 

detachWebServiceClientPolicies

Command Category: Policy Management

Use with WLST: Online

Description

Detach multiple policies from a Web service client port of an application or SOA composite.

Note:

Policy changes made using this WLST command are only effective after you restart your application. For ADF and WebCenter applications, a message is displayed to remind you to restart your application.

Syntax

detachWebServiceClientPolicies(application,moduleOrCompName,moduleType, 
serviceRefName,portInfoName,policyURIs, [subjectType=None] )
Argument Definition
application Name and path of the application for which you want to detach multiple policies from a Web service client port. For example, /domain/server/application#version_number

To detach multiple policies from a client port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to detach multiple policies from a client port.

To detach multiple policies from a client port for a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with asynchronous Web service callback client.

  • soa—Required for a SOA composite.

  • wsconn—Use with a connection-based Web service client such as an ADF DC Web service client, ADF JAX-WS Indirection Proxy, or WebCenter client.

serviceRefName The service reference name of the application or composite.
portInfoName The client port from which you want to detach the Oracle WSM client policy.
policyURI The Oracle WSM policy name URI, for example oracle/wss_username_token_client_policy"

If the policy specified is not attached, an error message is displayed and/or an exception is thrown.

subjectType Optional. Policy subject type. Valid options are:
  • P—Port. The default is P.

  • O—Not supported in this release.


Example

The following example detaches the client policies oracle/log_policy and oracle/wss_username_token_client_policy from the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_1#1.1.0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>detachWebServiceClientPolicies
('/soainfra/soa1/jwsclient_1#1.1.0','WssUsernameClient','wsconn',
'WssUsernameClient','JRFWssUsernamePort',
["oracle/log_policy","oracle/wss_username_token_client_policy"])

setWebServicePolicyOverride

Command Category: Policy Management

Use with WLST: Online

Description

Configure the Web service port policy override properties of an application or SOA composite.

Syntax

setWebServicePolicyOverride(application,moduleOrCompName,moduleType, serviceName, 
portName,policyURI,properties)
Argument Definition
application Name and path of the application for which you want to override the Web service port policy. For example, /domain/server/application#version_number

To override properties on a policy attached to a port of a Web service application, this argument is required.

moduleOrCompName Name of the Web module or SOA composite (for example HelloWorld[1.0]) for which you want to override a Web service port policy.

To override properties on a policy attached to a SOA composite, the composite name is required (for example default/HelloWorld[1.0]), and the moduleType argument must be set to soa.

moduleType Module type. Valid options are:
  • web—Use with a Web service application.

  • soa—Required for a SOA composite.

serviceName Name of the Web service in the application or SOA composite.
subjectName Name of the policy subject, port, or operation.
policyURI Oracle WSM policy name URI, for example 'oracle/log_policy' to which the override properties will be applied.

If the policy specified is not attached, an error message is displayed and/or an exception is thrown.

properties Policy override properties. Properties must be specified using the following format:

[("name","value")]

For example: [("myprop","myval")]

If this argument is set to None, then all policy overrides are removed.


Examples

The following example configures the override properties for the policy oracle/wss10_message_protection_service_policy for the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld#1_0 for the server soa1 in the domain soainfra.

wls:/wls-domain/serverConfig>setWebServicePolicyOverride
('/soainfra/soa1/HelloWorld#1_0','j2wbasicPolicy',
'web','WssUsernameService','JRFWssUsernamePort',
"oracle/wss10_message_protection_service_policy",   
[("keystore.sig.csf.key","sigkey")])

Policy Set Management Commands

Policy sets enhance the security and manageability of an enterprise by providing a mechanism to globally attach one or more policies to a subject type. Using policy sets, an administrator can specify a default set of policies to be enforced even if none are directly attached. For detailed information about determining the type and scope of resources a policy set can be attached to, see "Creating and Managing Policy Sets" in the Security and Administrator's Guide for Web Services.

All policy set creation, modification, or deletion commands must be performed in the context of a repository session. A repository session can only act on a single document.

Note:

The procedures in this chapter apply to Oracle Infrastructure Web Services only.

To view the help for the WLST commands described in this chapter, connect to a running instance of the server and enter help('wsmManage').

Use the WLST commands listed in Table 14-4 to manage globally-available WSM Web service policy sets.

Table 14-4 Web Services WLST Globally-available Policy Set Management Commands

Use this command... To... Use with WLST...

beginRepositorySession

Begin a session to modify the Oracle WSM Repository.

Online

commitRepositorySession

Write the contents of the current session to the Oracle WSM repository.

Online

describeRepositorySession

Describe the contents of the current repository session.

Online

abortRepositorySession

Abort the current Oracle WSM Repository modification session, discarding any changes that were made to the repository during the session.

Online

createPolicySet

Create a new, empty policy set.

Online

listPolicySets

Lists the policy sets in the repository.

Online

clonePolicySet

Clone a new policy set from an existing policy set.

Online

displayPolicySet

Display the configuration of a specified policy set.

Online

modifyPolicySet

Specify an existing policy set for modification in the current session.

Online

enablePolicySet

Enable or disable a policy set.

Online

enablePolicySetPolicy

Enable or disable a policy attachment for a policy set using the policy's URI.

Online

setPolicySetDescription

Specify a description for the policy set selected within a session.

Online

validatePolicySet

Validate an existing policy set in the repository or in a session.

Online

deletePolicySet

Delete a specified policy set.

Online

attachPolicySet

Attach a policy set to the specified resource scope.

Online

attachPolicySetPolicy

Attach a policy to a policy set using the policy's URI.

Online

detachPolicySetPolicy

Detach a policy from a policy set using the policy's URI.

Online

migrateAttachments

Migrates direct policy attachments to global policy attachments if they are identical.

Online


beginRepositorySession

Command Category: Policy Set Management

Use with WLST: Online

Description

Begin a session to modify the Oracle WSM Repository. A repository session can only act on a single document. An error will be displayed if there is already a current session.

Syntax

beginRepositorySession()

Example

The following example begins an Oracle WSM Repository modification session.

wls:/wls-domain/serverConfig>beginRepositorySession()

commitRepositorySession

Command Category: Policy Set Management

Use with WLST: Online

Description

Write the contents of the current session to the Oracle WSM Repository. Messages are displayed that describe what was committed. An error will be displayed if there is no current session.

Syntax

commitRepositorySession()

Example

The following example commits the current repository modification session.

wls:/wls-domain/serverConfig>commitRepositorySession()

describeRepositorySession

Command Category: Policy Set Management

Use with WLST: Online

Description

Describe the contents of the current session. This will either indicate that the session is empty or list the name of the document that is being updated, along with the type of update (create, modify, or delete). An error will be displayed if there is no current session.

Syntax

describeRepositorySession()

Example

The following example describes the current repository modification session.

wls:/wls-domain/serverConfig>describeRepositorySession()

abortRepositorySession

Command Category: Policy Set Management

Use with WLST: Online

Description

Abort the current Oracle WSM Repository modification session, discarding any changes that were made to the repository during the session.

Syntax

abortRepositorySession()

Example

The following example aborts the current Oracle WSM Repository session.

wls:/wls-domain/serverConfig>abortRepositorySession()

createPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Create a new, empty policy set within a repository session. When creating a new policy set, you must specify the type of policy subject that the policy set will apply to, and a supported expression that defines a valid resource scope in a supported format.

Issuing this command outside of a repository session will result in an error.

Syntax

createPolicySet(name, type,attachTo,[description=None],[enable='true'])
Argument Definition
name Name of the new, empty policy set.
type The type of policy subject that the new policy set applies to. The type of policy subject must be one of the following values:
  • sca-component—SOA Component

  • sca-reference—SOA Reference

  • sca-service—SOA Service

  • ws-service—Web Service Endpoint

  • ws-client—Web Service Client

  • ws-connection—Web Service Connection

  • ws-callback—Asynchronous Callback Client

attachTo Expression that attaches the policy set to the specified resource scope.
description Optional. Description of the new policy set. If no description is specified, then the description for a new policy set will be "Global policy attachments for <type>", where <type> is the subject type.
enable Optional. Specifies whether to enable or disable the new policy set. Valid options are:
  • true—Enables the new policy set. The default is true.

  • false—Disables the new policy set.

If you omit this argument, the policy set is enabled.


Example

The first example creates a new policy set and specifies the resource scope to only ws-service types (Web Service Endpoint) in the base_domain domain. The second example creates a new policy set, but also narrows the resource scope to only sca-service types (SOA Service) in the soa_server1 server in the domain.

wls:/wls-domain/serverConfig>createPolicySet('myPolicySet','ws-service','Domain("base_domain")')
wls:/wls-domain/serverConfig>createPolicySet('myPolicySet','sca-service','Server("soa_server1")','My policySet')

listPolicySets

Command Category: Policy Set Management

Use with WLST: Online

Description

Lists the policy sets in the repository. This command will also display a policy set that is being created, modified, or deleted within the current session. You can list all the policy sets or limit the display to include only those that apply to specific policy subject resource types.

Syntax

listPolicySets([type=None])
Argument Definition
type=None Optional. Specifies the type of policy sets to be displayed. The policy subject resource type must be one of the following values:
  • sca-component—SOA Component

  • sca-reference—SOA Reference

  • sca-service—SOA Service

  • ws-service—Web Service Endpoint

  • ws-client—Web Service Client

  • ws-connection—Web Service Connection

  • ws-callback—Asynchronous Callback Client

If this argument is set to None, then all the policy sets stored in the repository will be listed.


Example

The first two examples list policy sets by either the sca-reference or ws-client resource types. Whereas, the third example lists all the policy sets stored in the repository.

wls:/wls-domain/serverConfig>listPolicySets('sca-reference')
wls:/wls-domain/serverConfig>listPolicySets('ws-client')
wls:/wls-domain/serverConfig>listPolicySets()

clonePolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a repository session, clone a new policy set from an existing policy set. When cloning an existing policy set, all values and attachments in the source policy set are copied into the new policy set, although you can supply a different expression identifying the resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a repository session will result in an error.

Syntax

clonePolicySet(name, source,[attachTo=None],[description=None],[enable='true'])
Argument Definition
name Name of the new policy set clone.
source Name of the source policy set that will be cloned.
attachTo=None Optional. Expression that attaches the policy set to the specified resource scope.

If this argument is set to None, then the expression used in the source policy set to identify the scope of resources is retained.

description=None Optional. Description for the new policy set.

If this argument is set to None, then the description used in the source policy set is retained.

enable='true' Optional. Specifies whether to enable or disable the policy set. Valid options are:
  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Example

The first example creates a policy set by cloning the existing myPolicySet policy set to create a new mynewPolicySet. The second example also creates a policy set, but narrows the resource scope to policy subjects in the specified soa_server1 server in the domain.

wls:/wls-domain/serverConfig>clonePolicySet('myNewPolicySet','myPolicySet')
wls:/wls-domain/serverConfig>clonePolicySet('myNewPolicySet','myPolicySet','Server("soa_server1")')

displayPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Display the configuration of a specified policy set. If the policy set is being modified in the current session, then that version will be displayed; otherwise, the latest version in the repository will be displayed. An error will display if the policy set does not exist.

This command can be issued outside of a repository session.

Syntax

displayPolicySet([name])
Argument Definition
name Optional. Name of the policy set to be displayed.

If a name is not specified, the configuration of the policy set, if any, in the current session is displayed or an error message is displayed.


Example

The following example displays the configuration of the myPolicySet policy set.

wls:/wls-domain/serverConfig>displayPolicySet('myPolicySet')

modifyPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Specify a policy set for modification in the current repository session. The latest version of the named policy set will be loaded into the current session. If the session already contains a different policy set, then an error will be displayed; if the session already contains the named policy set, then no action will be taken. Subsequent attempts to modify the named policy set will show the current version in the session.

Issuing this command outside of a repository session will result in an error.

Syntax

modifyPolicySet(name)
Argument Definition
name Name of the policy set to be modified in the current session.

Example

The following example opens the myPolicySet policy set for modification in the current session.

wls:/wls-domain/serverConfig>modifyPolicySet('myPolicySet')

enablePolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Enable or disable the current policy set within a repository session. If not specified, this command enables the policy set.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

enablePolicySet([enable=True])
Argument Definition
enable Optional. Specifies whether to enable or disable the policy set. Valid options are:
  • true—Enables the policy set. The default is true.

  • false—Disables the policy set.

If you omit this argument, the policy set is enabled.


Example

The following example enables the current policy set.

wls:/wls-domain/serverConfig>enablePolicySet(true)

enablePolicySetPolicy

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a repository session, enable or disable the policy attachment, which is identified by the provided URI in the current policy set. If not specified, this command enables the policy set. An error displays if the identified policy is not currently attached to the policy set.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

enablePolicySetPolicy(uri,[enable=true])
Argument Definition
uri URI specifying the policy attachment within the policy set.
enable Optional. Specifies whether to enable or disable the policy attachment specified by the URI in the policy set. Valid options are:
  • true—Enables the specified policy attachment in the policy set. The default is true.

  • false—Disables specified policy attachment in the policy set.

If you omit this argument, the policy set attachment is enabled.


Example

The following example disables the specified logging policy attachment within the current policy set.

wls:/wls-domain/serverConfig>enablePolicySetPolicy('/oracle/log_policy',false) 

setPolicySetDescription

Command Category: Policy Set Management

Use with WLST: Online

Description

Specify a description for a policy set selected within a session.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

setPolicySetDescription(description)
Argument Definition
description Describes a policy set.

Example

The following example creates a description for a policy set.

wls:/wls-domain/serverConfig>setPolicySetDescription('PolicySetDescription')

validatePolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Validates an existing policy set. If a policy set name is provided, the command will validate the specified policy set. If no policy set name is specified, the command will validate the policy set in the current repository session.

An error message displays if the policy set does not exist, or a name is not provided and the session is not active, or if the Oracle WSM Repository does not contain a suitable policy set.

Syntax

validatePolicySet([name=None])
Argument Definition
name Optional. Name of the policy set to validate. If a name is not provided then the command will validate the policy set being created or modified in the current session.

Example

The first example validates the policy set in the current session. The second example validates the specified myPolicySet policy set.

wls:/wls-domain/serverConfig>validatePolicySet()
wls:/wls-domain/serverConfig>validatePolicySet('myPolicySet')

deletePolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Delete a specified policy set within a repository session. If the session already contains a different policy set, an error will display. If the session already contains the named policy set, then a creation will be undone or a modification will be converted into a deletion.

Issuing this command outside of a repository session will result in an error.

Syntax

deletePolicySet(name)
Argument Definition
name Name of the policy set to be deleted.

Example

The following example deletes a specified myPolicySet policy set.

wls:/wls-domain/serverConfig>deletePolicySet('myPolicySet')

attachPolicySet

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a repository session, set an expression that attaches a policy set to the specified resource scope. The expression must define a valid resource scope in a supported format.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

attachPolicySet(expression)
Argument Definition
expression Expression that attaches the policy set to the specified resource scope.

Example

The following example attaches a policy set to the specified base_domain resource.

wls:/wls-domain/serverConfig>attachPolicySet('Domain("base_domain")')

This example attaches a policy set to the specified base_domain and managed_server resources.

wls:/wls-domain/serverConfig>attachPolicySet('Domain("base_domain") and Server("managed_server")')

attachPolicySetPolicy

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a repository session, attach a policy, identified by a specified URI, to the current policy set.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

attachPolicySetPolicy(uri)
Argument Definition
uri URI specifying the policy to attach to the current policy set. For example, 'oracle/log_policy'.

Example

The following example attaches the Oracle WSM logging policy to the current policy set.

wls:/wls-domain/serverConfig>attachPolicySetPolicy('oracle/log_policy')

detachPolicySetPolicy

Command Category: Policy Set Management

Use with WLST: Online

Description

Within a repository session, detach a policy, identified by a specified URI, from the current policy set.

Issuing this command outside of a repository session containing a policy set that is being created or modified will result in an error.

Syntax

detachPolicySetPolicy(uri)
Argument Definition
uri URI specifying the policy to detach to the current policy set. For example, oracle/log_policy'.

Example

The following example detaches the Oracle WSM logging policy from the current policy set.

wls:/wls-domain/serverConfig>detachPolicySetPolicy('oracle/log_policy')

migrateAttachments

Command Category: Policy Set Management

Use with WLST: Online

Description

Migrates direct (local) policy attachments that are identical to the external global policy attachments that would otherwise be attached to each policy subject in the current domain. You can specify whether to force the migration, prompt for confirmation before each migration, or simply list the migrations that would occur. A direct policy attachment is identical if its URI is the same as one provided by a global policy attachment, and if it does not have any scoped configuration overrides.

Note:

A direct attachment with an unscoped override will be migrated but an attachment with a scoped override will not. This is because after running the migrateAttachments() command, the enforcement of the policies on all subjects remains the same, even though some policies are globally attached.

Whether forced or prompted, the command lists each direct policy attachment that is migrated. This output will identify the policy subject that was modified, the URI of the identical policy reference, and the name of the global policy attachment document that duplicated the direct attachment.

Syntax

migrateAttachments([mode])
Argument Definition
mode The action to be taken for each policy attachment that can be migrated. Valid options are:
  • force—Automatically migrate all identical policy attachments without prompting.

  • preview—List all policy attachments that can be migrated, but does not perform any migration.

  • prompt—Request user confirmation before migrating each policy attachment.

If no mode is specified, this argument defaults to prompt mode.


Example

The following examples describe how to use the repository attachment migration modes.

wls:/wls-domain/serverConfig>migrateAttachments()
wls:/wls-domain/serverConfig>migrateAttachments('force')
wls:/wls-domain/serverConfig>migrateAttachments('preview')
wls:/wls-domain/serverConfig>migrateAttachments('prompt')

Oracle WSM Repository Management Commands

Use the commands listed in Table 14-5 to manage the WSM documents stored in the Oracle WSM Repository. For additional information about upgrading or migrating documents in an Oracle WSM Repository, see "Upgrading the Oracle WSM Policies in the Repository" in the Security and Administrator's Guide for Web Services.

Additional MDS WLST commands are described in Chapter 8, "Metadata Services (MDS) Custom WLST Commands."

Table 14-5 Policy Repository Management Commands

Use this command... To... Use with WLST...

upgradeWSMPolicyRepository

Upgrade the Oracle WSM predefined policies stored in the Oracle WSM Repository with any new predefined policies that are provided in the latest installation of the Oracle Fusion Middleware software.

Online

resetWSMPolicyRepository

Delete the existing policies stored in the Oracle WSM Repository and refresh it with the latest set of predefined policies that are provided in the new installation of the Oracle Fusion Middleware software.

Online

exportRepository

Export a set of documents from the repository into a supported ZIP archive. If the specified archive already exists, you can choose whether to overwrite the archive or merge the documents into the existing archive.

Online

importRepository

Import a set of documents from a supported ZIP archive into the repository. You can provide the location of a file that describes how to map a physical information from the source environment to the target environment.

Online


upgradeWSMPolicyRepository

Command Category: Policy Repository Management

Use with WLST: Online

Description

Upgrade the Oracle WSM predefined policies stored in the Oracle WSM Repository with any new predefined policies that are provided in the latest installation of the Oracle Fusion Middleware software. If the repository is empty, all of the predefined policies included in the installation are loaded into the repository.

This command does not remove any existing predefined and user-defined custom policies in the repository. If a predefined policy has been modified or discontinued in a subsequent release, one of the following occurs:

  • For policies that have been discontinued, a message is displayed listing the discontinued policies. In this case, Oracle recommends that you no longer reference the policies and remove them using Oracle Enterprise Manager.

  • For policies that have changed in the subsequent release, a message is displayed listing the changed policies. Oracle recommends that you import the latest version of the policies using Oracle Enterprise Manager.

Syntax

upgradeWSMPolicyRepository()

Example

The following example upgrades the existing installation with policies provided in the latest release:

wls:/wls-domain/serverConfig>upgradeWSMPolicyRepository()

resetWSMPolicyRepository

Command Category: Policy Repository Management

Use with WLST: Online

Description

Delete the existing policies stored in the Oracle WSM Repository and refresh it with the latest set of predefined policies that are provided in the new installation of the Oracle Fusion Middleware software. You can use the clearStore argument to specify whether to delete all policies, including custom user policies, from the Oracle WSM Repository before loading the new predefined policies.

Syntax

resetWSMPolicyRepository([clearStore='false'])
Argument Definition
clearStore='false' Policies to be deleted. Valid values are:
  • true—All policies in the repository, including custom user policies, are deleted.

  • false—Only the predefined policies supplied by Oracle are deleted. The default is false.


Example

The following example deletes all the policies in the repository, including user policies, and adds the predefined policies provided in the current product installation:

wls:/wls-domain/serverConfig>resetWSMPolicyRepository(true)

exportRepository

Command Category: Policy Repository Management

Use with WLST: Online

Description

Export a set of documents from the Oracle WSM Repository into a supported ZIP archive. If the specified archive already exists, the following options are presented:

The specified archive already exists. Update existing archive?
Enter "yes" to merge documents into existing archive, "no" to overwrite,
or "cancel" to cancel the operation.

You can also specify a list of the documents to be exported, or use a search expression to find specific documents in the repository.

Syntax

exportRepository(archive,[documents=None],[expandReferences='false'])
Argument Definition
archive Name of the archive file. If the specified archive already exists, you can choose whether to overwrite the archive or merge the documents into the existing archive.

During override, the original archive is backed up and a message describes the location of the backup archive.

documents=None Optional. The documents to be exported to the archive. If no documents are specified, then all assertion templates, intents, policies, and policy sets will be exported. You can specify a list of the documents to be exported, or use a search expression to find specific documents in the repository.
expandReferences='false' Optional. Specifies whether the policy references should be expanded during export.

Example

The following examples describe repository export sessions. The first example exports all Oracle WSM documents to the policies.zip file.

wls:/wls-domain/serverConfig>exportRepository("/tmp/policies.zip")

This example exports only the sca-component, sca-reference, and sca-service policy sets to the policies.jar file, and also expands the all policy references output during the export process.

wls:/wls-domain/serverConfig>exportRepository("/tmp/policies.jar",
["/policysets/sca_component,/policysets/sca_reference,/policysets/sca_service]", true)

This example exports policy sets using wildcards to the some_global_with_noreference_2 file.

wls:/wls-domain/serverConfig>exportRepository('./export/some_global_with_noreference_2', 
['policysets:global/web_%','policysets:global/web_ref%', 'policysets:global/web_call%'], false)

importRepository

Command Category: Policy Repository Management

Use with WLST: Online

Description

Import a set of documents from a supported ZIP archive into the Oracle WSM Repository. You can use the map argument to provide the location of a file that describes how to map physical information from the source environment to the target environment. For example, you can use the map file to ensure that the attachment expression in a policy set document is updated to match the target environment, such as Domain("foo")=Domain("bar")

Syntax

importRepository(archive,[map=None],[generateMapFile='false'])
Argument Definition
archive Name of the archive file.
map=None Optional. Location of a sample map file that describes how to map physical information from the source environment to the target environment. You can generate a new map file by setting the generateMapFile argument to true.

If you specify a map file without setting the generateMapFile argument to true, and the file does not exist, the operation fails and an error is displayed.

generateMapFile=false Optional. Specify whether to create a sample map file at the location specified by the map argument. No documents are imported when this argument is set to true. The default is false.

After the file is created you can edit it using any text editor. The attachTo values can be updated according to the new environment details. If there is no update required for any document name, that entry may be either deleted or commented using the character ("#").


Example

The following examples describe repository import sessions.

The first example imports the contents of the policies.zip file into the repository.

wls:/wls-domain/serverConfig>importRepository("/tmp/policies.zip")

This example uses the generateMapFile argument to generate a map file.

wls:/wls-domain/serverConfig>importRepository("./export/some_global_with_noreference_2', map="./export/some_global_with_noreference_2_map', generateMapFile=true)

Here is an example of a generated map file:

This is an auto generated override file containing the document names given in 
the archive file and their corresponding attachTo values. The attachTo value can 
be updated according to the new environment details. If there is no update 
required for any document name,that entry may be either deleted or commented 
using the character ("#")

[Resource Scope Mappings
]
sca_component_add_1=Composite("*Async*")
sca_reference_add_1=Composite("*Basic_SOA_Client*")
sca_reference_no=Server("*")
sca_service_add_1=Composite("*Basic_SOA_service")
web_callback_add_1=Application("*")
web_client_add_1=Module("*")
web_reference_add_1=Domain("*")
web_service_add_1=Domain("*domain*") and Server("*soa*") and Application("*ADF*")
ws_service_no_1=Server("*Admin*")

This example illustrates how to import documents using a generated map file: /some_global_with_noreference_2_map.

wls:/wls-domain/serverConfig>importRepository('../export/export_all', 'export_all_map')

Deployment Descriptor Migration Commands

Use the commands listed in Table 14-6 to migrate the ADF Business Components and WebCenter services proprietary deployment descriptor (PDD) files between environments, such as from test to production.

For additional information about using these commands, see "Managing Application Migration Between Environments" in the Security and Administrator's Guide for Web Services.

Table 14-6 Deployment Descriptor Migration Commands

Use this command... To... Use with WLST ...

exportJRFWSApplicationPDD

Export an ADF Business Control or WebCenter application deployment descriptor to a Java Archive (JAR) file.

Online

importJRFWSApplicationPDD

Import an ADF Business Control or WebCenter Web service application deployment descriptor from the exported JAR file into a new environment, for example, a production environment or a scaled server instance in a cluster.

Online

savePddToAllAppInstancesInDomain

Import and save the ADF BC or WebCenter Web service application deployment descriptor from the exported JAR file into all of the server instances in the connected domain.

Online


exportJRFWSApplicationPDD

Command Category: Deployment descriptor migration

Use with WLST: Online

Description

Export an ADF Business Control or WebCenter application deployment descriptor to a Java Archive (JAR) file. If you do not specify a name for the JAR file, the output displays the default name and path to the JAR file.

Syntax

exportJRFWSApplicationPDD(application,pddJarFileName=None)
Argument Definition
application Name and path of the application for which you want to export the configuration information. For example, /domain/server/application#version
pddJarFileName Optional. User-specified name for the JAR file. The default is None. For example, /tmp/myPDD.jar.

Example

The following example exports the Web service PDD for the application ADFBCHelloWorld into a JAR file named exportPDD.jar.

wls:/wls-domain/serverConfig>exportJRFWSApplicationPDD
('/wls-domain/ManagedServer/ADFBCHelloWorld','/tmp/exportPDD.jar')

/tmp/exportPDD.jar

importJRFWSApplicationPDD

Command Category: Deployment descriptor migration

Use with WLST: Online

Description

Import an ADF Business Control or WebCenter Web service application deployment descriptor from the exported JAR file into a new environment, for example, a production environment or a scaled server instance in a cluster.

Note:

Changes made using this WLST command are only effective after you restart your application. After importing the deployment descriptor, a message is displayed to remind you to restart your application.

Syntax

importJRFWSApplicationPDD(application,pddJarFileName)
Argument Definition
application Fully qualified path and name of the application to which you want to import the configuration information. For example, /domain/server/application#version
pddJarFileName Name of the JAR file that contains the PDD file to be imported. For example, /tmp/myPDD.jar

Example

The following example imports the Web service application deployment descriptor for the ADFBCHelloWorld application that has been migrated to the server ManagedServer2. The command uses the name of the JAR file that was generated when the exportJRFWSApplicationPDD command was executed.

wls:/wls-domain/serverConfig>importJRFWSApplicationPDD
('/wls-domain/ManagedServer2/ADFBCHelloWorld', '/tmp/exportPDD.jar')

application  /wls-domain/ManagedServer2/ADFBCHelloWorld PDD has been reset,
 please restart application now to uptake changes!

savePddToAllAppInstancesInDomain

Command Category: Deployment descriptor migration

Use with WLST: Online

Description

Import and save the ADF BC or WebCenter Web service application deployment descriptor from the exported JAR file into all of the server instances in the connected domain. You can also use the optional restartApp argument to restart the application automatically.

Syntax

savePddToAllAppInstancesInDomain(applicationName,pddJarFileName,restartApp=true)
Argument Definition
applicationName Name of the application to which you want to import the configuration information. For example, application#version
pddJarFileName Name of the JAR file that contains the PDD file to be imported. For example, /tmp/myPDD.jar
restartApp Optional. Restart the application. Valid values are:
  • true—Restart the application automatically. The default is true.

  • false—Do not restart the application automatically.


Example

The following example imports the Web service application deployment descriptor for the ADFBCHelloWorld application that was previously exported into all of the servers in the domain, and restarts the application.

wls:/wls-domain/serverConfig>savePddToAllAppInstancesInDomain
'ADFBCHelloWorld', '/tmp/exportPDD.jar' , true

saving pdd to  com.bea:ServerRuntime=ManagedServer,Name=ADFBCHelloWorld,
Location=ManagedServer,Type=ApplicationRuntime
saving pdd to  com.bea:ServerRuntime=ManagedServer2,Name=ADFBCHelloWorld,
Location=ManagedServer2,Type=ApplicationRuntime
restarting application  ADFBCHelloWorld
Stopping application ADFBCHelloWorld.
<Mar 24, 2010 10:50:07 AM PDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating stop operation for application, ADFBCHelloWorld 
[archive: null], to Cluster-1 .> 
.Completed the stop of Application with status completed
Current Status of your Deployment:
Deployment command type: stop
Deployment State       : completed
Deployment Message     : no message
Starting application ADFBCHelloWorld.
<Mar 24, 2010 10:50:11 AM PDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating start operation for application, ADFBCHelloWorld 
[archive: null], to Cluster-1 .> 
.Completed the start of Application with status completed
Current Status of your Deployment:
Deployment command type: start
Deployment State       : completed
Deployment Message     : no message

The following example imports the Web service application deployment descriptor for the ADFBCHelloWorld application that was previously exported into all of the servers in the domain, but does not restart the application automatically. This example shows the commands you need to enter to restart the application manually.

wls:/wls-domain/serverConfig>savePddToAllAppInstancesInDomain
('ADFBCHelloWorld', '/tmp/exportPDD.jar', false)

saving pdd to  com.bea:ServerRuntime=ManagedServer,Name=ADFBCHelloWorld,
Location=ManagedServer,Type=ApplicationRuntime
saving pdd to  com.bea:ServerRuntime=ManagedServer2,Name=ADFBCHelloWorld,
Location=ManagedServer2,Type=ApplicationRuntime
application  ADFBCHelloWorld  PDD has been reset, please restart application now to uptake changes!

wls:/wls-domain/serverConfig> stopApplication('ADFBCHelloWorld')
wls:/wls-domain/serverConfig> startApplication('ADFBCHelloWorld')