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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 header
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface jakarta.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 interface jakarta.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 interface jakarta.xml.ws.handler.Handler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
    • getHeaders

      public Set<QName> getHeaders()
      Gets the header blocks that can be processed by this Handler instance.
      Specified by:
      getHeaders in interface jakarta.xml.ws.handler.soap.SOAPHandler<jakarta.xml.ws.handler.soap.SOAPMessageContext>
    • setHeaders

      public void setHeaders(Set headers)
      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.