Package com.arjuna.mw.wst11.service
Class JaxWSHeaderContextProcessor
java.lang.Object
com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor
- All Implemented Interfaces:
jakarta.xml.ws.handler.Handler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
,jakarta.xml.ws.handler.soap.SOAPHandler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
- Direct Known Subclasses:
JaxWSSubordinateHeaderContextProcessor
public class JaxWSHeaderContextProcessor
extends Object
implements jakarta.xml.ws.handler.soap.SOAPHandler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
The class is used to perform WS-Transaction context insertion
and extraction for application level SOAP messages using JaxWS.
This is the server side version.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(jakarta.xml.ws.handler.MessageContext messageContext) Gets the header blocks that can be processed by this Handler instance.boolean
handleFault
(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association before faults are thrown back to the client.protected boolean
handleInbound
(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext) Process the tx context header that is attached to the received message.protected boolean
handleInboundMessage
(jakarta.xml.soap.SOAPMessage soapMessage) Handle the request.protected boolean
handleInboundMessage
(jakarta.xml.soap.SOAPMessage soapMessage, boolean installSubordinateTx) Handle the request.boolean
handleMessage
(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext) Process a message.protected boolean
handleOutbound
(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association before response is returned to the client.void
setHeaders
(Set headers) Sets the header blocks that can be processed by this Handler instance.protected void
Suspend the current transaction.
-
Constructor Details
-
JaxWSHeaderContextProcessor
public JaxWSHeaderContextProcessor()
-
-
Method Details
-
handleMessage
public boolean handleMessage(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext) Process a message. Determines if it is inbound or outbound and dispatches accordingly.- Specified by:
handleMessage
in interfacejakarta.xml.ws.handler.Handler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
- Parameters:
msgContext
-- Returns:
- true
-
handleFault
public boolean handleFault(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association before faults are thrown back to the client.- Specified by:
handleFault
in interfacejakarta.xml.ws.handler.Handler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
- Parameters:
messageContext
-- Returns:
- true
-
close
public void close(jakarta.xml.ws.handler.MessageContext messageContext) - Specified by:
close
in interfacejakarta.xml.ws.handler.Handler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
-
getHeaders
Gets the header blocks that can be processed by this Handler instance.- Specified by:
getHeaders
in interfacejakarta.xml.ws.handler.soap.SOAPHandler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
-
setHeaders
Sets the header blocks that can be processed by this Handler instance. Note: this impl ignores this function's args as the values are hardcoded. -
handleInbound
protected boolean handleInbound(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext) Process the tx context header that is attached to the received message.- Parameters:
msgContext
-- Returns:
- true
-
handleOutbound
protected boolean handleOutbound(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association before response is returned to the client.- Parameters:
messageContext
- The current message context.- Returns:
- true
-
handleInboundMessage
protected boolean handleInboundMessage(jakarta.xml.soap.SOAPMessage soapMessage) Handle the request.- Parameters:
soapMessage
- The current message context.
-
handleInboundMessage
protected boolean handleInboundMessage(jakarta.xml.soap.SOAPMessage soapMessage, boolean installSubordinateTx) Handle the request.- Parameters:
soapMessage
- The current message context.installSubordinateTx
- true if a subordinate transaction should be interposed and false if the handler should just resume the incoming transaction. currently only works for AT transactions but will eventually be extended to work for BA transactions too.
-
suspendTransaction
protected void suspendTransaction()Suspend the current transaction.
-