Package com.arjuna.mw.wst11.client
Class JaxWSHeaderContextProcessor
java.lang.Object
com.arjuna.mw.wst11.client.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>
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 client 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.protected boolean
handleInbound
(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association before control is returned to the user.boolean
handleMessage
(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext) Process a message.boolean
handleMessage
(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext, boolean mustUnderstand) Process a message.protected boolean
handleOutbound
(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext, boolean mustUnderstand) Process the tx thread context and attach serialized version as msg headerboolean
handleOutboundMessage
(jakarta.xml.soap.SOAPMessage soapMessage) Handle the request.boolean
handleOutboundMessage
(jakarta.xml.soap.SOAPMessage soapMessage, boolean mustUnderstand) Handle the request.protected void
resumeTransaction
(jakarta.xml.soap.SOAPMessage soapMessage) Resume the current transaction.void
setHeaders
(Set headers) Sets the header blocks that can be processed by this Handler instance.
-
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
-
handleMessage
public boolean handleMessage(jakarta.xml.ws.handler.soap.SOAPMessageContext msgContext, boolean mustUnderstand) Process a message. Determines if it is inbound or outbound and dispatches accordingly.- Parameters:
msgContext
-mustUnderstand
-- Returns:
- true
-
handleFault
public boolean handleFault(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext) Tidy up the Transaction/Thread association.- 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 messageContext) Tidy up the Transaction/Thread association before control is returned to the user.- Parameters:
messageContext
-- Returns:
- true
-
handleOutbound
protected boolean handleOutbound(jakarta.xml.ws.handler.soap.SOAPMessageContext messageContext, boolean mustUnderstand) Process the tx thread context and attach serialized version as msg header- Parameters:
messageContext
-mustUnderstand
-- Returns:
- true
-
handleOutboundMessage
public boolean handleOutboundMessage(jakarta.xml.soap.SOAPMessage soapMessage) Handle the request.- Parameters:
soapMessage
- The current message context.
-
handleOutboundMessage
public boolean handleOutboundMessage(jakarta.xml.soap.SOAPMessage soapMessage, boolean mustUnderstand) Handle the request.- Parameters:
soapMessage
- The current message context.mustUnderstand
- Value of MustUnderstand attribute.- Returns:
- whether the message was handled
-
resumeTransaction
protected void resumeTransaction(jakarta.xml.soap.SOAPMessage soapMessage) Resume the current transaction.
-