Configuring Web service client port information with the wsadmin tool

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

 

Before you begin

If you have not deployed the EAR file yet, we need to have it ready or already Deploying Web services applications onto application servers into WebSphere Application Server.

For more information about wsadmin options, review Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands

 

About this task

This task supports configuring 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.

  2. At the wsadmin command prompt, enter the command syntax. Use install, installInteractive, edit or editInteractive options. The following example is the correct syntax form

    $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 we can finish any other configurations, start or restart the application, and verify expected behavior of the Web service.


Related tasks
Web services client bindings Configuring Web service client-preferred port mappings with the wsadmin tool Related reference
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands