Description Syntax Example attachWebServicePolicies

14-20 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference

14.3.3.3 Examples

The following example attaches the policy oraclewss_username_token_ service_policy to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service is part of the application HelloWorld1_0 for the server soa1 in the domain soainfra. wls:wls-domainserverConfigattachWebServicePolicy soainfrasoa1HelloWorld1_0,j2wbasicPolicy,web, WssUsernameService,JRFWssUsernamePort,oraclewss_username_token_service_ policy The following example attaches the policy oraclelog_policy to the port HelloWorld_pt of the service HelloService in the SOA composite defaultHelloWorld[1.0]. wls:wls-domainserverConfigattachWebServicePolicyNone, defaultHelloWorld[1.0], soa,HelloService,HelloWorld_pt,oraclelog_policy

14.3.4 attachWebServicePolicies

Command Category: Policy Management Use with WLST: Online

14.3.4.1 Description

Attach multiple policies to a Web service port of an application or SOA composite. Argument Definition application Name and path of the application to which you want to attach a Web service policy. For example, domainserverapplicationversion_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 defaultHelloWorld[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 oraclelog_ policy subjectType Optional. Policy subject type. Valid options are: ■ P—Port. The default is P. ■ O—Not supported in this release. Web Services Custom WLST Commands 14-21 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.

14.3.4.2 Syntax

attachWebServicePoliciesapplication, moduleOrCompName, moduleType, serviceName, subjectName, policyURIs, [subjectType=None]

14.3.4.3 Example

The following example attaches the policies oraclelog_policy, oraclewss_username_token_service_policy to the port JRFWssUsernamePort of the Web module WssUsernameService. The Web service 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. Argument Definition application Name and path of the application to which you want to attach the Web service policies. For example, domainserverapplicationversion_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 defaultHelloWorld[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 [oraclelog_policy,oraclewss_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. 14-22 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference is part of the application HelloWorld1_0 for the server soa1 in the domain soainfra. wls:wls-domainserverConfigattachWebServicePolicies soainfrasoa1HelloWorld1_0,j2wbasicPolicy,web, WssUsernameService,JRFWssUsernamePort, [oraclelog_policy, oraclewss_username_token_service_policy]

14.3.5 enableWebServicePolicy