Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.message
Class SOAPEnvelope  view SOAPEnvelope download SOAPEnvelope.java

java.lang.Object
  extended byorg.apache.axis.message.NodeImpl
      extended byorg.apache.axis.message.MessageElement
          extended byorg.apache.axis.message.SOAPEnvelope
All Implemented Interfaces:
java.lang.Cloneable, org.w3c.dom.Element, javax.xml.soap.Node, org.w3c.dom.Node, org.w3c.dom.NodeList, java.io.Serializable, javax.xml.soap.SOAPElement, javax.xml.soap.SOAPEnvelope

public class SOAPEnvelope
extends MessageElement
implements javax.xml.soap.SOAPEnvelope

Implementation of a SOAP Envelope


Nested Class Summary
 
Nested classes inherited from class org.apache.axis.message.MessageElement
MessageElement.QNameAttr
 
Field Summary
private  SOAPBody body
           
private  SOAPHeader header
           
protected static org.apache.commons.logging.Log log
           
 java.lang.String messageType
           
private  org.apache.axis.schema.SchemaVersion schemaVersion
           
private  org.apache.axis.soap.SOAPConstants soapConstants
           
 java.util.Vector trailers
           
 
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
SOAPEnvelope()
           
SOAPEnvelope(boolean registerPrefixes, org.apache.axis.soap.SOAPConstants soapConstants)
           
SOAPEnvelope(boolean registerPrefixes, org.apache.axis.soap.SOAPConstants soapConstants, org.apache.axis.schema.SchemaVersion schemaVersion)
           
SOAPEnvelope(java.io.InputStream input)
           
SOAPEnvelope(org.apache.axis.soap.SOAPConstants soapConstants)
           
SOAPEnvelope(org.apache.axis.soap.SOAPConstants soapConstants, org.apache.axis.schema.SchemaVersion schemaVersion)
           
 
Method Summary
 javax.xml.soap.SOAPBody addBody()
          Add a soap body if one does not exist
 void addBodyElement(SOAPBodyElement element)
          Add a SOAP Body Element
 javax.xml.soap.SOAPHeader addHeader()
          Add a soap header if one does not exist
 void addHeader(SOAPHeaderElement hdr)
          Add a HeaderElement
 void addTrailer(MessageElement element)
          Add an element to the trailer
protected  void childDeepCloned(NodeImpl oldNode, NodeImpl newNode)
           
 void clearBody()
          clear the elements in the soap body
 org.w3c.dom.Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 javax.xml.soap.Name createName(java.lang.String localName)
          create a Name given the local part
 javax.xml.soap.Name createName(java.lang.String localName, java.lang.String prefix, java.lang.String uri)
          Create a name given local part, prefix and uri
 javax.xml.soap.SOAPBody getBody()
          Get the soap body
 SOAPBodyElement getBodyByName(java.lang.String namespace, java.lang.String localPart)
          Get a body element given its name
 java.util.Vector getBodyElements()
          Get all the BodyElement's in the soap body
 SOAPBodyElement getFirstBody()
          Get the first BodyElement in the SOAP Body
 javax.xml.soap.SOAPHeader getHeader()
          Get the soap header
 SOAPHeaderElement getHeaderByName(java.lang.String namespace, java.lang.String localPart)
          Get a header by name (always respecting the currently in-scope actors list)
 SOAPHeaderElement getHeaderByName(java.lang.String namespace, java.lang.String localPart, boolean accessAllHeaders)
          Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.
 java.util.Vector getHeaders()
          Get Headers
 java.util.Vector getHeadersByActor(java.util.ArrayList actors)
          Get all the headers targeted at a list of actors.
 java.util.Enumeration getHeadersByName(java.lang.String namespace, java.lang.String localPart)
          Get an enumeration of header elements given the namespace and localpart
 java.util.Enumeration getHeadersByName(java.lang.String namespace, java.lang.String localPart, boolean accessAllHeaders)
          Return an Enumeration of headers which match the given namespace and localPart.
 java.lang.String getMessageType()
          Get the Message Type (REQUEST/RESPONSE)
 org.apache.axis.schema.SchemaVersion getSchemaVersion()
          Get the schema version for this envelope
 org.apache.axis.soap.SOAPConstants getSOAPConstants()
          Get the soap constants for this envelope
 java.util.Vector getTrailers()
          Return trailers
 void outputImpl(org.apache.axis.encoding.SerializationContext context)
          Should make SOAPSerializationException?
 void removeBody()
          Remove the SOAP Body
 void removeBodyElement(SOAPBodyElement element)
          Remove a Body Element from the soap body
 org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 void removeHeader(SOAPHeaderElement hdr)
          Remove a Header Element from SOAP Header
 void removeHeaders()
          Remove all headers
 void removeTrailer(MessageElement element)
          Remove an element from the trailer
 void setBody(SOAPBody body)
          Set the soap body
 void setHeader(SOAPHeader hdr)
          Set the SOAP Header
 void setMessageType(java.lang.String messageType)
          Set the Message Type (REQUEST/RESPONSE)
 void setOwnerDocument(org.apache.axis.SOAPPart sp)
           
private  void setOwnerDocumentForChildren(java.util.List children, org.apache.axis.SOAPPart sp)
           
 void setSAAJEncodingCompliance(boolean comply)
           
 void setSchemaVersion(org.apache.axis.schema.SchemaVersion schemaVersion)
          Set the schema version for this envelope
 void setSoapConstants(org.apache.axis.soap.SOAPConstants soapConstants)
          Set the soap constants for this envelope
 
Methods 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, convertAttrSAXtoDOM, detachNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDirty, isSupported, makeAttributesEditable, normalize, recycleNode, replaceChild, setDirty, setNodeValue, setOwnerDocument, setParent, setParentElement, setPrefix
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 
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 org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 

Field Detail

log

protected static org.apache.commons.logging.Log log

header

private SOAPHeader header

body

private SOAPBody body

trailers

public java.util.Vector trailers

soapConstants

private org.apache.axis.soap.SOAPConstants soapConstants

schemaVersion

private org.apache.axis.schema.SchemaVersion schemaVersion

messageType

public java.lang.String messageType
Constructor Detail

SOAPEnvelope

public SOAPEnvelope()

SOAPEnvelope

public SOAPEnvelope(org.apache.axis.soap.SOAPConstants soapConstants)

SOAPEnvelope

public SOAPEnvelope(org.apache.axis.soap.SOAPConstants soapConstants,
                    org.apache.axis.schema.SchemaVersion schemaVersion)

SOAPEnvelope

public SOAPEnvelope(boolean registerPrefixes,
                    org.apache.axis.soap.SOAPConstants soapConstants)

SOAPEnvelope

public SOAPEnvelope(boolean registerPrefixes,
                    org.apache.axis.soap.SOAPConstants soapConstants,
                    org.apache.axis.schema.SchemaVersion schemaVersion)

SOAPEnvelope

public SOAPEnvelope(java.io.InputStream input)
             throws org.xml.sax.SAXException
Method Detail

getMessageType

public java.lang.String getMessageType()
Get the Message Type (REQUEST/RESPONSE)


setMessageType

public void setMessageType(java.lang.String messageType)
Set the Message Type (REQUEST/RESPONSE)


getBodyElements

public java.util.Vector getBodyElements()
                                 throws org.apache.axis.AxisFault
Get all the BodyElement's in the soap body


getTrailers

public java.util.Vector getTrailers()
Return trailers


getFirstBody

public SOAPBodyElement getFirstBody()
                             throws org.apache.axis.AxisFault
Get the first BodyElement in the SOAP Body


getHeaders

public java.util.Vector getHeaders()
                            throws org.apache.axis.AxisFault
Get Headers


getHeadersByActor

public java.util.Vector getHeadersByActor(java.util.ArrayList actors)
Get all the headers targeted at a list of actors.


addHeader

public void addHeader(SOAPHeaderElement hdr)
Add a HeaderElement


addBodyElement

public void addBodyElement(SOAPBodyElement element)
Add a SOAP Body Element


removeHeaders

public void removeHeaders()
Remove all headers


setHeader

public void setHeader(SOAPHeader hdr)
Set the SOAP Header


removeHeader

public void removeHeader(SOAPHeaderElement hdr)
Remove a Header Element from SOAP Header


removeBody

public void removeBody()
Remove the SOAP Body


setBody

public void setBody(SOAPBody body)
Set the soap body


removeBodyElement

public void removeBodyElement(SOAPBodyElement element)
Remove a Body Element from the soap body


removeTrailer

public void removeTrailer(MessageElement element)
Remove an element from the trailer


clearBody

public void clearBody()
clear the elements in the soap body


addTrailer

public void addTrailer(MessageElement element)
Add an element to the trailer


getHeaderByName

public SOAPHeaderElement getHeaderByName(java.lang.String namespace,
                                         java.lang.String localPart)
                                  throws org.apache.axis.AxisFault
