|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.soap Class SAAJResult
java.lang.Object javax.xml.transform.dom.DOMResult javax.xml.soap.SAAJResult
- All Implemented Interfaces:
- Result
public class SAAJResult
- extends DOMResult
以 SAAJ 树的形式,充当 JAXP 转换或 JAXB 编组结果的持有者。这些结果应通过使用
#getResult()
方法访问。几乎在所有情况下,都应避免使用 getNode()
方法。
since | SAAJ 1.3 |
Acts as a holder for the results of a JAXP transformation or a JAXB
marshalling, in the form of a SAAJ tree. These results should be accessed
by using the getResult()
method. The DOMResult.getNode()
method should be avoided in almost all cases.
- Since:
- SAAJ 1.3
- Author:
- XWS-Security Development Team
Field Summary |
---|
Fields inherited from class javax.xml.transform.dom.DOMResult |
---|
FEATURE |
Fields inherited from interface javax.xml.transform.Result |
---|
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
---|---|
SAAJResult()
Creates a SAAJResult that will present results in the form
of a SAAJ tree that supports the default (SOAP 1.1) protocol. |
|
SAAJResult(SOAPElement rootNode)
Creates a SAAJResult that will write the results as a
child node of the SOAPElement specified. |
|
SAAJResult(SOAPMessage message)
Creates a SAAJResult that will write the results into the
SOAPPart of the supplied SOAPMessage . |
|
SAAJResult(String protocol)
Creates a SAAJResult that will present results in the form
of a SAAJ tree that supports the specified protocol. |
Method Summary | |
---|---|
Node |
getResult()
|
Methods inherited from class javax.xml.transform.dom.DOMResult |
---|
getNextSibling, getNode, getSystemId, setNextSibling, setNode, setSystemId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
SAAJResult() throws SOAPException
创建一个 SAAJResult
,此类将以支持默认 (SOAP 1.1) 协议的 SAAJ 树的形式显示结果。
这种 SAAJResult
用在结果将被用作方法参数的情况下,其中的方法指带有其类型(如 SOAPElement
)取自 SAAJ API 的方法。当用于转换时,结果被填充到内部创建的 SOAPMessage
的 SOAPPart
中。由 getNode()
返回的 SOAPPart
不能保证格式良好。
Throws | SOAPException:
如果在创建 SOAPMessage 时出现问题 |
since | SAAJ 1.3 |
SAAJResult
public SAAJResult() throws SOAPException
- Creates a
SAAJResult
that will present results in the form of a SAAJ tree that supports the default (SOAP 1.1) protocol.This kind of
SAAJResult
is meant for use in situations where the results will be used as a parameter to a method that takes a parameter whose type, such asSOAPElement
, is drawn from the SAAJ API. When used in a transformation, the results are populated into theSOAPPart
of aSOAPMessage
that is created internally. TheSOAPPart
returned byDOMResult.getNode()
is not guaranteed to be well-formed.- Throws:
SOAPException
- if there is a problem creating aSOAPMessage
- Since:
- SAAJ 1.3
public
SAAJResult(String protocol) throws SOAPException
创建一个 SAAJResult
,它将以支持指定协议的 SAAJ 树的形式显示结果。DYNAMIC_SOAP_PROTOCOL
在此上下文中不明确,并会导致此构造方法抛出 UnsupportedOperationException
。
这种 SAAJResult
用在结果将被用作方法参数的情况下,其中的方法指带有其类型(如 SOAPElement
)取自 SAAJ API 的方法。当用于转换时,结果被填充到内部创建的 SOAPMessage
的 SOAPPart
中。由 getNode()
返回的 SOAPPart
不能保证格式良好。
protocol | 所得 SAAJ 树应支持的 SOAP 协议的名称 |
Throws | SOAPException:
如果无法创建支持指定协议的 SOAPMessage |
since | SAAJ 1.3 |
SAAJResult
public SAAJResult(String protocol) throws SOAPException
- Creates a
SAAJResult
that will present results in the form of a SAAJ tree that supports the specified protocol. TheDYNAMIC_SOAP_PROTOCOL
is ambiguous in this context and will cause this constructor to throw anUnsupportedOperationException
.This kind of
SAAJResult
is meant for use in situations where the results will be used as a parameter to a method that takes a parameter whose type, such asSOAPElement
, is drawn from the SAAJ API. When used in a transformation the results are populated into theSOAPPart
of aSOAPMessage
that is created internally. TheSOAPPart
returned byDOMResult.getNode()
is not guaranteed to be well-formed.- Parameters:
protocol
- - the name of the SOAP protocol that the resulting SAAJ tree should support- Throws:
SOAPException
- if aSOAPMessage
supporting the specified protocol cannot be created- Since:
- SAAJ 1.3
public
SAAJResult(SOAPMessage message)
创建一个 SAAJResult
,它会将结果写入提供的 SOAPMessage
的 SOAPPart
中。在正常情况下,将使用 DOM API 编写这些结果,因此,如果用来创建 SOAPPart
的数据不是格式良好的,则不保证完成的 SOAPPart
格式良好。当在转换中使用时,转换之后 SOAPMessage
的有效性只有通过 SAAJ 规范之外的方式才能得到保证。
message |
消息,该消息的 SOAPPart 将会由于某些转换或编组操作而被填充 |
since | SAAJ 1.3 |
SAAJResult
public SAAJResult(SOAPMessage message)
- Creates a
SAAJResult
that will write the results into theSOAPPart
of the suppliedSOAPMessage
. In the normal case these results will be written using DOM APIs and, as a result, the finishedSOAPPart
will not be guaranteed to be well-formed unless the data used to create it is also well formed. When used in a transformation the validity of theSOAPMessage
after the transformation can be guaranteed only by means outside SAAJ specification.- Parameters:
message
- - the message whoseSOAPPart
will be populated as a result of some transformation or marshalling operation- Since:
- SAAJ 1.3
public
SAAJResult(SOAPElement rootNode)
创建一个 SAAJResult
,它会将结果编写为指定 SOAPElement
的子节点。在正常情况下,将使用 DOM API 编写这些结果,因此可能使 SAAJ 树结构无效。只有在传入数据的有效性可以通过 SAAJ 规范之外的方式得到保证的情况下,才使用这种 SAAJResult
。
rootNode | 将追加结果的根节点 |
since | SAAJ 1.3 |
SAAJResult
public SAAJResult(SOAPElement rootNode)
- Creates a
SAAJResult
that will write the results as a child node of theSOAPElement
specified. In the normal case these results will be written using DOM APIs and as a result may invalidate the structure of the SAAJ tree. This kind ofSAAJResult
should only be used when the validity of the incoming data can be guaranteed by means outside of the SAAJ specification.- Parameters:
rootNode
- - the root to which the results will be appended- Since:
- SAAJ 1.3
Method Detail |
---|
public Node
getResult()
return | 在指定根 Node 下创建的结果 Tree。 |
since | SAAJ 1.3 |
getResult
public Node getResult()
- Returns:
- the resulting Tree that was created under the specified root Node.
- Since:
- SAAJ 1.3
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!