Using JAX-WS handlers with HTTP Binding Component
Overview
In JAX-WS, there is the concept of
handlers which are really interceptors to inject application logic to alter the protocol or payload messages before and/or after service
invocations. These are application level implementations which can be invoked at strategic places to extend the message processing capabilities.
Check this out
for more elaborate overviews of the JAX-WS handlers.
How to enable JAX-WS handlers in OpenESB
In OpenESB, we allow user handler implementations to be plugged into JAX-WS runtime through HTTP BC. A few things worth mentioning are:
- Handler implementation can be implemented in Java SE project(s) or any other standalone environment, i.e. handler implementation(s) can also be compiled outside of the IDE.
- Handler is an user implemented class with the only requirement of implementing the well-defined JAX-WS handler interface (SOAPHandler, LogicalHandler, and the optimized version of the SOAPHandler called MessageHandler)
- Handler implementation and configuration does not affect the application composition, i.e. building a BPEL process which adds a webservice request message
handler to tweak the SOAP headers before invoking a remote service should/would not affect the BPEL logic.
- Handler configuration, i.e. the particular handler class to invoke, will be done on the SOAP binding in CASA editor
- As mentioned earlier, handlers can be configured on the SOAP binding in CASA. Since it is a port (endpoint) level configuration, the handler configuration is enabled on the SOAP
endpoint icon (i.e. the "greenish" and the "pupleish" arrows), as shown in the screen shot below:
- Clicking on the "..." button in the endpoint property sheet for "Handlers" will bring up the handler configuration editor:
- Clicking on the "Add" button will bring up a file chooser window. From here, user can browse to a NetBeans Java SE project, or a file directory containing the jar file(s) for
the handler implementation and any dependency libraries, or a single jar file containing all the handler(s) and dependency classes.
CASA introspects the selected project folder or the jar file(s) and populates the "Handler Chain" list with all the JAX-WS handlers found.
Detail of the selected handler is
displayed in the "Handler Details" section.
A sample
This page (revision-8) was last changed on
14-Sep-09 16:09 PM, -0700
by Sherry Weng.
This page was created on
14-Sep-09 11:04 AM, -0700 by Sherry Weng.
More info...
| Version |
Date |
Author |
Size |
Changes ... |
|
18
|
14-Sep-09 17:49 PM, -0700
|
Sherry Weng |
4931 |
to previous
|
|
17
|
14-Sep-09 17:16 PM, -0700
|
Sherry Weng |
4907 |
to previous
|
to last
|
|
16
|
14-Sep-09 17:11 PM, -0700
|
Sherry Weng |
9324 |
to previous
|
to last
|
|
15
|
14-Sep-09 17:11 PM, -0700
|
Sherry Weng |
9322 |
to previous
|
to last
|
|
14
|
14-Sep-09 17:10 PM, -0700
|
Sherry Weng |
9330 |
to previous
|
to last
|
|
13
|
14-Sep-09 17:07 PM, -0700
|
Sherry Weng |
9332 |
to previous
|
to last
|
|
12
|
14-Sep-09 17:06 PM, -0700
|
Sherry Weng |
9328 |
to previous
|
to last
|
|
11
|
14-Sep-09 17:03 PM, -0700
|
Sherry Weng |
9337 |
to previous
|
to last
|
|
10
|
14-Sep-09 17:01 PM, -0700
|
Sherry Weng |
9342 |
to previous
|
to last
|
|
9
|
14-Sep-09 16:57 PM, -0700
|
Sherry Weng |
8858 |
to previous
|
to last
|
|
8
|
14-Sep-09 16:09 PM, -0700
|
Sherry Weng |
2869 |
to previous
|
to last
|
|
7
|
14-Sep-09 16:01 PM, -0700
|
Sherry Weng |
2870 |
to previous
|
to last
|
|
6
|
14-Sep-09 15:43 PM, -0700
|
Sherry Weng |
1988 |
to previous
|
to last
|
|
5
|
14-Sep-09 15:33 PM, -0700
|
Sherry Weng |
1892 |
to previous
|
to last
|
|
4
|
14-Sep-09 14:30 PM, -0700
|
Sherry Weng |
680 |
to previous
|
to last
|
|
3
|
14-Sep-09 14:09 PM, -0700
|
Sherry Weng |
538 |
to previous
|
to last
|
|
2
|
14-Sep-09 11:06 AM, -0700
|
Sherry Weng |
209 |
to previous
|
to last
|
|
1
|
14-Sep-09 11:04 AM, -0700
|
Sherry Weng |
53 |
to last
|