Friday, April 8, 2011

JAX-WS with JBoss 6 Day 9 : handler framework

The handler framework is implemented by a JAX-WS protocol binding in both client and server side runtimes.

JAX-WS defines two types of handler:

Logical Handlers that only operate on message context properties and message payloads. Logical handlers are protocol agnostic and are unable to affect protocol specific parts of a message. Logical handlers are handlers that implement javax.xml.ws.handler.LogicalHandler.

Protocol Handlers that operate on message context properties and protocol specific messages. Protocol handlers are specific to a particular protocol and may access and change protocol specific aspects of a message. Protocol handlers are handlers that implement any interface derived from javax.xml.ws.handler.Handler except javax.xml.ws.handler.LogicalHandler.

JAX-WS only defines APIs for programmatic configuration of client side handler chains – server side handler
chains are expected to be configured using deployment metadata.

1. LogicalHandler


2.SOAPHandler


3.configuration


4. web service


5. test case , refer to previous days

6. system out
16:09:36,092 INFO [STDOUT] Inbound message : HelloWSSoapHandler
16:10:06,044 INFO [STDOUT] Inbound message : HelloWSLogicalHandler
16:10:11,450 INFO [STDOUT] Outbound message : HelloWSLogicalHandler
16:10:11,450 INFO [STDOUT] Outbound message : HelloWSSoapHandler

7. diagram

No comments: