Loading JAX-WS handler classes

A JAX-WS handler interacts with messages through a Version 7.0 WS-Notification service point (for inbound invocation handling) or WS-Notification service (for outbound invocation handling), therefore you must make the handler class available to the server or cluster that hosts the WS-Notification service point or service that you want to monitor.

Before you begin

This task assumes that you have already created your handler. You can do this by using IBM® Rational® Application Developer or a similar tool.

About this task

Before you can configure a JAX-WS handler for use with WS-Notification, you must make the handler class available to the server or cluster that hosts the WS-Notification service point or service that you want to monitor. To do this, you create a shared library for the class then add the shared library to the class loader for the server.

Procedure

  1. Package the class file for your handler as a JAR file, then copy the JAR file into a convenient 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 WebSphere® Application Server. For example a handler class com.ibm.jaxws.handler.TestHandler is copied into the app_server_root/classes/com/ibm/jaxws/handler directory.
    • Package the class files for all your handlers as a JAR file, then copy it into the app_server_root/lib/app directory.
  2. Start the administrative console.
  3. Create a shared library for the JAR file.
    1. Navigate to Environment -> Shared libraries .
    2. Set the scope at which you 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 your handler JAR file.
    5. Save your changes to the master configuration.

    For more information, see Creating shared libraries.

  4. Create a class loader for the server or cluster on which you want 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 your changes to the master configuration.
    For more information, see Configuring 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 your new library, then click OK.
    4. Save your changes to the master configuration.
    For more information, see Associating shared libraries with servers.

What to do next

You are now ready to create a new JAX-WS handler configuration by using the administrative console or by using the createJAXWSHandler command.



In this information ...


Related concepts

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 5, 2014 9:49:51 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=tjwsn_jaxws_handler_class
File name: tjwsn_jaxws_handler_class.html