+

Search Tips   |   Advanced Search

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.

(iseries) The wsadmin scripting client is run from Qshell. For more information, see the topic "Configure Qshell to run WebSphere Application Server scripts".

This command is valid only when it is used with WebSphere Application Server Version 7 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, enter the following command at the wsadmin prompt:

print AdminTask.help('PolicySetManagement')

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

print AdminTask.help('command_name')

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

  • AdminConfig.save()


    Purpose

    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

    How the policy configuration of the resource can be shared. (String array)

    Enter either or both of the following values:

    httpGet

    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 containing 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 we do not specify this property, the default binding is used.

    This parameter is valid only when specified 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

    Default. The information about how the provider policy is shared is not removed from the resource.


    Examples

    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 [httpGet ]]')

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


    Related concepts

  • Web service providers and policy configuration sharing


    Related tasks

  • Configure a service provider to share its policy configuration
  • Create policy sets
  • Configure general, cell-wide bindings for policies
  • Use the wsadmin scripting AdminTask object for scripted administration
  • Start the wsadmin scripting client

  • getProviderPolicySharingInfo command
  • getClientDynamicPolicyControl command
  • setClientDynamicPolicyControl command