|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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。
version | 1.0 |
See also | javax.xml.soap.SOAPMessage |
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 |
---|
MessageContext.Scope |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from interface javax.xml.ws.handler.MessageContext |
---|
HTTP_REQUEST_HEADERS, HTTP_REQUEST_METHOD, HTTP_RESPONSE_CODE, HTTP_RESPONSE_HEADERS, INBOUND_MESSAGE_ATTACHMENTS, MESSAGE_OUTBOUND_PROPERTY, OUTBOUND_MESSAGE_ATTACHMENTS, PATH_INFO, QUERY_STRING, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE, WSDL_DESCRIPTION, WSDL_INTERFACE, WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE |
Method Summary | |
---|---|
Object[] |
getHeaders(QName header,
JAXBContext context,
boolean allRoles)
Gets headers that have a particular qualified name from the message in the message context. |
SOAPMessage |
getMessage()
Gets the SOAPMessage from this message context. |
Set<String> |
getRoles()
Gets the SOAP actor roles associated with an execution of the handler chain. |
void |
setMessage(SOAPMessage message)
Sets the SOAPMessage in this message context |
Methods inherited from interface javax.xml.ws.handler.MessageContext |
---|
getScope, setScope |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
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 消息 |
Throws | JAXRPCException: 如果在此消息上下文中设置 SOAPMessage 时发生任何错误 |
Throws | UnsupportedOperationException: 如果此操作不受支持 |
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 contextUnsupportedOperationException
- 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 headerallRoles
- Iftrue
then returns headers for all SOAP roles, iffalse
then only returns headers targetted at the roles currently being played by this SOAP node, seegetRoles
.- 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.setRoles
和 HandlerChain.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
andSOAPBinding.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!