Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)
setProviderPolicySharingInfo command
Use the setProviderPolicySharingInfo command to set how an application or service that is a web service provider can share its policy configuration with other clients, service registries, or services that support the WS-Policy specification. We can set or remove this information about how a provider policy is shared.
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 setProviderPolicySharingInfo command to set how an application, or a service in an application, shares its policy configuration with clients, service registries, or services that support the WS-Policy specification. The policy configuration is shared in WS-PolicyAttachments format.
The policy configuration of the resource can be shared with clients through a WS-MetadataExchange request, through WSDL exported by a ?WSDL HTTP Get request, or through both methods.
Target object
None
Required parameters
-applicationName
The name of the application for which to set how the provider policy is shared. (String)
-resource
The name of the resource for which to set how the provider policy is shared. For all resources in an application, specify WebService:/. For a service in an application, specify WebService:/module:{namespace}service_name. Endpoints or operations inherit the settings of the parent application or service. (String)
Optional parameters
-sharePolicyMethods
Specifies how the policy configuration of the resource can be shared. (String array) Enter either or both of the following values:
//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ Get
The resource can share its policy configuration through WSDL that is obtained by a ?WSDL HTTP Get request.
wsMex
The resource can share its policy configuration through a WS-MetadataExchange request.
-wsMexProperties
Specifies that message-level security is required for WS-MetadataExchange requests and specifies the settings that provide the message-level security. (Properties) Enter the following values, following each value with the setting that you require for that value:
wsMexPolicySetName
The name of the system policy set that specifies message-level security when the resource shares its policy configuration through a WS-MetadataExchange request. Specify a system policy set that contains only WS-Security policies, only WS-Addressing policies, or both. The default policy set is SystemWSSecurityDefault.
wsMexPolicySetBinding
The name of the general binding for the policy set attachment when the resource shares its policy configuration through a WS-MetadataExchange request. Specify a general binding that is scoped to the global domain, or scoped to the security domain of this service. If you do not specify this property, the default binding is used. This parameter is valid only when you specify wsMex for the sharePolicyMethods parameter.
-remove
Whether the information about how the provider policy is shared is removed from the resource. (Boolean) This parameter takes the following values:
true
The information about how the provider policy is shared is removed from the resource.
false
This value is the default. The information about how the provider policy is shared is not removed from the resource.
Example
The following example removes the information about how the provider policy is shared from the WSSampleServices application:
AdminTask.setProviderPolicySharingInfo('[-applicationName WSSampleServices -resource WebService:/ -remove true]')The following example enables policy sharing, using WSDL exported by a ?WSDL HTTP Get request, for the EchoService service in the WSSampleServices application:
AdminTask.setProviderPolicySharingInfo('[-applicationName WSSampleServices -resource WebService:/WSSampleServicesSei.war:{http://example_path/}EchoService -sharePolicyMethods [//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ Get ]]')The following example enables policy sharing, using a WS-MetadataExchange request with message-level security, for the WSSampleServices application. Message level security is provided by the SystemWSSecurityDefault policy set and the "Provider sample" general binding.
AdminTask.setProviderPolicySharingInfo('[-applicationName WSSampleServices -resource WebService:/ -sharePolicyMethods [wsMex ] -wsMexProperties [ [wsMexPolicySetName [SystemWSSecurityDefault]] [wsMexPolicySetBinding [Provider sample]] ]]')
Web service providers and policy configuration sharing
Configure a service provider to share its policy configuration using wsadmin.sh
Create policy sets using wsadmin.sh
Configure general, cell-wide bindings for policies using wsadmin.sh
Use the wsadmin scripting AdminTask object for scripted administration
Start the wsadmin scripting client using wsadmin.sh
Related
getProviderPolicySharingInfo command
getClientDynamicPolicyControl command
setClientDynamicPolicyControl command
WS-Policy commands