+

Search Tips   |   Advanced Search

createWSNService command

Use the createWSNService command to create a new WS-Notification service and the associated objects that form the infrastructure of the WS-Notification configuration. A WS-Notification service provides access to service integration bus resources for web services publish and subscribe clients.

We can create a new WS-Notification service by using wsadmin.sh as described in this topic, or using the administrative console as described in Create a new Version 6.1 WS-Notification service and Create a new Version 7.0 WS-Notification service.

For a Version 6.1 WS-Notification service, first ensure that we have successfully configured an SDO repository as described in Configure the SDO repository. The SDO repository is used to store WSDL documents during the creation of the Version 6.1 WS-Notification service. If we do not configure the repository, an error message is displayed when creating the service.

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

The wsadmin scripting client is run from Qshell. For more information, see Configure Qshell to run WebSphere scripts .

Command-line help is provided for service integration bus commands:

After using the command, save the changes to the master configuration using the following command:

AdminConfig.save()


Purpose

This command creates a new WS-Notification service on a service integration bus. For a Version 6.1 WS-Notification service, the command also creates the three service integration bus inbound services that represent the three roles played by the broker, and creates the association between these objects and the new WS-Notification service.


Target object

An existing service integration bus (conditional - must be provided if the bus parameter is not supplied).


Required parameters

-name

The name to be given to the new WS-Notification service. The name forms part of the endpoint on which the service is exposed (that is, the URL used to access the WS-Notification service points defined under the service).

For Version 6.1 WS-Notification services, the service name is unique within a bus. For Version 7.0 WS-Notification services the service name is unique within the cell, which matches the administration model used for policy sets and therefore supports composition of Version 7.0 WS-Notification services with WS-ReliableMessaging.


Conditional parameters

-bus

The name of the service integration bus that is to host the WS-Notification service. This can be an existing bus, or the name of a new bus we want the command to create for you. This parameter should only be specified if a Target object is not provided.


Optional parameters

-type

The type of WS-Notification service created. Permitted values are V7.0 and V6.1 (the default).

  • Version 7.0: Use this type of service to compose a JAX-WS WS-Notification service with web service qualities of service (QoS) via policy sets, or to apply JAX-WS handlers to the WS-Notification service. This is the recommended type of service for new deployments. This WS-Notification option has been available in WebSphere Application Server from Version 7.0.

  • Version 6.1: Use this type of service if to expose a JAX-RPC WS-Notification service that uses the same technology provided in WAS v6.1, including the ability to apply JAX-RPC handlers to the service. This WS-Notification option has been available in WebSphere Application Server from Version 6.1.

Only specify the following optional parameters if the service type is Version 6.1:

  • jaxrpcHandlerList

  • outboundSecurityConfigName

  • outboundSecurityRequestBindingName

  • outboundSecurityResponseBindingName

For Version 7.0 WS-Notification services, equivalent functions to the Version 6.1 outbound security attributes are provided through policy set configuration.

Only specify the following optional parameters if the service type is Version 7.0:

  • jaxwsHandlerListName

  • queryWSDL

-description

An optional description of the WS-Notification service.

-permitsDynamicTopicNamespace

Indicates whether dynamic topic namespaces can be used within the WS-Notification service. That is, whether this service allows dynamic topic namespaces to be created at run time. For more information, see Dynamic topic namespace. Permitted values are TRUE (the default) and FALSE

Use this option to tightly control the topic namespaces used when connecting to a particular WS-Notification service (for example for security or auditing requirements). If we deselect this option, any applications that connect to the WS-Notification service and request topics from a dynamic topic namespace are stopped from publishing or receiving messages.

All messages published to a dynamic topic namespace are inserted with the default message reliability setting of reliable persistent. If this value is not acceptable, create a permanent topic namespace and manually configure the attribute to the appropriate value.

The dynamic topic namespaces used on a particular WS-Notification service are backed by a service integration bus topic space created automatically when creating the topic namespace. The syntax of topics used within this topic space is internal to the WS-Notification service implementation.

-dynamicTopicSpace

The name of the service integration bus topic space to be used as the dynamic topic space for this WS-Notification service. That is, the name of the bus topic space used to host the ad-hoc topic namespace, and to host dynamic topic namespaces if they are permitted. If not specified, this value defaults to WSN_dynamic_this_service_name.

-requiresRegistration

Boolean flag. Indicates whether publisher applications are required to register with the broker before they can publish notifications. Permitted values are TRUE and FALSE (the default).

-jaxwsHandlerListName

The JAX-WS handler list that is applied to outbound requests from the WS-Notification service. A handler list defines the handlers that are applied when making outbound web service invocations, for example monitoring outbound event notification (in response to a subscribe operation) and controlling demand-based publishers (subscribe, pause and resume). For more information about handler lists, see Configure JAX-WS handlers.

Only specify this parameter for Version 7.0 WS-Notification services.

-jaxrpcHandlerListName

The JAX-RPC handler list that is applied to outbound requests from the WS-Notification service - for example the broker delivering notifications to a consumer. For more information about handler lists, see Work with JAX-RPC handlers and clients.

Only specify this parameter for Version 6.1 WS-Notification services.

-outboundSecurityRequestBindingName

The security binding to be used with consumer notifications and remote publisher requests sent by this WS-Notification service.

Only specify this parameter for Version 6.1 WS-Notification services.

-outboundSecurityResponseBindingName

The security binding to be used with remote publisher responses received by this WS-Notification service.

Only specify this parameter for Version 6.1 WS-Notification services.

-outboundSecurityConfigName

Details of how security is applied to requests and responses.

Only specify this parameter for Version 6.1 WS-Notification services.

-queryWSDL

Boolean flag. Indicates whether the Version 7.0 WS-Notification service queries the WSDL of other WS-Notification web services when interacting with them. Permitted values are TRUE (the default) and FALSE.

By setting this parameter to FALSE we can improve performance by avoiding expensive WSDL queries. However, you should note the following considerations when WSDL querying is not enabled:

  • WS-Notification attempts to discover binding information (which is usually discovered through the WSDL) by using other means. WS-Notification uses the SOAP version associated with the WS-Notification service point where subscriptions were made (by other web services), or where administered subscriptions were created (by an administrator).

  • There are some circumstances in which WS-Notification might be unable to determine binding information. This can happen when cleaning up subscriptions where the associated service point has been deleted and configuration information is no longer available. Under these circumstances WS-Notification makes a "best guess" at binding information to use to clean up the subscriptions.

  • There is one scenario where incorrect binding information is used. That is, when a subscriber subscribes to use a particular SOAP binding, on behalf of a NotificationConsumer that expects notifications through a different SOAP binding.

Only specify this parameter for Version 7.0 WS-Notification services.


Examples

Create a Version 6.1 WS-Notification service (equivalent to omitting the -type parameter):

Create a Version 7.0 WS-Notification service that allows composition with WS-ReliableMessaging:

Create a Version 7.0 WS-Notification service with a non-null handler list:

Create a Version 7.0 WS-Notification service that does not query WSDL:

Set the custom property to enable strict topic checking on this WS-Notification service:


Related concepts

  • WS-Notification

  • Reasons to create multiple WS-Notification services in a bus


    Related tasks

  • Use WS-Notification for publish and subscribe messaging for web services

  • Secure WS-Notification

  • Create a new Version 6.1 WS-Notification service

  • WS-Notification troubleshooting tips


    Related information:

  • WS-Notification services [Settings] Reference topic