LibraryLink ToToggle FramesPrintFeedback

Spring Configuration

The easiest way to configure an endpoint to use a handler chain is to define the chain in the endpoint's configuration. This is done by adding a jaxwxs:handlers child to the element configuring the endpoint.


A handler chain added through the configuration file takes precedence over a handler chain configured programatically.

To configure an endpoint to load a handler chain you do the following:

  1. If the endpoint does not already have a configuration element, add one.

    For more information on configuring FUSE Services Framework endpoints see Chapter 3 in the Configuring and Deploying FUSE™ Services Framework Endpoints.

  2. Add a jaxws:handlers child element to the endpoint's configuration element.

  3. For each handler in the chain, add a bean element specifying the class that implements the handler.


    If your handler implementation is used in more than one place you can reference a bean element using the ref element.

The jaxws:handlers element defines a handler chain in an endpoint's configuration. It can appear as a child to all of the JAX-WS endpoint configuration elements. These are:

  • jaxws:endpoint configures a service provider.

  • jaxws:server also configures a service provider.

  • jaxws:client configures a service consumer.

You add handlers to the handler chain in one of two ways:

  • add a bean element defining the implementation class

  • use a ref element to refer to a named bean element from elsewhere in the configuration file

The order in which the handlers are defined in the configuration is the order in which they will be executed. The order may be modified if you mix logical handlers and protocol handlers. The run time will sort them into the proper order while maintaining the basic order specified in the configuration.

Example 21.17 shows the configuration for a service provider that loads a handler chain.