Description Syntax Examples enableWebServicePolicy

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

Command Category: Policy Management Use with WLST: Online

14.3.5.1 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 andor an exception is thrown.

14.3.5.2 Syntax

enableWebServicePolicyapplication, moduleOrCompName, moduleType, serviceName, subjectName, policyURI, [enable], [subjectType=None] 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 for which you want to enable a Web service policy. For example, domainserverapplicationversion_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 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. Web Services Custom WLST Commands 14-23

14.3.5.3 Examples

The following example enables the policy oraclewss_username_token_ service_policy attached 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-domainserverConfigenableWebServicePolicy soainfrasoa1HelloWorld1_0,j2wbasicPolicy,web, WssUsernameService,JRFWssUsernamePort,oraclewss_username_token_service_ policy,true The following example enables the policy oraclelog_policy attached to the port HelloWorld_pt for the service HelloService in the SOA composite defaultHelloWorld[1.0]. wls:wls-domainserverConfigenableWebServicePolicyNone, defaultHelloWorld[1.0], soa,HelloService,HelloWorld_pt,oraclelog_policy The following example disables the policy oraclelog_policy attached to the port HelloWorld_pt for the service HelloService in the SOA composite defaultHelloWorld[1.0]. wls:wls-domainserverConfigenableWebServicePolicyNone, defaultHelloWorld[1.0], soa,HelloService,HelloWorld_pt,oraclelog_policy,false

14.3.6 enableWebServicePolicies