Get a header by name (always respecting the currently in-scope actors list)


getHeaderByName

public SOAPHeaderElement getHeaderByName(java.lang.String namespace,
                                         java.lang.String localPart,
                                         boolean accessAllHeaders)
                                  throws org.apache.axis.AxisFault
Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.


getBodyByName

public SOAPBodyElement getBodyByName(java.lang.String namespace,
                                     java.lang.String localPart)
                              throws org.apache.axis.AxisFault
Get a body element given its name


getHeadersByName

public java.util.Enumeration getHeadersByName(java.lang.String namespace,
                                              java.lang.String localPart)
                                       throws org.apache.axis.AxisFault
Get an enumeration of header elements given the namespace and localpart


getHeadersByName

public java.util.Enumeration getHeadersByName(java.lang.String namespace,
                                              java.lang.String localPart,
                                              boolean accessAllHeaders)
                                       throws org.apache.axis.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.


outputImpl

public void outputImpl(org.apache.axis.encoding.SerializationContext context)
                throws java.lang.Exception
Should make SOAPSerializationException?

Overrides:
outputImpl in class MessageElement

getSOAPConstants

public org.apache.axis.soap.SOAPConstants getSOAPConstants()
Get the soap constants for this envelope


setSoapConstants

public void setSoapConstants(org.apache.axis.soap.SOAPConstants soapConstants)
Set the soap constants for this envelope


getSchemaVersion

public org.apache.axis.schema.SchemaVersion getSchemaVersion()
Get the schema version for this envelope


setSchemaVersion

public void setSchemaVersion(org.apache.axis.schema.SchemaVersion schemaVersion)
Set the schema version for this envelope


addBody

public javax.xml.soap.SOAPBody addBody()
                                throws javax.xml.soap.SOAPException
Add a soap body if one does not exist

Specified by:
addBody in interface javax.xml.soap.SOAPEnvelope

addHeader

public javax.xml.soap.SOAPHeader addHeader()
                                    throws javax.xml.soap.SOAPException
Add a soap header if one does not exist

Specified by:
addHeader in interface javax.xml.soap.SOAPEnvelope

createName

public javax.xml.soap.Name createName(java.lang.String localName)
                               throws javax.xml.soap.SOAPException
create a Name given the local part

Specified by:
createName in interface javax.xml.soap.SOAPEnvelope

createName

public javax.xml.soap.Name createName(java.lang.String localName,
                                      java.lang.String prefix,
                                      java.lang.String uri)
                               throws javax.xml.soap.SOAPException
Create a name given local part, prefix and uri

Specified by:
createName in interface javax.xml.soap.SOAPEnvelope

getBody

public javax.xml.soap.SOAPBody getBody()
                                throws javax.xml.soap.SOAPException
Get the soap body

Specified by:
getBody in interface javax.xml.soap.SOAPEnvelope

getHeader

public javax.xml.soap.SOAPHeader getHeader()
                                    throws javax.xml.soap.SOAPException
Get the soap header

Specified by:
getHeader in interface javax.xml.soap.SOAPEnvelope

setSAAJEncodingCompliance

public void setSAAJEncodingCompliance(boolean comply)

removeChild

public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
                             throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
Removes the child node indicated by oldChild from the list of children, and returns it.

Specified by:
removeChild in interface org.w3c.dom.Node
Overrides:
removeChild in class NodeImpl

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Description copied from interface: org.w3c.dom.Node
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode is null) and no user data. User data associated to the imported node is not carried over. However, if any UserDataHandlers has been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns.
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any children it contains unless it is a deep clone. This includes text contained in an the Element since the text is contained in a child Text node. Cloning an Attr directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute (specified is true). Cloning an Attr always clones its children, since they represent its value, no matter whether this is a deep clone or not. Cloning an EntityReference automatically constructs its subtree if a corresponding Entity is available, no matter whether this is a deep clone or not. 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 an EntityReference clone are readonly . In addition, clones of unspecified Attr nodes are specified. And, cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent.

Specified by:
cloneNode in interface org.w3c.dom.Node
Overrides:
cloneNode in class MessageElement

childDeepCloned

protected void childDeepCloned(NodeImpl oldNode,
                               NodeImpl newNode)
Overrides:
childDeepCloned in class MessageElement

setOwnerDocument

public void setOwnerDocument(org.apache.axis.SOAPPart sp)

setOwnerDocumentForChildren

private void setOwnerDocumentForChildren(java.util.List children,
                                         org.apache.axis.SOAPPart sp)