Interface MessageFactory

All Known Implementing Classes:
MessageFactoryImpl

public interface MessageFactory
MessageFactory

Creates a Message object. The common patterns are: - Create an empty message for a specific protocol - Create a message with the xml sourced from OM (XMLStreamReader) - Create a message (xml + attachments) from a SOAPMessage

The FactoryRegistry should be used to get access to the Factory

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    create(Protocol protocol)
    create empty Message of the specified protocol
    createFrom(jakarta.xml.soap.SOAPMessage message)
    create Message from SOAPMessage The xml and attachments from the SOAPMessage are used to populate the new Message The protocol is inferred from the SOAPMessage
    createFrom(XMLStreamReader reader, Protocol protocol)
    create Message with the xml from the XMLStreamReader
    createFrom(org.apache.axiom.om.OMElement omElement, Protocol protocol)
    create Message with the xml from the OMElement
    createFrom(Block other, Object context, Protocol protocol)
    create Message from a Block
  • Method Details

    • createFrom

      Message createFrom(XMLStreamReader reader, Protocol protocol) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      create Message with the xml from the XMLStreamReader
      Parameters:
      reader - XMLStreamReader
      protocol - (if null, the soap protocol is inferred from the namespace)
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Message createFrom(org.apache.axiom.om.OMElement omElement, Protocol protocol) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      create Message with the xml from the OMElement
      Parameters:
      omElement - OMElement
      protocol - (if null, the soap protocol is inferred from the namespace)
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Message createFrom(Block other, Object context, Protocol protocol) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      create Message from a Block
      Parameters:
      block -
      context - Associated Context or null
      protocol - (if null, the soap protocol is inferred from the namespace)
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • createFrom

      Message createFrom(jakarta.xml.soap.SOAPMessage message) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      create Message from SOAPMessage The xml and attachments from the SOAPMessage are used to populate the new Message The protocol is inferred from the SOAPMessage
      Parameters:
      SOAPMessage -
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • create

      Message create(Protocol protocol) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      create empty Message of the specified protocol
      Parameters:
      protocol -
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException