|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBMSOAPElement
This interface exposes IBM-value add methods.
SOAPElement
Field Summary |
---|
Fields inherited from interface org.w3c.dom.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Method Summary | |
---|---|
javax.xml.soap.SOAPElement |
addComment(java.lang.String text)
Creates a new Comment object initialized with the given String and adds it to this javax.xml.soap.SOAPElement object. |
javax.xml.soap.SOAPElement |
addSwaRefTextNode(java.lang.String mimeType,
java.lang.Object attachment)
Add an swaRef text node to this SOAPElement. |
java.util.List |
getAttributes(boolean above,
boolean on,
boolean below)
Returns a list of Attr objects. |
org.w3c.dom.NodeList |
getChildNodes()
Returns the list of child nodes for this SOAPElement . |
IBMSOAPFactory |
getIBMSOAPFactory()
Returns the SOAPFactory |
javax.xml.soap.Name |
getNameFromText(java.lang.String text)
A javax.xml.soap.Name is constructed from the input text and the namespace/prefix information defined by the SOAPElement. |
java.util.List |
getNamespaceDeclarations(boolean above,
boolean on,
boolean below)
Returns a list of Attr objects for xmlns attributes. |
java.lang.Object |
getSwaRefAttachment()
Get the attachment referred to by this swaRef. |
java.lang.Object |
getSwaRefAttachment(javax.xml.soap.SOAPMessage message)
Get the attachment referred to by this swaRef. |
java.lang.String |
getTextFromName(javax.xml.soap.Name name,
boolean autoGenPrefix)
This is the reverse of the utility above. |
boolean |
hasAlternateContent()
Returns true if some or all of the SOAPElement's data content is stored in a non-SAAJ format. |
boolean |
isSwaRef()
Deterimine if this SOAPElement is an swaRef. |
org.xml.sax.InputSource |
toInputSource(boolean includeNSDecls)
Get an InputSource representing this SOAPElement There are actually two representations of a SOAPElement. |
java.lang.String |
toXMLString(boolean includeNSDecls)
Get a string of xml representing this SOAPElement There are actually two representations of a SOAPElement as a string: The first representation contains all of the data in the SOAPElement and its descendents. |
Methods inherited from interface javax.xml.soap.SOAPElement |
---|
addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle |
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 javax.xml.soap.Node |
---|
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, 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 |
---|
java.lang.String toXMLString(boolean includeNSDecls)
There are actually two representations of a SOAPElement as a string:
If includeNSDecls is false, the first representation is used.
If includeNSDecls is true, the second representation is used.
includeNSDecls
- boolean
org.xml.sax.InputSource toInputSource(boolean includeNSDecls) throws org.xml.sax.SAXException
There are actually two representations of a SOAPElement.
If includeNSDecls is false, the first representation is used.
If includeNSDecls is true, the second representation is used.
includeNSDecls
- boolean
org.xml.sax.SAXException
boolean hasAlternateContent()
Returns true if some or all of the SOAPElement's data content is stored in a non-SAAJ format. For example, the internal representation of the data content may be a String containing unparsed xml text. In such cases, this method will return true.
When an DOM or SAAJ method is invoked, the alternative content is automatically transformed into a full SAAJ tree. In such cases, this method will return true.
java.util.List getNamespaceDeclarations(boolean above, boolean on, boolean below)
Returns a list of Attr objects for xmlns attributes. Use the input parameters to designate if you want the namespace declarations above, on and/or below this element. The order of the attributes in the returned list are as follows:
above
- booleanon
- booleanbelow
- boolean
java.util.List getAttributes(boolean above, boolean on, boolean below)
Returns a list of Attr objects. Use the input parameters to designate if you want the attributes above, on and/or below this element. The order of the attributes in the returned list are as follows:
above
- booleanon
- booleanbelow
- boolean
javax.xml.soap.Name getNameFromText(java.lang.String text)
Example: Input: text = "pre:foo" SOAPElement =Output: Name with the following information: prefix = "pre" localName = "foo" uri = "http://namespace" qualified name = "pre:foo"
Intended Use: A SOAPElement
may contain a text value or an attribute value that
represents a QName. This utility method is useful for obtaining
the Name from the text.
text
- String representing a QName.
java.lang.String getTextFromName(javax.xml.soap.Name name, boolean autoGenPrefix)
The SOAPElement is changed to add any necessary namespace/prefix information.
Example: Input SOAPElement =Name has the following information: prefix = "pre" localName = "foo" uri = "http://namespace" qualified name = "pre:foo" Output: SOAPElement = text = "pre:foo"
Intended Use:
A SOAPElement
may contain a text value or an attribute value that
represents a QName. This utility method is useful for setting the
value from a Name object.
name
- autoGenPrefix
- boolean if set to true, the prefix in the Name is ignored and a new prefix is
automatically generated.
javax.xml.soap.SOAPElement addSwaRefTextNode(java.lang.String mimeType, java.lang.Object attachment) throws javax.xml.soap.SOAPException
This method is an addition to the standard SAAJ functionality. However, this functionality may be added to SAAJ in the future, in which case it will then become deprecated.
mimeType
- MIME data type of the swaRefattachment
- The attachment object. The class of this
object must match the mimeType.
SOAPException
- if the attachment could not be added,
or the attachment object doesn't match the mimeType:
image/gif, image/jpeg ==> java.awt.Image text/plain ==> java.lang.String multipart/* ==> javax.mail.internet.MimeMultipart text/xml, application/xml ==> javax.xml.transform.Source all others ==> javax.activation.DataHandler
javax.xml.soap.SOAPException
boolean isSwaRef()
SOAPElement
is an swaRef.
This is an addition to the standard SAAJ functionality. However, this functionality may be added to SAAJ in the future, in which case it will then become deprecated.
SOAPElement
is an swaRef.java.lang.Object getSwaRefAttachment() throws javax.xml.soap.SOAPException
SOAPMessage has methods to get attachments. The no-parameter version is slightly less efficient since it has to find the SOAPMessage associated with this SOAPElement.
This method is an addition to the standard SAAJ functionality. However, this functionality may be added to SAAJ in the future, in which case it will then become deprecated.
SOAPException
- if this SOAPElement is not an swaRef.
javax.xml.soap.SOAPException
java.lang.Object getSwaRefAttachment(javax.xml.soap.SOAPMessage message) throws javax.xml.soap.SOAPException
Note that there are two versions to this method: one takes no parameters; the other takes a SOAPMessage. SOAPMessage has methods to get attachments. The no-parameter version is slightly less efficient since it has to find the
SOAPMessage associated with this SOAPElement.
This method is an addition to the standard SAAJ functionality. However, this functionality may be added to SAAJ in the future, in which case it will then become deprecated.
message
- If you have the SOAPMessage associated with
this SOAPElement, give it to this method so it doesn't have
to look for it itself.
SOAPException
- if this SOAPElement is not an swaRef.
javax.xml.soap.SOAPException
org.w3c.dom.NodeList getChildNodes()
SOAPElement
.
Note: The returned NodeList is not thread-safe. In a multi-threaded environment, use the DOM getFirstChild()/getNextSibling() methods to traverse the children.
For example, the following code may fail in a multi-threaded environment:
Here is the same logic using the getFirstChild()/getNextSibling() methods:NodeList nl = el.getChildNodes();
for (int i=0; i<.getLength(); i++) {
Node child = nl.item(i);
...
}
for (Node child = el.getFirstChild();
child != null;
child = child.getNextSibling()) {
...
}
getChildNodes
in interface org.w3c.dom.Node
SOAPElement
javax.xml.soap.SOAPElement addComment(java.lang.String text) throws javax.xml.soap.SOAPException
text
- a String object with the textual content to be added
SOAPException
- if there is an error in creating the new Comment object
javax.xml.soap.SOAPException
IBMSOAPFactory getIBMSOAPFactory()
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |