|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.soap Interface Detail
- All Superinterfaces:
- Element, Node, SOAPElement, SOAPFaultElement
public interface Detail
- extends SOAPFaultElement
DetailEntry
对象的容器。DetailEntry
对象给出特定于应用程序的详细错误信息,以及与包含该对象的 SOAPBody
对象相关的详细错误信息。
可以使用方法 SOAPFault.getDetail
来检索 Detail
对象(SOAPFault
对象的一部分)。该 Detail
接口提供两个方法。第一种方法创建一个新 DetailEntry
对象,且自动将其添加到 Detail
对象。第二种方法获取 Detail
对象中包含的 DetailEntry
对象列表。
以下代码片段(其中 sf 是 SOAPFault
对象)获取它的 Detail
对象 (d),将新的 DetailEntry
对象添加到 d,然后获取 d 中所有 DetailEntry
对象列表。该代码片段还创建要传递给方法 addDetailEntry
的 Name
对象。变量 se(用于创建 Name
对象)是一个 SOAPEnvelope
对象。
Detail d = sf.getDetail(); Name name = se.createName("GetLastTradePrice", "WOMBAT", "http://www.wombat.org/trader"); d.addDetailEntry(name); Iterator it = d.getDetailEntries();
A container for DetailEntry
objects. DetailEntry
objects give detailed error information that is application-specific and
related to the SOAPBody
object that contains it.
A Detail
object, which is part of a SOAPFault
object, can be retrieved using the method SOAPFault.getDetail
.
The Detail
interface provides two methods. One creates a new
DetailEntry
object and also automatically adds it to
the Detail
object. The second method gets a list of the
DetailEntry
objects contained in a Detail
object.
The following code fragment, in which sf is a SOAPFault
object, gets its Detail
object (d), adds a new
DetailEntry
object to d, and then gets a list of all the
DetailEntry
objects in d. The code also creates a
Name
object to pass to the method addDetailEntry
.
The variable se, used to create the Name
object,
is a SOAPEnvelope
object.
Detail d = sf.getDetail(); Name name = se.createName("GetLastTradePrice", "WOMBAT", "http://www.wombat.org/trader"); d.addDetailEntry(name); Iterator it = d.getDetailEntries();
Field Summary |
---|
Method Summary | |
---|---|
DetailEntry |
addDetailEntry(Name name)
Creates a new DetailEntry object with the given
name and adds it to this Detail object. |
DetailEntry |
addDetailEntry(QName qname)
Creates a new DetailEntry object with the given
QName and adds it to this Detail object. |
Iterator |
getDetailEntries()
Gets an Iterator over all of the DetailEntry s in this Detail object. |
Methods inherited from interface javax.xml.soap.Node |
---|
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Methods inherited from interface org.w3c.dom.Element |
---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Method Detail |
---|
public DetailEntry
addDetailEntry(Name name) throws SOAPException
使用给定名称创建新的 DetailEntry
对象,并将其添加到此 Detail
对象。
name |
标识新 DetailEntry 对象的 Name 对象 |
Throws | SOAPException: 当将 DetailEntry 对象添加到此 Detail 对象过程中存在问题时,抛出该异常。 |
See also | addDetailEntry(QName qname) |
addDetailEntry
DetailEntry addDetailEntry(Name name) throws SOAPException
- Creates a new
DetailEntry
object with the given name and adds it to thisDetail
object. - Parameters:
name
- aName
object identifying the newDetailEntry
object- Throws:
SOAPException
- thrown when there is a problem in adding a DetailEntry object to this Detail object.- See Also:
addDetailEntry(QName qname)
public DetailEntry
addDetailEntry(javax.xml.namespace.QName qname) throws SOAPException
使用给定 QName 创建新的 DetailEntry
对象,并将其添加到此 Detail
对象。与使用 Name 的方法相比,应优先考虑此方法。
qname |
标识新 DetailEntry 对象的 QName 对象 |
Throws | SOAPException: 当将 DetailEntry 对象添加到此 Detail 对象过程中存在问题时,抛出该异常。 |
since | SAAJ 1.3 |
See also | addDetailEntry(Name name) |
addDetailEntry
DetailEntry addDetailEntry(QName qname) throws SOAPException
- Creates a new
DetailEntry
object with the given QName and adds it to thisDetail
object. This method is the preferred over the one using Name. - Parameters:
qname
- aQName
object identifying the newDetailEntry
object- Throws:
SOAPException
- thrown when there is a problem in adding a DetailEntry object to this Detail object.- Since:
- SAAJ 1.3
- See Also:
addDetailEntry(Name name)
public java.util.Iterator<E>
getDetailEntries()
获取在此 Detail
对象中所有 DetailEntry
上进行迭代的迭代器。
return |
一个 Iterator 对象,可在此 Detail 对象中的 DetailEntry 对象上进行迭代
|
getDetailEntries
Iterator getDetailEntries()
- Gets an Iterator over all of the
DetailEntry
s in thisDetail
object. - Returns:
- an
Iterator
object over theDetailEntry
objects in thisDetail
object
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!