|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.message.Message
com.sun.xml.ws.message.AbstractMessageImpl
public abstract class AbstractMessageImpl
Partial Message implementation.
This class implements some of the Message methods.
The idea is that those implementations may be non-optimal but
it may save effort in implementing Message and reduce
the code size.
Message classes that are used more commonly should
examine carefully which method can be implemented faster,
and override them accordingly.
| Field Summary | |
|---|---|
protected TagInfoset |
bodyTag
|
protected static java.util.List<TagInfoset> |
DEFAULT_TAGS
|
protected static org.xml.sax.helpers.AttributesImpl |
EMPTY_ATTS
|
protected TagInfoset |
envelopeTag
|
protected TagInfoset |
headerTag
|
protected static org.xml.sax.helpers.LocatorImpl |
NULL_LOCATOR
|
protected SOAPVersion |
soapVersion
SOAP version of this message. |
| Fields inherited from class com.sun.xml.ws.api.message.Message |
|---|
attachmentSet |
| Constructor Summary | |
|---|---|
protected |
AbstractMessageImpl(AbstractMessageImpl that)
Copy constructor. |
protected |
AbstractMessageImpl(SOAPVersion soapVersion)
|
| Method Summary | ||
|---|---|---|
SOAPVersion |
getSOAPVersion()
|
|
javax.xml.soap.SOAPMessage |
readAsSOAPMessage()
Default implementation that uses writeTo(ContentHandler, ErrorHandler) |
|
javax.xml.soap.SOAPMessage |
readAsSOAPMessage(Packet packet,
boolean inbound)
Creates the equivalent SOAPMessage from this message. |
|
javax.xml.transform.Source |
readEnvelopeAsSource()
Consumes this message including the envelope. |
|
|
readPayloadAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge)
Deprecated. |
|
|
readPayloadAsJAXB(javax.xml.bind.Unmarshaller unmarshaller)
Reads the payload as a JAXB object by using the given unmarshaller. |
|
|
readPayloadAsJAXB(XMLBridge<T> bridge)
Reads the payload as a Data-Bond object This consumes the message. |
|
Message |
toSAAJ(Packet p,
java.lang.Boolean inbound)
|
|
protected abstract void |
writePayloadTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler,
boolean fragment)
Writes the payload to SAX events. |
|
void |
writeTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
Writes the whole envelope as SAX events. |
|
void |
writeTo(javax.xml.stream.XMLStreamWriter w)
Default implementation that relies on Message.writePayloadTo(XMLStreamWriter) |
|
void |
writeToBodyStart(javax.xml.stream.XMLStreamWriter w)
|
|
| Methods inherited from class com.sun.xml.ws.api.message.Message |
|---|
addSOAPMimeHeaders, assertOneWay, consume, copy, copyFrom, generateMessageID, getAttachments, getFirstDetailEntryName, getHeaders, getID, getID, getMethod, getOperation, getOperation, getPayloadLocalPart, getPayloadNamespaceURI, getTransportHeaders, getTransportHeaders, hasAttachments, hasHeaders, hasPayload, isFault, isOneWay, readPayload, readPayloadAsSource, setMessageMedadata, writePayloadTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SOAPVersion soapVersion
So if you aren't using those methods that use this field, this can be null.
@NotNull protected TagInfoset envelopeTag
@NotNull protected TagInfoset headerTag
@NotNull protected TagInfoset bodyTag
protected static final org.xml.sax.helpers.AttributesImpl EMPTY_ATTS
protected static final org.xml.sax.helpers.LocatorImpl NULL_LOCATOR
protected static final java.util.List<TagInfoset> DEFAULT_TAGS
| Constructor Detail |
|---|
protected AbstractMessageImpl(SOAPVersion soapVersion)
protected AbstractMessageImpl(AbstractMessageImpl that)
| Method Detail |
|---|
public SOAPVersion getSOAPVersion()
getSOAPVersion in class Messagepublic javax.xml.transform.Source readEnvelopeAsSource()
MessageSource object.
readEnvelopeAsSource in class Message
public <T> T readPayloadAsJAXB(javax.xml.bind.Unmarshaller unmarshaller)
throws javax.xml.bind.JAXBException
Message
readPayloadAsJAXB in class Messagejavax.xml.bind.JAXBException - If JAXB reports an error during the processing.
public <T> T readPayloadAsJAXB(com.sun.xml.bind.api.Bridge<T> bridge)
throws javax.xml.bind.JAXBException
MessageBridge.
This consumes the message.
readPayloadAsJAXB in class Messagejavax.xml.bind.JAXBException - If JAXB reports an error during the processing.
public <T> T readPayloadAsJAXB(XMLBridge<T> bridge)
throws javax.xml.bind.JAXBException
Message
readPayloadAsJAXB in class Messagejavax.xml.bind.JAXBException - If JAXB reports an error during the processing.
public void writeToBodyStart(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public void writeTo(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
Message.writePayloadTo(XMLStreamWriter)
writeTo in class Messagejavax.xml.stream.XMLStreamException - If the XMLStreamWriter reports an error,
or some other errors happen during the processing.
public void writeTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler)
throws org.xml.sax.SAXException
writeTo in class MessagecontentHandler - must not be nulll.errorHandler - must not be null.
any error encountered during the SAX event production must be
first reported to this error handler. Fatal errors can be then
thrown as SAXParseException. SAXExceptions thrown
from ErrorHandler should propagate directly through this method.
org.xml.sax.SAXException
protected abstract void writePayloadTo(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ErrorHandler errorHandler,
boolean fragment)
throws org.xml.sax.SAXException
fragment - if true, this method will fire SAX events without start/endDocument events,
suitable for embedding this into a bigger SAX event sequence.
if false, this method generaets a completely SAX event sequence on its own.
org.xml.sax.SAXException
public Message toSAAJ(Packet p,
java.lang.Boolean inbound)
throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
public javax.xml.soap.SOAPMessage readAsSOAPMessage()
throws javax.xml.soap.SOAPException
writeTo(ContentHandler, ErrorHandler)
readAsSOAPMessage in class Messagejavax.xml.soap.SOAPException - if there's any error while creating a SOAPMessage.
public javax.xml.soap.SOAPMessage readAsSOAPMessage(Packet packet,
boolean inbound)
throws javax.xml.soap.SOAPException
MessageSOAPMessage from this message. It also uses
transport specific headers from Packet during the SOAPMessage construction
so that SOAPMessage.getMimeHeaders() gives meaningful transport
headers.
This consumes the message.
readAsSOAPMessage in class Messagejavax.xml.soap.SOAPException - if there's any error while creating a SOAPMessage.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||