Configuring web service client port information using wsadmin scripting

A web service can have multiple ports. You can view and configure the port attributes for each defined web service port.

Before you begin

If you have not deployed the enterprise archive (EAR) file yet, you need to have it ready or already deployed to the application server.

About this task

You can configure binding attributes that are associated with the web service client port, including synchronization timeout, overridden endpoint URL and transport attributes with the WebServicesClientBindPortInfo command-line option. A typical usage scenario for this command-line option is to customize the timeout value of the client so that the client waits longer when it is configured to use a Java Message Service (JMS) transport to access a web service.

Procedure

  1. Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.
  2. Configure the web service client port information.

    如果要使用現有的接聽器埠,而不使用或建立新的啟動規格,請判斷 EJB JAR 版本是否早於 2.1 版。 當您指定 -usedefaultbindings 選項來部署應用程式時,系統會自動建立及使用啟動規格。 如果啟動規格存在,系統會忽略接聽器埠,改用啟動規格。 如果要利用已定義的接聽器埠來部署 EJB JAR 2.1 版或以上的應用程式,而不用新的啟動規格,請將相關設定檔的 properties 目錄之下 wsadmin.properties 檔中的 com.ibm.websphere.management.application.dfltbndng.mdb.preferexisting 系統內容設為 true

    Use install, installInteractive, edit or editInteractive options to configure the web service client port information, as the following example demonstrates:

    $AdminApp install app_name {-usedefaultbindings 
    -deployejb -WebServicesClientBindPortInfo {{module_name EJB_name
    Web_service port timeout basic_authentication_id basic_authentication_password
    SSL_alias overridden_endpoint overridden_binding_namespace }...}}
    The previous example indicates that the port information of multiple ports can be changed using one WebServicesClientBindPortInfo command, where:
    • app_name is the application name, for example, MultiEjbJar.ear
    • module_name is the module name, for example ejbclientonly.jar
    • EJB_name is the name of the EJB that is not a web module, for example, Exchange
    • Web_service is the name of the web service, for example service/StockQuoteService
    • port is the name of the port, for example StockQuote
    • timeout specifies the number of seconds that the client waits for a response
    • basic_authentication_id is the basic authentication transport ID
    • basic_authentication_password is the basic authentication transport password
    • SSL_alias identifies the SSL alias for the port
    • overridden_endpoint is the name of the endpoint that is used to override the current endpoint
    • overridden_binding_namespace specifies the WSDL file binding namespace URI to use with the port
  3. Save the configuration changes with the $AdminConfig save command:

Results

The client port information that is associated with the web service client port are configured.

Example

$AdminApp installInteractive MultiEjbJar.ear {-WebServicesClientBindPortInfo 
 {{ejbclientonly.jar Exchange service/StockQuoteService StockQuote 6000 jsmith js9password level3ssl 
 http://fastball.houston.ibm.com/newURL http://fastball.houston.ibm.com/newBindName}}
 {ejbclientonly.jar Exchange service/StockQuoteService StockQuote2 9000 {}{}{}{}{}}}

What to do next

Now you can finish any other configurations, start or restart the application, and verify expected behavior of the web service.

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:19
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_portattributewsadmin
檔名:txml_portattributewsadmin.html