SoapEarEnabler tool
The SoapEarEnabler tool is a Java application that enables a set of SOAP services within an Enterprise Application Archive (EAR) file. The SoapEarEnabler guides you through the required steps to enable one or more services within an application. It makes a backup copy of your original EAR file in case you later need to remove or add services.
Note: Start with an existing EAR file, either one created with the Application A Assembly Tool (AAT), or a previously created, valid, J2EE-compliant EAR file. The SoapEarEnabler tool does not accept a SOAP enabled EAR file as input.
You are prompted as to whether you want to add the administration client to the EAR file. This is a Web-based client that allows you to list all active services for a specific context from a browser window. With this interface, you can stop and start existing services. You can choose to not add this interface for security reasons, or you can secure the interface before making a service available.
Product
The SoapEarEnabler tool is available with WAS and WAS Network Deployment.
Authority
No special authority is required to run this script.
Usage
Perform these steps to invoke and use the SoapEarEnabler tool:
- Create an Apache SOAP deployment descriptor for each service to be enabled.
- You can invoke the SoapEarEnabler tool in these ways:
- From Qshell on iSeries:
The SoapEarEnabler tool is installed as an option during the installation of your administrative components.- From a workstation:
The SoapEarEnabler.bat (Windows) file or SoapEarEnabler.sh (UNIX) script is installed as a option during the installation of the workstation components. You must install the Application and Development Tools option on your workstation before you can start the tool on your workstation.
- On Windows systems, type SoapEarEnabler.bat.
- On UNIX-based systems, type SoapEarEnabler.sh.
- If running in interactive mode, enter the required information when prompted by the tool.
Silent mode
If you use the SoapEarEnabler in silent mode, supply all the required parameters as command line arguments. These include:
- ear-file-name
This is the name of the EAR file to which you want to add SOAP services. Note that you can type a path relative to the bin directory.- number-of-services
This is the number of services you want to enable for the EAR file. If you want to enable more than one service, specify that number of each of these parameters:
- deployment-descriptor-file-name
This is the name of the deployment descriptor file you are using to describe the SOAP service you are enabling for this EAR file.- Specify whether the service is an enterprise bean.
Type y if the service you are adding is an enterprise bean; type n if it is some other type of service.
- If the service is an enterprise bean, specify whether the enterprise bean Uniform Resource Indicator (URI) is already in the EAR file.
Type y if the URI is included in that file; type n if the URI is not included.- If the service is an enterprise bean, specify the number of additional JAR files.
If the enterprise bean includes more than one JAR file, type the number of additional JAR files it requires These JAR files must have URI entries in the EAR file.If this number is one or greater, type the fully qualified path for each JAR file, separated by a space.
- Specify whether this service should be secured.
Type y to secure this SOAP service; type n if you do not want to enable security.
- If you typed y, type the context root for the secured service. Example: /soapsec.
- If you typed n, type the context root for the nonsecured service. Example: /soap.
Silent mode examples
When invoking the SoapEarEnabler tool in silent mode, type the command and its parameters as a single, continuous line.
Note:The text for the following commands have been wrapped for better readability. If you are using the command from iSeries, use '/' in the pathnames instead of '\'.
This is an example of deploying one ejb as a nonsecured service:
soapearenabler soap.ear 1 xml-soap\java\samples\ejbadder\deploymentdescriptor.xml y adderservice-ejb.jar 1 samples.jar n /soapThis is an example of deploying one ejb as a nonsecured service, and one java class as a secured service:
soapearenabler soap.ear 2 xml-soap\java\samples\ejbadder\deploymentdescriptor.xml y adderservice-ejb.jar 1 samples.jar n xml-soap\java\samples\stockquote\deploymentdescriptor.xml n 1 samples.jar y /soap /soap-secThis is an example of deploying 2 java classes as nonsecured services:
soapearenabler soap.ear 2 xml-soap\java\samples\stockquote\deploymentdescriptor.xml n 1 samples.jar n xml-soap\java\samples\addressbook\deploymentdescriptor.xml n 1 samples.jar n /soapInteractive mode
In interactive mode, the SoapEarEnabler tool prompts you for all required information. For example:
Please enter the name of your ear file: ..\work\stockquote.ear How many services would you like your application to contain (1...n)? 1 Now prompting for info for service #1: Please enter the file name of the deployment descriptor xml file: ..\work\Stockading.xml Is this service an EJB (y/n)? n How many jar files are required for this service (0...n)? 1 Classpath requirement #1: Please choose a file ([1] samples.jar, [2] stockquote.war): 1 Should this service be secured (y/n)? n Please enter a context root for your nonsecured services (Example: /soap): /soapsamples Do you wish to install the administration client? Warning! You should not install this client in a production ear unless you intend to secure the URI to it. Install the administration client (y= yes/n= no)? y