Description Syntax Examples attachWebServiceClientPolicy

14-28 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference

14.3.9.3 Example

The following example lists the Web service client port policy information for the application jwsclient_11.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-domainserverConfiglistWebServiceClientPolicies soainfrasoa1jwsclient_11.1.0,WssUsernameClient,wsconn, WssUsernameClient,JRFWssUsernamePort

14.3.10 attachWebServiceClientPolicy

Command Category: Policy Management Use with WLST: Online

14.3.10.1 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. Argument Definition application Name and path of the application for which you want to list the Web service client port policy information. For example, domainserverapplicationversion_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 defaultHelloWorld[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. Web Services Custom WLST Commands 14-29

14.3.10.2 Syntax

attachWebServiceClientPolicyapplication,moduleOrCompName,moduleType, serviceRefName, portInfoName, policyURI, [subjectType=None]

14.3.10.3 Examples

The following example attaches the client policy oraclewss_username_token_ client_policy to the port JRFWssUsernamePort of the Web module WssUsernameClient. The Web service is part of the application jwsclient_ 11.1.0 for the server soa1 in the domain soainfra. wls:wls-domainserverConfigattachWebServiceClientPolicy soainfrasoa1jwsclient_11.1.0,WssUsernameClient,wsconn, WssUsernameClient,JRFWssUsernamePort,oraclewss_username_token_client_ policy 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 attach a policy to the Web service client port. For example, domainserverapplicationversion_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 defaultHelloWorld[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 oraclewss_ 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. 14-30 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference The following example attaches the client policy oraclelog_policy to the client port HelloWorld_pt in the SOA composite defaultHelloWorld[1.0]. wls:wls-domainserverConfigattachWebServiceClientPolicy None, defaultHelloWorld[1.0],soa,client,HelloWorld_pt,oraclelog_ policy

14.3.11 attachWebServiceClientPolicies