public interface LogicalMessage 
      LogicalMessage接口表示协议无关XML消息,并包含提供对消息的有效载荷的方法。 
      | Modifier and Type | Method and Description | 
|---|---|
| Source | getPayload()
              将消息有效负载作为XML源,可以在同一个LogicalMessage实例上多次调用,总是返回一个可用于检索整个消息有效负载的新的 
              Source。 | 
| Object | getPayload(JAXBContext context)
              获取消息有效载荷作为JAXB对象。 
             | 
| void | setPayload(Object payload, JAXBContext context)
              设置消息有效载荷 
             | 
| void | setPayload(Source payload)
              设置消息有效载荷 
             | 
Source getPayload()
Source ,可用于检索整个消息有效负载。 
            如果返回Source是一个实例DOMSource ,然后修改封装的DOM树改变就地消息负载,没有必要随后调用setPayload 。 其他类型的Source仅提供对消息有效载荷的读访问。 
null 。 
           void setPayload(Source payload)
payload - 消息有效载荷 
           WebServiceException - 在此消息中有效载荷设置期间是否有任何错误 
           UnsupportedOperationException - 如果不支持此操作 
           Object getPayload(JAXBContext context)
setPayload 。 
          context - 应用于解组消息有效载荷的JAXBContext 
           null 
           WebServiceException - 如果在使用提供的JAXBContext解组合有效载荷时发生错误。 
            WebServiceException的原因是原来的JAXBException。 
           void setPayload(Object payload, JAXBContext context)
payload - 消息有效载荷 
           context - 应用于编组有效载荷的JAXBContext 
           UnsupportedOperationException - 如果不支持此操作 
           WebServiceException - 如果使用提供的JAXBContext来编组有效负载时发生错误。 
            WebServiceException的原因是原来的JAXBException。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.