org.jboss.seam.webservice
Class SOAPRequestHandler

java.lang.Object
  extended by org.jboss.seam.webservice.SOAPRequestHandler
All Implemented Interfaces:
javax.xml.ws.handler.Handler, javax.xml.ws.handler.soap.SOAPHandler

public class SOAPRequestHandler
extends Object
implements javax.xml.ws.handler.soap.SOAPHandler

A SOAP request handler for controlling Seam's lifecycle and managing conversation propagation.

Author:
Shane Bryzak

Field Summary
static QName CIDQN
          The QName of the conversation ID element in the SOAP request header
 
Constructor Summary
SOAPRequestHandler()
           
 
Method Summary
 void close(javax.xml.ws.handler.MessageContext messageContext)
          Called just prior to dispatching a message, fault or exception.
 String getHandlerName()
           
 Set<QName> getHeaders()
           
 boolean handleFault(javax.xml.ws.handler.MessageContext messagecontext)
           
 boolean handleInbound(javax.xml.ws.handler.MessageContext messageContext)
          Inbound message handler.
 boolean handleMessage(javax.xml.ws.handler.MessageContext msgContext)
          Handle inbound and outbound messages
 boolean handleOutbound(javax.xml.ws.handler.MessageContext messageContext)
          Sets the conversation ID in the outbound SOAP message.
 void setHandlerName(String handlerName)
           
 void setHeaders(Set<QName> headers)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CIDQN

public static final QName CIDQN
The QName of the conversation ID element in the SOAP request header

Constructor Detail

SOAPRequestHandler

public SOAPRequestHandler()
Method Detail

handleMessage

public boolean handleMessage(javax.xml.ws.handler.MessageContext msgContext)
Handle inbound and outbound messages

Specified by:
handleMessage in interface javax.xml.ws.handler.Handler
Parameters:
msgContext - The message context
Returns:
boolean true if processing should continue

handleInbound

public boolean handleInbound(javax.xml.ws.handler.MessageContext messageContext)
Inbound message handler. Seam contexts should be initialized here, and the conversation ID (if present) is extracted from the request.

Parameters:
messageContext - The message context
Returns:
boolean true if processing should continue

handleOutbound

public boolean handleOutbound(javax.xml.ws.handler.MessageContext messageContext)
Sets the conversation ID in the outbound SOAP message.

Parameters:
messageContext - The message context
Returns:
boolean true if processing should continue

close

public void close(javax.xml.ws.handler.MessageContext messageContext)
Called just prior to dispatching a message, fault or exception. The Seam request lifecycle is ended here

Specified by:
close in interface javax.xml.ws.handler.Handler

getHeaders

public Set<QName> getHeaders()
Specified by:
getHeaders in interface javax.xml.ws.handler.soap.SOAPHandler

setHeaders

public void setHeaders(Set<QName> headers)

getHandlerName

public String getHandlerName()

setHandlerName

public void setHandlerName(String handlerName)

handleFault

public boolean handleFault(javax.xml.ws.handler.MessageContext messagecontext)
Specified by:
handleFault in interface javax.xml.ws.handler.Handler

toString

public String toString()
Overrides:
toString in class Object