Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)


getClientDynamicPolicyControl command

Use the getClientDynamicPolicyControl command to find out whether an application that is a web service client obtains the policy configuration of a web service provider, and to list the properties that apply to obtaining that configuration.

To run the command, use the AdminTask object of the wsadmin scripting client.

This command is valid only when it is used with WAS v7 and later application servers. Do not use it with earlier versions.

For a list of the available policy set management administrative commands, plus a brief description of each command, run at the wsadmin prompt:

print AdminTask.help('PolicySetManagement')

For overview help on a given command, run at the wsadmin prompt:

print AdminTask.help('command_name')

After using the command, save changes to the master configuration. For example, use the following command:

AdminConfig.save()

Use the getClientDynamicPolicyControl command to find out how an application, or a service in an application, obtains the policy configuration of a service provider. The client can obtain the policy configuration of the provider through a Web Services Metadata Exchange (WS-MetadataExchange) request or through an HTTP GET request.


Target object

None



Required parameters

-applicationName

The name of the application for which to find out how it obtains the policy configuration of a service provider. The application must be a service client. (String)



Optional parameters

-resource

The name of the resource for which to find out how it obtains the policy configuration of a service provider. If you specify this parameter, only the properties for that resource are returned. To retrieve information for the application, specify WebService:/. Alternatively, you can specify a service, a service reference, an endpoint, or an operation. (String)

For further details, see the topic Configuring the client.policy to use a service provider policy using wsadmin.sh.



Return value

Returns a list of properties that include the resource name and that show how it obtains the policy configuration of a service provider. The following properties can be returned:

//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ GetTargetURI

The target URL of the HTTP GET request. This property is returned if the value of the acquireProviderPolicyMethod property is //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ Get.

//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ GetPolicySetName

The system policy set that contains the HTTP and SSL transport policy to use for the HTTP GET request. This property is returned if the //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ GetTargetURI property has a value.

//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ GetPolicySetBinding

The general binding that contains the HTTP and SSL transport bindings for the HTTP GET request. This property is returned if the //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ GetTargetURI property has a value.

wsMexPolicySetName

The name of the policy set that specifies message-level security when the resource shares its policy configuration through a WS-MetadataExchange request. This property is returned if the value of the acquireProviderPolicyMethod property is wsMex and a policy set to provide message-level security was specified.

wsMexPolicySetBinding

The name of the binding used when the resource shares its policy configuration through a WS-MetadataExchange request. This property is returned if the value of the acquireProviderPolicyMethod property is wsMex and a binding to provide message-level security was specified.

acquireProviderPolicyMethod

How the policy configuration of the provider can be obtained. Valid values for this property are:

wsMex

The resource can obtain the policy configuration of a service provider through a WS-MetadataExchange request.

//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ Get

The resource can obtain the policy configuration of a service provider through an HTTP GET request.

resource

The resource specified.

directSetting

How the properties apply to the resource. Valid values for this property are:

true

The properties apply directly to the resource.

false

The properties are inherited from the parent application or service.


Example

The following example displays the properties that control how the EchoService service of the WSPolicyClient application obtains the policy configuration of a service provider. The client is configured to retrieve the provider policy through a WS-MetadataExchange request with message-level security, by using the SystemWSSecurityDefault policy set and the "Client sample" general binding.

AdminTask.getClientDynamicPolicyControl(['-applicationName', 'WSPolicyClient',
'-resource', 'WebService:/WSPClient.war:{http://example_path/}EchoService'])
.
.
[ [wsMexPolicySetName SystemWSSecurityDefault] [wsMexPolicySetBinding [Client sample]]
[acquireProviderPolicyMethod [wsMex]]
[resource WebService:/WSPClient.war:{http://example_path/}EchoService/]
[directSetting true] ]

The following example displays the properties that control how the EchoService service of the WSPolicyClient application obtains the policy configuration of a service provider when the client is configured to retrieve the provider policy through an HTTP GET request.

AdminTask.getClientDynamicPolicyControl(['-applicationName', 'WSPolicyClient',
'-resource', 'WebService:/WSPClient.war:{http://example_path/}EchoService'])
.
.
[ [//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  GetTargetURI http://example_path/EchoService?wsdl]
[acquireProviderPolicyMethod [//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  Get]]
[resource WebService:/WSPClient.war:{http://example_path/}EchoService/]
[directSetting true] ]

Web service clients and policy configuration to use the service provider policy
Configure the client.policy to use a service provider policy using wsadmin.sh
Use the wsadmin scripting AdminTask object for scripted administration
Start the wsadmin scripting client using wsadmin.sh


Related


getProviderPolicySharingInfo command
setProviderPolicySharingInfo command
setClientDynamicPolicyControl command
WS-Policy commands

+

Search Tips   |   Advanced Search