Configure web service client port information
A web service can have multiple ports. We can view and configure the port attributes for each defined web service port.
If we have not deployed the EAR file yet, we 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 that the client waits longer when it is configured to use a Java Message Service (JMS) transport to access a web service.
- Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.
- 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 specified 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:
$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 used to override the current endpoint
- overridden_binding_namespace specifies the WSDL file binding namespace URI to use with the port
- 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 Configure web service client-preferred port mappings Start the wsadmin scripting client
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands