SOAPMessageContext (Java EE 5)

Java EE API


javax.xml.ws.handler.soap Interface SOAPMessageContext

All Superinterfaces:
Map<String,Object>, MessageContext

public interface SOAPMessageContext
extends MessageContext

Implements: MessageContext

接口 javax.xml.rpc.soap.SOAPMessageContext 提供对 RPC 请求或响应的 SOAP 消息的访问。javax.xml.soap.SOAPMessage 为带有附件的 SOAP 1.1 消息表示形式指定标准的 Java API。
英文文档:

The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response. The javax.xml.soap.SOAPMessage specifies the standard Java API for the representation of a SOAP 1.1 message with attachments.

Since:
JAX-WS 2.0
See Also:
SOAPMessage

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.xml.ws.handler.MessageContext
 
Nested classes/interfaces inherited from interface java.util.Map
 
Field Summary
 
Fields inherited from interface javax.xml.ws.handler.MessageContext
 
Method Summary
 Object[]
 SOAPMessage
 Set<String>
 void
 
Methods inherited from interface javax.xml.ws.handler.MessageContext
 
Methods inherited from interface java.util.Map
 

Method Detail

public SOAPMessage getMessage()
从此消息上下文中获取 SOAPMessage。
return 返回 SOAPMessage;如果此消息上下文中没有 SOAPMessage,则返回 null。
英文文档:

getMessage

SOAPMessage getMessage()
Gets the SOAPMessage from this message context. Modifications to the returned SOAPMessage change the message in-place, there is no need to susequently call setMessage.

Returns:
Returns the SOAPMessage; returns null if no SOAPMessage is present in this message context

public void setMessage(SOAPMessage message)
在此消息上下文中设置 SOAPMessage。
message SOAP 消息
ThrowsJAXRPCException: 如果在此消息上下文中设置 SOAPMessage 时发生任何错误
ThrowsUnsupportedOperationException: 如果此操作不受支持
英文文档:

setMessage

void setMessage(SOAPMessage message)
Sets the SOAPMessage in this message context

Parameters:
message - SOAP message
Throws:
WebServiceException - If any error during the setting of the SOAPMessage in this message context
UnsupportedOperationException - If this operation is not supported

英文文档:

getHeaders

Object[] getHeaders(QName header,
                    JAXBContext context,
                    boolean allRoles)
Gets headers that have a particular qualified name from the message in the message context. Note that a SOAP message can contain multiple headers with the same qualified name.

Parameters:
header - The XML qualified name of the SOAP header(s).
context - The JAXBContext that should be used to unmarshall the header
allRoles - If true then returns headers for all SOAP roles, if false then only returns headers targetted at the roles currently being played by this SOAP node, see getRoles.
Returns:
An array of unmarshalled headers; returns an empty array if no message is present in this message context or no headers match the supplied qualified name.
Throws:
WebServiceException - If an error occurs when using the supplied JAXBContext to unmarshall. The cause of the WebServiceException is the original JAXBException.

public String[] getRoles()
获取与执行 HandlerChain 及其包含的 Handler 实例关联的 SOAP 参与者角色。注意,SOAP 参与者角色适用于 SOAP 节点,并使用 HandlerChain.setRolesHandlerChain.getRoles 进行管理。HandlerChain 中的 Handler 实例使用有关 SOAP 参与者角色的信息来处理 SOAP 头块。注意,在通过 HandlerChain 处理 SOAP 消息的过程中,SOAP 参与者角色不变。
return SOAP 参与者角色的 URI 所组成的数组
See also setRoles, getRoles
英文文档:

getRoles

Set<String> getRoles()
Gets the SOAP actor roles associated with an execution of the handler chain. Note that SOAP actor roles apply to the SOAP node and are managed using SOAPBinding.setRoles and SOAPBinding.getRoles. Handler instances in the handler chain use this information about the SOAP actor roles to process the SOAP header blocks. Note that the SOAP actor roles are invariant during the processing of SOAP message through the handler chain.

Returns:
Array of String for SOAP actor roles


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!