Description Syntax Examples attachWebServicePolicy

Web Services Custom WLST Commands 14-19

14.3.2.3 Examples

The following example lists the Web service port policy information for the application HelloWorld1_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-domainserverConfiglistWebServicePolicies soainfrasoa1HelloWorld1_0,j2wbasicPolicy,web, WssUsernameService,JRFWssUsernamePort The following example lists the port policy information for the SOA composite defaultHelloWorld[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-domainserverConfiglistWebServicePolicies None, defaultHelloWorld[1.0],soa,HelloService,HelloWorld_pt

14.3.3 attachWebServicePolicy

Command Category: Policy Management Use with WLST: Online

14.3.3.1 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.

14.3.3.2 Syntax

attachWebServicePolicyapplication, moduleOrCompName, moduleType, serviceName, subjectName, policyURI, [subjectType=None] 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. 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 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