|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.rpc.handler.GenericHandler org.apache.ws.addressing.handler.AbstractAddressingHandler org.apache.ws.addressing.handler.ServerSideAddressingHandler
public class ServerSideAddressingHandler
A server-side JAX-RPC Handler
that extracts
WS-Addressing headers from incoming SOAP requests and inserts them into
outgoing SOAP responses.
Field Summary | |
---|---|
static org.apache.ws.addressing.handler.ServerSideAddressingHandler.FactoryThreadLocal |
TRANSFORMER_FACTORY
Thread local that gives each thread its own TransformerFactory (since it is not thread-safe). |
Fields inherited from class org.apache.ws.addressing.handler.AbstractAddressingHandler |
---|
CONFIG_PROP_ACTOR, CONFIG_PROP_REFERENCE_PROPERTY_NAMES, CONFIG_PROP_REMOVE_HEADERS, CONTINUE_HANDLER_CHAIN_PROCESSING |
Constructor Summary | |
---|---|
ServerSideAddressingHandler()
|
Method Summary | |
---|---|
protected void |
configureCall(javax.xml.rpc.Call call,
javax.xml.rpc.handler.soap.SOAPMessageContext oldContext)
Override this method to prepare the new call, for instance to add properties from the old MessageContext that may be needed by other handlers. |
protected void |
forwardMessage(javax.xml.rpc.handler.soap.SOAPMessageContext ctx,
EndpointReference ref)
Forward the SOAP message contained in the specified SOAP message context on to the specified end-point reference. |
protected javax.xml.rpc.Service |
getService(javax.xml.rpc.handler.MessageContext ctx)
Override this method if you need something other than the default Service. |
protected java.lang.String |
getTargetServiceName(AddressingHeaders headers)
Can be overridden by subclasses to customize how the wsa:to header is interpreted. |
boolean |
handleFault(javax.xml.rpc.handler.MessageContext ctx)
|
boolean |
handleRequest(javax.xml.rpc.handler.MessageContext msgContext)
|
boolean |
handleResponse(javax.xml.rpc.handler.MessageContext ctx)
|
protected static void |
removeAllChildElements(javax.xml.soap.SOAPElement soapElem)
Removes all child elements from the specified SOAPElement . |
protected void |
setTargetService(javax.xml.rpc.handler.soap.SOAPMessageContext ctx,
AddressingHeaders headers)
Platform-specific subclasses can optionally implement this method. |
Methods inherited from class org.apache.ws.addressing.handler.AbstractAddressingHandler |
---|
createMessageID, generateUUId, getActor, getHandlerConfigProperties, getHandlerConfigProperty, getHeaders, getReferencePropertyQNames, init, initReferencePropertyQNames, isHandlerConfigPropertyTrue, isMustUnderstandEnabled, isPropertyTrue, isRemoveHeadersEnabled |
Methods inherited from class javax.xml.rpc.handler.GenericHandler |
---|
destroy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.ws.addressing.handler.ServerSideAddressingHandler.FactoryThreadLocal TRANSFORMER_FACTORY
Constructor Detail |
---|
public ServerSideAddressingHandler()
Method Detail |
---|
public boolean handleRequest(javax.xml.rpc.handler.MessageContext msgContext)
handleRequest
in interface javax.xml.rpc.handler.Handler
handleRequest
in class javax.xml.rpc.handler.GenericHandler
public boolean handleResponse(javax.xml.rpc.handler.MessageContext ctx)
handleResponse
in interface javax.xml.rpc.handler.Handler
handleResponse
in class javax.xml.rpc.handler.GenericHandler
public boolean handleFault(javax.xml.rpc.handler.MessageContext ctx)
handleFault
in interface javax.xml.rpc.handler.Handler
handleFault
in class javax.xml.rpc.handler.GenericHandler
protected void forwardMessage(javax.xml.rpc.handler.soap.SOAPMessageContext ctx, EndpointReference ref)
ctx
- Message context to get the message fromref
- End-point reference to forward toprotected javax.xml.rpc.Service getService(javax.xml.rpc.handler.MessageContext ctx) throws javax.xml.rpc.ServiceException
The service returned by this method is used in creating the new Call
object. Something like:
Service service = getService(msgContext); Call call = service.createCall() call.setTargetEndpointAddress(toEndPointReference.getAddress().toString());
ctx
- Message context
javax.xml.rpc.ServiceException
protected void configureCall(javax.xml.rpc.Call call, javax.xml.rpc.handler.soap.SOAPMessageContext oldContext)
call
- Call object about to be invokedoldContext
- MessageContext of the original request/response.protected java.lang.String getTargetServiceName(AddressingHeaders headers) throws java.lang.Exception
headers
- Headers to extract the information from
java.lang.Exception
- If an error occursprotected void setTargetService(javax.xml.rpc.handler.soap.SOAPMessageContext ctx, AddressingHeaders headers) throws java.lang.Exception
ctx
- Context to get information fromheaders
- Headers to use
java.lang.Exception
- If an error occursprotected static void removeAllChildElements(javax.xml.soap.SOAPElement soapElem)
SOAPElement
.
soapElem
- Element to strip
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |