| java.lang.Object com.sun.xml.ws.api.message.Messages
Messages | abstract public class Messages (Code) | | Factory methods for various
Message implementations.
This class provides various methods to create different
flavors of
Message classes that store data
in different formats.
This is a part of the JAX-WS RI internal API so that
Tube implementations can reuse the implementations
done inside the JAX-WS.
If you find some of the useful convenience methods missing
from this class, please talk to us.
author: Kohsuke Kawaguchi |
Method Summary | |
public static Message | create(JAXBRIContext context, Object jaxbObject, SOAPVersion soapVersion) Creates a
Message backed by a JAXB bean.
Parameters: context - The context to be used to produce infoset from the object. | public static Message | create(Marshaller marshaller, Object jaxbObject, SOAPVersion soapVersion) | public static Message | create(SOAPMessage saaj) Creates a
Message backed by a SAAJ
SOAPMessage object.
If the
SOAPMessage contains headers and attachments, this method
does the right thing.
Parameters: saaj - The SOAP message to be represented as a Message.Must not be null. | public static Message | create(Element soapEnvelope) Creates a
Message from an
Element that represents
the whole SOAP message. | public static Message | create(Source envelope, SOAPVersion soapVersion) Creates a
Message using Source as entire envelope.
Parameters: envelope - Source envelope is used to create MessageMust not be null. | public static Message | create(XMLStreamReader reader) Creates a
Message from
XMLStreamReader that points to
the start of the envelope. | public static Message | create(XMLStreamBuffer xsb) Creates a
Message from
XMLStreamBuffer that retains the
whole envelope infoset. | public static Message | create(Throwable t, SOAPVersion soapVersion) Creates a
Message that represents an exception as a fault. | public static Message | create(SOAPFault fault) Creates a fault
Message .
This method is not designed for efficiency, and we don't expect
to be used for the performance critical codepath.
Parameters: fault - The populated SAAJ data structure that represents a faultin detail.Always non-null. | public static Message | create(String unsupportedAction, AddressingVersion av, SOAPVersion sv) Creates a fault
Message that captures the code/subcode/subsubcode
defined by WS-Addressing if wsa:Action is not supported.
Parameters: unsupportedAction - The unsupported Action. | public static Message | create(SOAPVersion soapVersion, ProtocolException pex, QName faultcode) To be called to convert a
ProtocolException and faultcode for a given
SOAPVersion in to a
Message .
Parameters: soapVersion - SOAPVersion.SOAP_11 or SOAPVersion.SOAP_12 Parameters: pex - a ProtocolException Parameters: faultcode - soap faultcode. | public static Message | createEmpty(SOAPVersion soapVersion) Creates a
Message that doesn't have any payload. | public static Message | createUsingPayload(Source payload, SOAPVersion ver) Creates a
Message using
Source as payload.
Parameters: payload - Source payload is Message's payloadMust not be null. | public static Message | createUsingPayload(XMLStreamReader payload, SOAPVersion ver) Creates a
Message using
XMLStreamReader as payload.
Parameters: payload - XMLStreamReader payload is Message's payloadMust not be null. | public static Message | createUsingPayload(Element payload, SOAPVersion ver) Creates a
Message from an
Element that represents
a payload.
Parameters: payload - The element that becomes the child element of the SOAP body.Must not be null. Parameters: ver - The SOAP version of the message. |
create | public static Message create(JAXBRIContext context, Object jaxbObject, SOAPVersion soapVersion)(Code) | | Creates a
Message backed by a JAXB bean.
Parameters: context - The context to be used to produce infoset from the object. Must not be null. Parameters: jaxbObject - The JAXB object that represents the payload. must not be null. This objectmust be bound to an element (which means it either is a JAXBElement oran instanceof a class with XmlRootElement). Parameters: soapVersion - The SOAP version of the message. Must not be null. |
create | public static Message create(SOAPMessage saaj)(Code) | | Creates a
Message backed by a SAAJ
SOAPMessage object.
If the
SOAPMessage contains headers and attachments, this method
does the right thing.
Parameters: saaj - The SOAP message to be represented as a Message.Must not be null. Once this method is invoked, the createdMessage will own the SOAPMessage, so it shallnever be touched directly. |
create | public static Message create(Element soapEnvelope)(Code) | | Creates a
Message from an
Element that represents
the whole SOAP message.
Parameters: soapEnvelope - The SOAP envelope element. |
create | public static Message create(Source envelope, SOAPVersion soapVersion)(Code) | | Creates a
Message using Source as entire envelope.
Parameters: envelope - Source envelope is used to create MessageMust not be null. Once this method is invoked, the createdMessage will own the Source, so it shallnever be touched directly. |
create | public static Message create(XMLStreamBuffer xsb)(Code) | | Creates a
Message from
XMLStreamBuffer that retains the
whole envelope infoset.
Parameters: xsb - This buffer must contain the infoset of the whole envelope. |
create | public static Message create(Throwable t, SOAPVersion soapVersion)(Code) | | Creates a
Message that represents an exception as a fault. The
created message reflects if t or t.getCause() is SOAPFaultException.
creates a fault message with default faultCode env:Server if t or t.getCause()
is not SOAPFaultException. Otherwise, it use SOAPFaultException's faultCode
Always non-null. A message that wraps this Throwable. |
create | public static Message create(SOAPFault fault)(Code) | | Creates a fault
Message .
This method is not designed for efficiency, and we don't expect
to be used for the performance critical codepath.
Parameters: fault - The populated SAAJ data structure that represents a faultin detail.Always non-null. A message that wraps this SOAPFault. |
create | public static Message create(String unsupportedAction, AddressingVersion av, SOAPVersion sv)(Code) | | Creates a fault
Message that captures the code/subcode/subsubcode
defined by WS-Addressing if wsa:Action is not supported.
Parameters: unsupportedAction - The unsupported Action. Must not be null. Parameters: av - The WS-Addressing version of the message. Must not be null. Parameters: sv - The SOAP Version of the message. Must not be null.A message representing SOAPFault that contains the WS-Addressing code/subcode/subsubcode. |
createUsingPayload | public static Message createUsingPayload(Source payload, SOAPVersion ver)(Code) | | Creates a
Message using
Source as payload.
Parameters: payload - Source payload is Message's payloadMust not be null. Once this method is invoked, the createdMessage will own the Source, so it shallnever be touched directly. Parameters: ver - The SOAP version of the message. Must not be null. |
createUsingPayload | public static Message createUsingPayload(Element payload, SOAPVersion ver)(Code) | | Creates a
Message from an
Element that represents
a payload.
Parameters: payload - The element that becomes the child element of the SOAP body.Must not be null. Parameters: ver - The SOAP version of the message. Must not be null. |
|
|