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:

  1. Create an Apache SOAP deployment descriptor for each service to be enabled.
  2. 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.

  3. 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:

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 /soap

This 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-sec

This 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 /soap

Interactive 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