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.
You can create a new WS-Notification service by using the wsadmin tool as described in this topic, or by using the administrative console as described in 建立新的 6.1 版 WS-Notification 服務 and 建立新的 7.0 版 WS-Notification 服務.
If you are creating a Version 6.1 WS-Notification service, you must first ensure that you have successfully configured an SDO repository as described in Installing and configuring the SDO repository. The SDO repository is used to store WSDL documents during the creation of the Version 6.1 WS-Notification service. If you do not configure the repository, an error message is displayed when you create the service.
如果要執行這個指令,請使用 wsadmin Scripting 用戶端的 AdminTask 物件。
wsadmin Scripting 用戶端是從 Qshell 執行.
如需相關資訊,請參閱利用 wsadmin Script 配置 Qshell 來執行 WebSphere Script.
服務整合匯流排指令有指令行說明:
- 如需可用的 WS-Notification 指令清單,以及每個指令的簡要說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('WSNotificationCommands')
- 如需給定指令的概觀說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('command_name')
AdminConfig.save()
Purpose
This command creates a new WS-Notification service on a service integration bus. If you are creating 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. 這個名稱構成顯現服務之端點的一部分(換言之,就是用來存取服務之下所定義之 WS-Notification 服務點的 URL)。
- 如果是 6.1 版 WS-Notification 服務,服務名稱在匯流排內是唯一的。 如果是 7.0 版 WS-Notification 服務,服務名稱在 Cell 內是唯一的,符合原則集所用的管理模型,因此,支援組合 7.0 版 WS-Notification 服務與 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 that you 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 that is created. Permitted
values are V7.0 and V6.1 (the default).
- 7.0 版:如果您想要透過原則集,將 JAX-WS WS-Notification 服務與 Web 服務的服務品質 (QoS) 組合起來,或您想要將 JAX-WS 處理程式套用於 WS-Notification 服務,請使用這種類型的服務。這是建議新部署採用的服務類型。 自 7.0 版開始,WebSphere Application Server 中已有提供這個 WS-Notification 選項。
- 6.1 版:如果您想要顯現使用 WebSphere Application Server 6.1 版中所提供之相同技術的 JAX-RPC WS-Notification 服務,其中包括將 JAX-RPC 處理程式套用於服務的功能,請使用這種類型的服務。自 6.1 版開始,WebSphere Application Server 中已有提供這個 WS-Notification 選項。
- Only specify the following optional parameters if the service type is Version 6.1:
- -jaxrpcHandlerList
- -outboundSecurityConfigName
- -outboundSecurityRequestBindingName
- -outboundSecurityResponseBindingName
Note: 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
- -permitsDynamicTopicNamespace
也就是說,這個服務是否容許在執行時期建立動態主題名稱空間。 For more information, see Dynamic topic namespace. Permitted values are TRUE (the default) and FALSE
請利用這個選項來嚴格控制連接到特定 WS-Notification 服務時所用的主題名稱空間(例如,為了安全或審核需求)。 如果您取消選取這個選項,任何從動態主題名稱空間連接到 WS-Notification 服務和要求主題的應用程式,都會無法發佈或接收訊息。
在所有發佈到動態主題名稱空間的訊息中,都會插入可靠持續性的預設訊息可靠性設定。 如果這個值無法接受,請建立一個永久主題名稱空間,將屬性手動配置成適當的值。
Note: 特定 WS-Notification 服務上所用的動態主題名稱空間,受建立主題名稱空間時所自動建立的服務整合匯流排主題空間支持。 這個主題空間內所用的主題語法,是在 WS-Notification 服務實作之內。- -dynamicTopicSpace
- 換言之,就是用來管理特別的主題名稱空間,以及管理動態主題名稱空間(如果允許的話)的匯流排主題空間名稱。 If not specified, this value defaults to WSN_dynamic_this_service_name.
- -requiresRegistration
- Boolean flag. Permitted values are TRUE and FALSE (the default).
- -jaxwsHandlerListName
- 處理程式清單定義發出出埠 Web 服務呼叫時所適用的處理程式,例如,監視出埠事件通知(回應訂閱作業)以及控制隨需型發佈者(訂閱、暫停和回復)。 如需處理程式清單的相關資訊,請參閱配置 JAX-WS 處理程式。
- 只指定 7.0 版 WS-Notification 服務的這個參數。
- -jaxrpcHandlerListName
- 如需處理程式清單的相關資訊,請參閱Working with JAX-RPC handlers and clients。
- 只指定 6.1 版 WS-Notification 服務的這個參數。
- -outboundSecurityRequestBindingName
- 只指定 6.1 版 WS-Notification 服務的這個參數。
- -outboundSecurityResponseBindingName
- 只指定 6.1 版 WS-Notification 服務的這個參數。
- -outboundSecurityConfigName
- 只指定 6.1 版 WS-Notification 服務的這個參數。
- -queryWSDL
- Boolean flag. 指出當 7.0 版 WS-Notification 服務與其他各項 WS-Notification Web 服務互動時,是否查詢它們的 WSDL。 Permitted values are TRUE (the default) and FALSE.
- By setting this parameter to FALSE you can improve performance by avoiding expensive WSDL queries. 不過,未啟用 WSDL 查詢時,您應該注意下列注意事項:
- WS-Notification 會嘗試利用其他方法來探索連結資訊(通常是透過 WSDL 來探索)。WS-Notification 使用建立訂閱(由其他 Web 服務建立)或建立受管理訂閱(由管理者建立)之 WS-Notification 服務點的相關 SOAP 版本。
- 在某些情況下,WS-Notification 可能無法判斷連結資訊。 當清除刪除了相關服務點,以及清除配置資訊已不再可用的訂閱時,就可能發生這個情況。 在這些情況之下,WS-Notification 會在連結資訊上進行「最佳猜測」,用來清除訂閱。
- 有一種實務會使用不正確的連結資訊。 也就是說,當訂閱者訂閱要使用特定 SOAP 連結時,它所要代表的 NotificationConsumer 卻預期通知會透過不同的 SOAP 連結。
- 只指定 7.0 版 WS-Notification 服務的這個參數。
Examples
newService = AdminTask.createWSNService(["-bus", "bus1", "-name",
"NewWSNService", "-type", "V6.1"] )
newService = AdminTask.createWSNService(["-bus", "bus1", "-name",
"NewWSNService", "-type", "V7.0"] )
newService = AdminTask.createWSNService(["-bus", "bus1", "-name",
"NewWSNService", "-type", "V7.0", "-jaxwsHandlerListName", "myHandlerList"] )
newService = AdminTask.createWSNService(["-bus", "bus1", "-name",
"NewWSNService", "-type", "V7.0", "-queryWSDL", "false"] )
- Using Jython:
propName = ["name", "com.ibm.ws.sib.wsn.strictTopicChecking"] propValue = ["value", "TRUE"] propAttrs = [propName, propValue] AdminConfig.create("Property", newService, propAttrs)
- Using Jacl:
set propName [list name "com.ibm.ws.sib.wsn.strictTopicChecking"] set propValue [list value "TRUE"] set propAttrs [list $propName $propValue] $AdminConfig create Property $newService $propAttrs