WAS v8.5 > Script the application serving environment (wsadmin) > Welcome to scripting for web services > Configure web services applications using wsadmin.sh

Configure web service client port information using wsadmin.sh

A web service can have multiple ports. We can configure the port attributes for each defined web service port.

If we have not deployed the EAR file yet, you need to have it ready or already deployed to the application server. We can configure binding attributes 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 the client waits longer when it is configured to use a JMS transport to access a web service.

  1. Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.

  2. Configure the web service client port information.

    To use the existing listener port instead of using or creating a new activation specification, determine whether the EJB JAR version is lower than 2.1. The system automatically creates and uses an activation specification when we specify the -usedefaultbindings option to deploy an application. If an activation specification exists, the system ignores the listener port, and instead uses the activation specification. To deploy an application with an EJB JAR version greater than or equal to 2.1 using the defined listener ports instead of a new activation specification, set the com.ibm.websphere.management.application.dfltbndng.mdb.preferexisting system property to true in the wsadmin.properties file in the properties directory of the profile of interest.

    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 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 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 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 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 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 {}{}{}{}{}}}

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


Related


Web services client bindings
Configure web service client-preferred port mappings using wsadmin.sh
Start the wsadmin scripting client using wsadmin.sh


Reference:

Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands using wsadmin.sh


+

Search Tips   |   Advanced Search