endptEnabler command
The endptEnabler command enables a set of Web services within an EAR file. The endptEnabler command must be run on EAR files containing Web service-enabled EJB modules.
Each router module provides a Web service endpoint for a particular transport. For example, an HTTP router module can be added so that the Web service can receive requests over the HTTP transport, and a Java Messaging Service (JMS) router module can be added so that the Web service can receive requests from a JMS queue or topic.
In its interactive mode, the endptEnabler command guides you through the required steps to enable one or more services within an application. The endptEnabler command makes a backup copy of your original EAR file in the event that you need to remove or add services at a later time. If your EAR file contains a Web service-enabled EJB JAR file, run the endptEnabler command before the EAR file is deployed. Otherwise, you do not need to run the command.
endptEnabler usage syntax
Invoke the endptEnabler command from the WebSphere Application Server bin directory. The command syntax is as follows:
endptEnabler [-verbose|-v] [-quiet|-q] [-help|-h|-?] [-properties|-p properties-filename] [-transport|-t default-transports] [-enableHttpRouterSecurity] [ear-filename]
All parameters are optional and described as follows:
- -verbose, -v
Detailed progress messages are displayed as the tool processes the EAR file. This command-line option is mapped to the verbose global property.
- -quiet, -q
No per-module progress messages are displayed as the tool processes the EAR file. This command-line option is mapped to the quiet global property.
- -help, -h, -?
A brief help message is displayed explaining the various options.
- -properties, -p <properties-filename>
Properties from the file properties-filename are read and used to control the behavior of the tool.
- -transport, -t <default-transports>
Specifies the default list of transports for which router modules should be created for each EJB JAR file contained in the EAR file. This command-line option is mapped to the defaultTransports global property. Examples are:
-transport http (the default) -transport jms -t http,jms
- -enableHttpRouterSecurity
Enables you to add a security policy for all authenticated users to protect the HTTP router module if all the EJB's are secured in the EJB JAR file. This command-line option is mapped to the http.enableRouterSecurity global property.
- <ear-filename>
Specifies the name of the EAR file to be processed.
If the ear-filename parameter is not entered on the command line, the interactive mode is used. In interactive mode, you are prompted for the EAR file name, router module names and other important values as the processing occurs. The following dialog is an example of the endptEnabler interactive mode:
Note: In this dialog, user input is in fixed width font, and endptEnabler output is in bold.
endptEnabler<enter> WSWS2004I: IBM WebSphere Application Server Release 5 WSWS2005I: Web Services Enterprise Archive Endpoint Enabler Tool. WSWS2007I: (C) COPYRIGHT International Business Machines Corp. 1997, 2003 WSWS2006I: Please enter the name of your EAR file: AddressBook.ear<enter> WSWS2003I: Backing up EAR file to: AddressBook.ear~ WSWS2016I: Loading EAR file: AddressBook.ear WSWS2017I: Found EJB Module: AddressBookEJB.jar WSWS2029I: Enter http router name for EJB Module AddressBookEJB [AddressBookEJB_HTTPRouter.war]:<enter> WSWS2030I: Enter http context root for EJB Module AddressBookEJB [/AddressBookEJB]:<enter> WSWS2024I: Adding http router for EJB Module AddressBookEJB.jar. WSWS2036I: Saving EAR file AddressBook.ear... WSWS2037I: Finished saving the EAR file. WSWS2018I: Finished processing EAR file AddressBook.ear.If the ear-filename parameter is entered on the command line, the non-interactive mode is used. In non-interactive mode, router module names and other important values are determined from user-specified properties or default values.
endptEnabler properties
The endptEnabler command allows you to control its run time behavior by specifying a set of properties with the -properties command-line option. These properties fall into two categories: global and per-module. Global properties affect the overall behavior of the tool as it processes multiple EJB JAR modules within the EAR file. Per-module properties affect the processing of a particular EJB JAR module.
Global properties
The following table describes the global properties supported by the endptEnabler command:
Property name Description Default value verbose Displays detailed progress messages. False quiet Displays only brief progress messages. False http.enableRouter Security Enables you to add a security policy for all authenticated users to protect the HTTP router module if all the EJB's are secured in the EJB JAR file. False http.router ModuleNameSuffix Specifies the suffix used to construct default HTTP router module names. The .war extension is added by the endptEnabler command. _HTTPRouter jms.routerModule NameSuffix Specifies the suffix used to construct default JMS router module names. The .jar extension is added by the endptEnabler command. _JMSRouter jms.listenerInput PortNameSuffix Specifies the suffix used to construct default Listener Input Port names. _ListenerPort jms.default DestinationType Specifies the default destination type to use for all JMS router modules added to the EAR file. This should be either queue or topic. queue defaultTransports Specifies the default list of transports for which router modules should be created. The list can contain the values http and jms. Multiple values are separated by a comma. Examples are: http, jms and http,jms. http
Per-module properties
The following table describes the per-module properties supported by the endptEnabler command. ejbJarName refers to the name of an EJB JAR module within the EAR file, without the .jar extension.
Property name Description Default value <ejbJarName> .transports Lists the transports for which router modules should be created for a particular EJB JAR file. The list can contain the values http and jms. Multiple values are separated by a comma. Examples are: http, jms and http,jms. http <ejbJarName>.http.skip Specifies the flag which bypasses the addition of an HTTP router module even if it would otherwise be added (based on other properties). Valid values are true and false. False <ejbJarName> .http.routerModuleName Specifies the name of the HTTP router module for a particular EJB JAR file. ejbJarName_HTTPRouter <ejbJarName> .http.contextRoot Specifies the context root associated with the HTTP router module for a particular EJB JAR file. /ejbJarName <ejbJarName>.jms.skip Specifies the Flag which bypasses the addition of an HTTP router module even if it would otherwise be added (based on other properties). Valid values are true and false. false <ejbJarName>.jms. routerModuleName Specifies the name of the JMS router module for a particular EJB JAR file. ejbJarName_JMSRouter <ejbJarName>. jms.listenerInputPort Name Specifies the name of the Listener Input Port to be associated with the JMS router module. ejbJarName_ListenerPort <ejbJarName>.ejb JarName>.jms. destinationType Specifies the JMS destination type associated with the JMS router. Valid values are queue and topic. queue
Properties example
Suppose an EAR file contains an EJB JAR file named, StockQuoteEJB.jar that contains Web services. The following set of properties might be used to control the endptEnabler command runtime behavior as it processes the EAR file:
StockQuoteEJB.transports=http,jms StockQuoteEJB.http.routerModuleName=StockQuoteEJB_HTTP StockQuoteEJB.http.contextRoot=/StockQuote StockQuoteEJB.jms.routerModuleName=StockQuoteEJB_JMS StockQuoteEJB.jms.listenerInputPortName=StockQuote_LP StockQuoteEJB.jms.destinationType=queue
endptEnabler examples
The following commands are examples of how the endptEnabler command can be used:
endptEnabler MyApp.ear endptEnabler -t jms,http MyApp.ear endptEnabler -v -properties MyApp.props MyApp.ear endptEnabler -q -t jms MyApp.ear
Enabling a Web services-enabled EAR file
Assembling Web services applications based on Web Services for J2EE