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.

要运行此命令,请使用 wsadmin 脚本编制客户机的 AdminTask 对象。

[IBM i]wsadmin 脚本编制客户机是从 Qshell 运行的。有关更多信息,请参阅“配置 Qshell 以运行 WebSphere® Application Server 脚本”主题。

此命令仅适用于 WebSphere Application Server V7 和更高版本的应用程序服务器。请不要对先前版本使用此命令。

要获取可用于管理策略集的管理命令以及对每个命令的简短描述的列表,请在 wsadmin 提示符处输入以下命令:

print AdminTask.help('PolicySetManagement')

要获取有关给定命令的总体帮助,请在 wsadmin 提示符处输入以下命令:

print AdminTask.help('command_name')

在使用这些命令之后,保存对主配置所做的更改。例如,使用以下命令:

AdminConfig.save()

Purpose

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 you want 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 you want 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 by using wsadmin scripting.

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:
httpGetTargetURI
The target URL of the HTTP GET request. This property is returned if the value of the acquireProviderPolicyMethod property is httpGet.
httpGetPolicySetName
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 httpGetTargetURI property has a value.
httpGetPolicySetBinding
The general binding that contains the HTTP and SSL transport bindings for the HTTP GET request. This property is returned if the httpGetTargetURI 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 that is 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.
httpGet
The resource can obtain the policy configuration of a service provider through an HTTP GET request.
resource
The resource that you 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.

Examples

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] ]

以下示例显示当客户机配置为通过 HTTP GET 请求检索提供程序策略时,用于控制 WSPolicyClient 应用程序的 EchoService 服务如何获取服务提供程序的策略配置的属性。

AdminTask.getClientDynamicPolicyControl(['-applicationName', 'WSPolicyClient', 
'-resource', 'WebService:/WSPClient.war:{http://example_path/}EchoService'])
.
.
[ [httpGetTargetURI http://example_path/EchoService?wsdl] 
[acquireProviderPolicyMethod [httpGet]] 
[resource WebService:/WSPClient.war:{http://example_path/}EchoService/] 
[directSetting true] ]

指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rwbs_wsp_getcdpolicyc
文件名:rwbs_wsp_getcdpolicyc.html