Package org.apache.axis.message
Class SOAPEnvelope
java.lang.Object
org.apache.axis.message.NodeImpl
org.apache.axis.message.MessageElement
org.apache.axis.message.SOAPEnvelope
- All Implemented Interfaces:
Serializable
,Cloneable
,Node
,SOAPElement
,SOAPEnvelope
,Element
,Node
,NodeList
Implementation of a SOAP Envelope
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.axis.message.MessageElement
MessageElement.QNameAttr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.apache.commons.logging.Log
Fields inherited from class org.apache.axis.message.MessageElement
_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQName
Fields inherited from class org.apache.axis.message.NodeImpl
_isDirty, attributes, children, document, name, namespaceURI, parent, prefix, textRep
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
-
Constructor Summary
ConstructorsConstructorDescriptionSOAPEnvelope
(boolean registerPrefixes, SOAPConstants soapConstants) SOAPEnvelope
(boolean registerPrefixes, SOAPConstants soapConstants, SchemaVersion schemaVersion) SOAPEnvelope
(InputStream input) SOAPEnvelope
(SOAPConstants soapConstants) SOAPEnvelope
(SOAPConstants soapConstants, SchemaVersion schemaVersion) -
Method Summary
Modifier and TypeMethodDescriptionaddBody()
Add a soap body if one does not existvoid
addBodyElement
(SOAPBodyElement element) Add a SOAP Body ElementAdd a soap header if one does not existvoid
Add a HeaderElementvoid
addTrailer
(MessageElement element) Add an element to the trailerprotected void
childDeepCloned
(NodeImpl oldNode, NodeImpl newNode) void
clear the elements in the soap bodycloneNode
(boolean deep) Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.createName
(String localName) create a Name given the local partcreateName
(String localName, String prefix, String uri) Create a name given local part, prefix and urigetBody()
Get the soap bodygetBodyByName
(String namespace, String localPart) Get a body element given its nameGet all the BodyElement's in the soap bodyGet the first BodyElement in the SOAP BodyGet the soap headergetHeaderByName
(String namespace, String localPart) Get a header by name (always respecting the currently in-scope actors list)getHeaderByName
(String namespace, String localPart, boolean accessAllHeaders) Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.Get HeadersgetHeadersByActor
(ArrayList actors) Get all the headers targeted at a list of actors.getHeadersByName
(String namespace, String localPart) Get an enumeration of header elements given the namespace and localpartgetHeadersByName
(String namespace, String localPart, boolean accessAllHeaders) Return an Enumeration of headers which match the given namespace and localPart.Get the Message Type (REQUEST/RESPONSE)Get the schema version for this envelopeGet the soap constants for this envelopeReturn trailersboolean
void
outputImpl
(SerializationContext context) Should make SOAPSerializationException?void
Remove the SOAP Bodyvoid
removeBodyElement
(SOAPBodyElement element) Remove a Body Element from the soap bodyremoveChild
(Node oldChild) Removes the child node indicated byoldChild
from the list of children, and returns it.void
Remove a Header Element from SOAP Headervoid
Remove all headersvoid
removeTrailer
(MessageElement element) Remove an element from the trailervoid
Set the soap bodyvoid
setDirty
(boolean dirty) set the dirty bit.void
setHeader
(SOAPHeader hdr) Set the SOAP Headervoid
setMessageType
(String messageType) Set the Message Type (REQUEST/RESPONSE)void
void
setRecorded
(boolean recorded) void
setSAAJEncodingCompliance
(boolean comply) void
setSchemaVersion
(SchemaVersion schemaVersion) Set the schema version for this envelopevoid
setSoapConstants
(SOAPConstants soapConstants) Set the soap constants for this envelopeMethods inherited from class org.apache.axis.message.MessageElement
addAttribute, addAttribute, addAttribute, addAttribute, addChild, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addMapping, addNamespaceDeclaration, addTextNode, cloning, detachAllChildren, equals, findElement, getAllAttributes, getAsDocument, getAsDOM, getAsString, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributesEx, getAttributeValue, getAttributeValue, getChildElement, getChildElements, getChildElements, getChildElements, getChildren, getCompleteAttributes, getDeserializationContext, getElementName, getElementsByTagName, getElementsByTagNameNS, getElementsNS, getEncodingStyle, getEnvelope, getFixupDeserializer, getHref, getID, getLength, getName, getNamespacePrefixes, getNamespaceURI, getObjectValue, getObjectValue, getOwnerDocument, getPrefix, getQName, getRealElement, getRecorder, getTagName, getType, getValue, getValueAsType, getValueAsType, getValueDOM, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, isRoot, item, output, publishContents, publishToHandler, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAllAttributes, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setContentsIndex, setEncodingStyle, setEndIndex, setEnvelope, setFixupDeserializer, setName, setNamespaceURI, setNSMappings, setObjectValue, setQName, setRecorder, setType, setValue, toString
Methods inherited from class org.apache.axis.message.NodeImpl
appendChild, compareDocumentPosition, convertAttrSAXtoDOM, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTextContent, getUserData, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDefaultNamespace, isDirty, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, makeAttributesEditable, normalize, recycleNode, replaceChild, reset, setDirty, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setOwnerDocument, setParent, setParentElement, setPrefix, setTextContent, setUserData
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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, 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, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
-
Field Details
-
log
protected static org.apache.commons.logging.Log log -
trailers
-
messageType
-
-
Constructor Details
-
SOAPEnvelope
public SOAPEnvelope() -
SOAPEnvelope
-
SOAPEnvelope
-
SOAPEnvelope
-
SOAPEnvelope
public SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants, SchemaVersion schemaVersion) -
SOAPEnvelope
- Throws:
SAXException
-
-
Method Details
-
getMessageType
Get the Message Type (REQUEST/RESPONSE)- Returns:
- message type
-
setMessageType
Set the Message Type (REQUEST/RESPONSE)- Parameters:
messageType
-
-
getBodyElements
Get all the BodyElement's in the soap body- Returns:
- vector with body elements
- Throws:
AxisFault
-
getTrailers
Return trailers- Returns:
- vector of some type
-
getFirstBody
Get the first BodyElement in the SOAP Body- Returns:
- first Body Element
- Throws:
AxisFault
-
getHeaders
Get Headers- Returns:
- Vector containing Header's
- Throws:
AxisFault
-
getHeadersByActor
Get all the headers targeted at a list of actors. -
addHeader
Add a HeaderElement- Parameters:
hdr
-
-
addBodyElement
Add a SOAP Body Element- Parameters:
element
-
-
removeHeaders
public void removeHeaders()Remove all headers -
setHeader
Set the SOAP Header- Parameters:
hdr
-
-
removeHeader
Remove a Header Element from SOAP Header- Parameters:
hdr
-
-
removeBody
public void removeBody()Remove the SOAP Body -
setBody
Set the soap body- Parameters:
body
-
-
removeBodyElement
Remove a Body Element from the soap body- Parameters:
element
-
-
removeTrailer
Remove an element from the trailer- Parameters:
element
-
-
clearBody
public void clearBody()clear the elements in the soap body -
addTrailer
Add an element to the trailer- Parameters:
element
-
-
getHeaderByName
Get a header by name (always respecting the currently in-scope actors list)- Throws:
AxisFault
-
getHeaderByName
public SOAPHeaderElement getHeaderByName(String namespace, String localPart, boolean accessAllHeaders) throws AxisFault Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.- Throws:
AxisFault
-
getBodyByName
Get a body element given its name- Parameters:
namespace
-localPart
-- Returns:
- Throws:
AxisFault
-
getHeadersByName
Get an enumeration of header elements given the namespace and localpart- Parameters:
namespace
-localPart
-- Returns:
- Throws:
AxisFault
-
getHeadersByName
public Enumeration getHeadersByName(String namespace, String localPart, boolean accessAllHeaders) throws AxisFault Return an Enumeration of headers which match the given namespace and localPart. Depending on the value of the accessAllHeaders parameter, we will attempt to filter on the current engine's list of actors. !!! NOTE THAT RIGHT NOW WE ALWAYS ASSUME WE'RE THE "ULTIMATE DESTINATION" (i.e. we match on null actor). IF WE WANT TO FULLY SUPPORT INTERMEDIARIES WE'LL NEED TO FIX THIS.- Throws:
AxisFault
-
outputImpl
Should make SOAPSerializationException?- Overrides:
outputImpl
in classMessageElement
- Parameters:
context
- destination.- Throws:
Exception
- if something went wrong.
-
getSOAPConstants
Get the soap constants for this envelope- Returns:
-
setSoapConstants
Set the soap constants for this envelope- Parameters:
soapConstants
-
-
getSchemaVersion
Get the schema version for this envelope- Returns:
-
setSchemaVersion
Set the schema version for this envelope- Parameters:
schemaVersion
-
-
addBody
Add a soap body if one does not exist- Specified by:
addBody
in interfaceSOAPEnvelope
- Returns:
- Throws:
SOAPException
-
addHeader
Add a soap header if one does not exist- Specified by:
addHeader
in interfaceSOAPEnvelope
- Returns:
- Throws:
SOAPException
-
createName
create a Name given the local part- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
-- Returns:
- Throws:
SOAPException
-
createName
Create a name given local part, prefix and uri- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
-prefix
-uri
-- Returns:
- Throws:
SOAPException
-
getBody
Get the soap body- Specified by:
getBody
in interfaceSOAPEnvelope
- Returns:
- Throws:
SOAPException
-
getHeader
Get the soap header- Specified by:
getHeader
in interfaceSOAPEnvelope
- Returns:
- Throws:
SOAPException
-
setSAAJEncodingCompliance
public void setSAAJEncodingCompliance(boolean comply) -
removeChild
Description copied from class:NodeImpl
Removes the child node indicated byoldChild
from the list of children, and returns it.- Specified by:
removeChild
in interfaceNode
- Overrides:
removeChild
in classNodeImpl
- Parameters:
oldChild
- The node being removed.- Returns:
- The node removed.
- Throws:
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised ifoldChild
is not a child of this node.
-
cloneNode
Description copied from class:MessageElement
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; (parentNode
isnull
.).
Cloning anElement
copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a childText
node. Cloning anAttribute
directly, as opposed to be cloned as part of anElement
cloning operation, returns a specified attribute (specified
istrue
). Cloning any other type of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy, but the children of anEntityReference
clone are readonly . In addition, clones of unspecifiedAttr
nodes are specified. And, cloningDocument
,DocumentType
,Entity
, andNotation
nodes is implementation dependent.- Specified by:
cloneNode
in interfaceNode
- Overrides:
cloneNode
in classMessageElement
- Parameters:
deep
- Iftrue
, recursively clone the subtree under the specified node; iffalse
, clone only the node itself (and its attributes, if it is anElement
).- Returns:
- The duplicate node.
-
childDeepCloned
- Overrides:
childDeepCloned
in classMessageElement
-
setOwnerDocument
-
setRecorded
public void setRecorded(boolean recorded) -
isRecorded
public boolean isRecorded() -
setDirty
public void setDirty(boolean dirty) Description copied from class:NodeImpl
set the dirty bit. will also set our parent as dirty, if there is one. Note that clearing the dirty bit does not propagate upwards.
-