| javax.xml.ws.LogicalMessage
LogicalMessage | public interface LogicalMessage (Code) | | The LogicalMessage interface represents a
protocol agnostic XML message and contains methods that
provide access to the payload of the message.
since: JAX-WS 2.0 |
Method Summary | |
public Source | getPayload() Gets the message payload as an XML source, may be called
multiple times on the same LogicalMessage instance, always
returns a new Source that may be used to retrieve the entire
message payload.
If the returned Source is an instance of
DOMSource , then
modifications to the encapsulated DOM tree change the message
payload in-place, there is no need to susequently call
setPayload . | public Object | getPayload(JAXBContext context) Gets the message payload as a JAXB object. | public void | setPayload(Source payload) | public void | setPayload(Object payload, JAXBContext context) Sets the message payload
Parameters: payload - message payload Parameters: context - The JAXBContext that should be used to marshall the payload throws: java.lang.UnsupportedOperationException - If thisoperation is not supported throws: WebServiceException - If an error occurs when using the suppliedJAXBContext to marshall the payload. |
getPayload | public Source getPayload()(Code) | | Gets the message payload as an XML source, may be called
multiple times on the same LogicalMessage instance, always
returns a new Source that may be used to retrieve the entire
message payload.
If the returned Source is an instance of
DOMSource , then
modifications to the encapsulated DOM tree change the message
payload in-place, there is no need to susequently call
setPayload . Other types of Source provide only
read access to the message payload.
The contained message payload; returns null if no payload is present in this message. |
getPayload | public Object getPayload(JAXBContext context)(Code) | | Gets the message payload as a JAXB object. Note that there is no
connection between the returned object and the message payload,
changes to the payload require calling setPayload .
Parameters: context - The JAXBContext that should be used to unmarshallthe message payload The contained message payload; returns null if no payload is present in this message throws: WebServiceException - If an error occurs when using a suppliedJAXBContext to unmarshall the payload. The cause ofthe WebServiceException is the original JAXBException. |
setPayload | public void setPayload(Object payload, JAXBContext context)(Code) | | Sets the message payload
Parameters: payload - message payload Parameters: context - The JAXBContext that should be used to marshall the payload throws: java.lang.UnsupportedOperationException - If thisoperation is not supported throws: WebServiceException - If an error occurs when using the suppliedJAXBContext to marshall the payload. The cause ofthe WebServiceException is the original JAXBException. |
|
|