+

Search Tips   |   Advanced Search

Loading JAX-RPC handler classes

A JAX-RPC handler interacts with messages as they pass into and out of the service integration bus, therefore we make the handler class available to the server or cluster that hosts the inbound or outbound port for the service to monitor.

This task assumes that we have already created the handler. We can do this by using IBM Rational Application Developer or a similar tool. For more information, see the IBM developerWorks article Support for J2EE Web Services in WebSphere Studio Application Developer V5.1 -- Part 3: JAX-RPC Handlers.

Before we can configure the JAX-RPC handler for use with service integration bus-deployed web services, you must make the handler class available. To monitor an inbound port, make the handler class available to the server on which the endpoint listener for that port is located. To monitor an outbound port, make the handler class available to the server on which the outbound port destination is localized.

To make the handler class available to the server or cluster that hosts the port to monitor, we create a shared library for the class then add the shared library to the class loader for the server.

  1. Package the class file for the handler as a JAR file, then copy the JAR file into a directory.

    Make the handler class available to the application server in one of the following ways:

    • Copy the individual class file into a directory structure under app_server_root/classes that matches the package name of the class, where app_server_root is the root directory for the installation of WAS. For example a handler class com.ibm.jaxrpc.handler.TestHandler is copied into the app_server_root/classes/com/ibm/jaxrpc/handler directory.

    • Package the class files for all the handlers as a JAR file, then copy it into the app_server_root/lib/app directory.

  2. Start the console.

  3. Create a shared library for the JAR file.

    1. Navigate to Environment -> Shared libraries.

    2. Set the scope at which we want the new library to be visible, then click New.

    3. Give the new library a name.

    4. Set the class path to the directory and file name for the handler JAR file.

    5. Save the changes to the master configuration.

    For more information, see Create shared libraries.

  4. Create a class loader for the server or cluster on which to make the JAR file available.

    1. Navigate to Servers -> Server Types -> WebSphere application servers -> server_name -> [Server Infrastructure] Java and Process Management -> Class loader.

    2. Click New.

    3. Click OK.

    4. Save the changes to the master configuration.
    For more information, see Configure class loaders of a server.

  5. Add the shared library to the class loader for the server.

    1. Navigate to Servers -> Server Types -> WebSphere application servers -> server_name -> [Server Infrastructure] Java and Process Management -> Class loader -> class_loader_name > [Additional Properties] Shared library references.

    2. Click Add.

    3. Click on the name of the new library, then click OK.

    4. Save the changes to the master configuration.
    For more information, see Associate shared libraries with servers.


What to do next

We are now ready to configure the handler for use (as part of a handler list) with service integration bus-enabled web services.


Related information:

  • Modify an existing JAX-RPC handler configuration
  • Delete JAX-RPC handler configurations