org.apache.ws.resource.handler
Class ResourceHandler

java.lang.Object
  extended byjavax.xml.rpc.handler.GenericHandler
      extended byorg.apache.ws.resource.handler.ResourceHandler
All Implemented Interfaces:
javax.xml.rpc.handler.Handler

public class ResourceHandler
extends javax.xml.rpc.handler.GenericHandler

Base class for platform-specific providers; also is a JAX-RPC Handler to make it easier to port to different SOAP platforms.

Author:
Ian Springer, Sal Campana

Field Summary
static java.lang.String HANDLER_OPT_VALIDATE_REQUEST_XML
          DOCUMENT_ME
static org.apache.ws.util.i18n.Messages MSG
          DOCUMENT_ME
static java.lang.String SERVICE_OPT_SERVICE_CLASS_NAME
          DOCUMENT_ME
static java.lang.String SERVICE_OPT_WSDL_TARGET_NAMESPACE
          DOCUMENT_ME
static java.lang.String WSRF_RESPONSE_XMLOBJECT_LIST
          DOCUMENT_ME
 
Constructor Summary
ResourceHandler()
           
 
Method Summary
protected  void addSOAPBodyElements(org.apache.xmlbeans.XmlObject responseDocXBean, javax.xml.soap.SOAPBody soapBody)
          DOCUMENT_ME
 javax.xml.namespace.QName[] getHeaders()
          This handler acts as the pivot and does not process any SOAP header elements.
protected  javax.xml.soap.SOAPEnvelope getResponseEnvelope(javax.xml.rpc.handler.soap.SOAPMessageContext soapMsgContext)
          DOCUMENT_ME
protected  javax.xml.soap.SOAPMessage getResponseMessage(javax.xml.rpc.handler.soap.SOAPMessageContext soapMsgContext)
           
protected  java.lang.Class getServiceClassName(ResourceContext resourceContext)
          DOCUMENT_ME
protected  java.lang.String getServiceOption(ResourceContext resourceContext, java.lang.String key)
           
 boolean handleRequest(javax.xml.rpc.handler.MessageContext msgContext)
          Deserializes the incoming SOAP request to an XMLBean and dispatches it to the appropriate service.
 boolean handleResponse(javax.xml.rpc.handler.MessageContext msgContext)
          DOCUMENT_ME
 void init(javax.xml.rpc.handler.HandlerInfo handlerInfo)
          DOCUMENT_ME
 
Methods inherited from class javax.xml.rpc.handler.GenericHandler
destroy, handleFault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG

public static final org.apache.ws.util.i18n.Messages MSG
DOCUMENT_ME


WSRF_RESPONSE_XMLOBJECT_LIST

public static final java.lang.String WSRF_RESPONSE_XMLOBJECT_LIST
DOCUMENT_ME

See Also:
Constant Field Values

SERVICE_OPT_WSDL_TARGET_NAMESPACE

public static final java.lang.String SERVICE_OPT_WSDL_TARGET_NAMESPACE
DOCUMENT_ME

See Also:
Constant Field Values

SERVICE_OPT_SERVICE_CLASS_NAME

public static final java.lang.String SERVICE_OPT_SERVICE_CLASS_NAME
DOCUMENT_ME

See Also:
Constant Field Values

HANDLER_OPT_VALIDATE_REQUEST_XML

public static final java.lang.String HANDLER_OPT_VALIDATE_REQUEST_XML
DOCUMENT_ME

See Also:
Constant Field Values
Constructor Detail

ResourceHandler

public ResourceHandler()
Method Detail

getHeaders

public javax.xml.namespace.QName[] getHeaders()
This handler acts as the pivot and does not process any SOAP header elements.

Returns:
the names of the SOAP header elements that this handler processes

handleRequest

public boolean handleRequest(javax.xml.rpc.handler.MessageContext msgContext)
Deserializes the incoming SOAP request to an XMLBean and dispatches it to the appropriate service. It is required that the request meet the following criteria:
  1. SOAP Header contains the header elements required by WS-Addressing (either 2003/03 or 2004/08)
  2. SOAP Body contains no more than one body element


handleResponse

public boolean handleResponse(javax.xml.rpc.handler.MessageContext msgContext)
DOCUMENT_ME

Parameters:
msgContext - DOCUMENT_ME
Returns:
DOCUMENT_ME

init

public void init(javax.xml.rpc.handler.HandlerInfo handlerInfo)
DOCUMENT_ME

Parameters:
handlerInfo - DOCUMENT_ME

getServiceClassName

protected java.lang.Class getServiceClassName(ResourceContext resourceContext)
                                       throws ResourceContextException,
                                              java.lang.ClassNotFoundException
DOCUMENT_ME

Parameters:
resourceContext - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ResourceContextException
java.lang.ClassNotFoundException

getServiceOption

protected final java.lang.String getServiceOption(ResourceContext resourceContext,
                                                  java.lang.String key)
Parameters:
resourceContext -
key -
Returns:
the service option string

getResponseEnvelope

protected javax.xml.soap.SOAPEnvelope getResponseEnvelope(javax.xml.rpc.handler.soap.SOAPMessageContext soapMsgContext)
DOCUMENT_ME

Parameters:
soapMsgContext - DOCUMENT_ME
Returns:
DOCUMENT_ME

getResponseMessage

protected javax.xml.soap.SOAPMessage getResponseMessage(javax.xml.rpc.handler.soap.SOAPMessageContext soapMsgContext)
Parameters:
soapMsgContext - the response's JAX-RPC message context
Returns:
response JAX-RPC SOAP message

addSOAPBodyElements

protected void addSOAPBodyElements(org.apache.xmlbeans.XmlObject responseDocXBean,
                                   javax.xml.soap.SOAPBody soapBody)
DOCUMENT_ME

Parameters:
responseDocXBean - DOCUMENT_ME
soapBody - DOCUMENT_ME


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.