org.apache.axis.message

Class SOAPEnvelope

Implemented Interfaces:
Cloneable, org.w3c.dom.Element, Node, org.w3c.dom.NodeList, Serializable, SOAPElement, SOAPEnvelope

public class SOAPEnvelope
extends MessageElement
implements SOAPEnvelope

Implementation of a SOAP Envelope

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.axis.message.MessageElement

MessageElement.QNameAttr

Field Summary

protected static Log
log
String
messageType
Vector
trailers

Fields inherited from class org.apache.axis.message.MessageElement

_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, log, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQName

Fields inherited from class org.apache.axis.message.NodeImpl

_isDirty, attributes, children, document, log, name, namespaceURI, parent, prefix, textRep

Constructor Summary

SOAPEnvelope()
SOAPEnvelope(InputStream input)
SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants)
SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants, SchemaVersion schemaVersion)
SOAPEnvelope(SOAPConstants soapConstants)
SOAPEnvelope(SOAPConstants soapConstants, SchemaVersion schemaVersion)

Method Summary

SOAPBody
addBody()
Add a soap body if one does not exist
void
addBodyElement(SOAPBodyElement element)
Add a SOAP Body Element
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
Node
cloneNode(boolean deep)
Name
createName(String localName)
create a Name given the local part
Name
createName(String localName, String prefix, String uri)
Create a name given local part, prefix and uri
SOAPBody
getBody()
Get the soap body
SOAPBodyElement
getBodyByName(String namespace, String localPart)
Get a body element given its name
Vector
getBodyElements()
Get all the BodyElement's in the soap body
SOAPBodyElement
getFirstBody()
Get the first BodyElement in the SOAP Body
SOAPHeader
getHeader()
Get the soap header
SOAPHeaderElement
getHeaderByName(String namespace, String localPart)
Get a header by name (always respecting the currently in-scope actors list)
SOAPHeaderElement
getHeaderByName(String namespace, String localPart, boolean accessAllHeaders)
Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.
Vector
getHeaders()
Get Headers
Vector
getHeadersByActor(ArrayList actors)
Get all the headers targeted at a list of actors.
Enumeration
getHeadersByName(String namespace, String localPart)
Get an enumeration of header elements given the namespace and localpart
Enumeration
getHeadersByName(String namespace, String localPart, boolean accessAllHeaders)
Return an Enumeration of headers which match the given namespace and localPart.
String
getMessageType()
Get the Message Type (REQUEST/RESPONSE)
SOAPConstants
getSOAPConstants()
Get the soap constants for this envelope
SchemaVersion
getSchemaVersion()
Get the schema version for this envelope
Vector
getTrailers()
Return trailers
void
outputImpl(SerializationContext context)
Should make SOAPSerializationException?
void
removeBody()
Remove the SOAP Body
void
removeBodyElement(SOAPBodyElement element)
Remove a Body Element from the soap body
Node
removeChild(Node oldChild)
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(String messageType)
Set the Message Type (REQUEST/RESPONSE)
void
setOwnerDocument(SOAPPart sp)
void
setSAAJEncodingCompliance(boolean comply)
void
setSchemaVersion(SchemaVersion schemaVersion)
Set the schema version for this envelope
void
setSoapConstants(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, childDeepCloned, cloneNode, cloning, detachAllChildren, equals, findElement, getAllAttributes, getAsDOM, getAsDocument, getAsString, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributeValue, getAttributeValue, getAttributesEx, 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, outputImpl, publishContents, publishToHandler, removeAttribute, removeAttribute, removeAttributeNS, removeAttributeNode, removeContents, removeNamespaceDeclaration, setAllAttributes, setAttribute, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, setContentsIndex, setEncodingStyle, setEndIndex, setEnvelope, setFixupDeserializer, setNSMappings, setName, setNamespaceURI, setObjectValue, setQName, setRecorder, setType, setValue, toString

Methods inherited from class org.apache.axis.message.NodeImpl

appendChild, cloneNode, compareDocumentPosition, convertAttrSAXtoDOM, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTextContent, getUserData, getValue, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDefaultNamespace, isDirty, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, makeAttributesEditable, normalize, output, recycleNode, removeChild, replaceChild, setDirty, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setNodeValue, setOwnerDocument, setParent, setParentElement, setPrefix, setTextContent, setUserData, setValue

Field Details

log

protected static Log log


messageType

public String messageType


trailers

public Vector trailers

Constructor Details

SOAPEnvelope

public SOAPEnvelope()


SOAPEnvelope

public SOAPEnvelope(InputStream input)
            throws SAXException


SOAPEnvelope

public SOAPEnvelope(boolean registerPrefixes,
                    SOAPConstants soapConstants)


SOAPEnvelope

public SOAPEnvelope(boolean registerPrefixes,
                    SOAPConstants soapConstants,
                    SchemaVersion schemaVersion)


SOAPEnvelope

public SOAPEnvelope(SOAPConstants soapConstants)


SOAPEnvelope

public SOAPEnvelope(SOAPConstants soapConstants,
                    SchemaVersion schemaVersion)

Method Details

addBody

public SOAPBody addBody()
            throws SOAPException
Add a soap body if one does not exist
Specified by:
addBody in interface SOAPEnvelope

Returns:

Throws:
SOAPException -


addBodyElement

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

Parameters:
element -


addHeader

public SOAPHeader addHeader()
            throws SOAPException
Add a soap header if one does not exist
Specified by:
addHeader in interface SOAPEnvelope

Returns:

Throws:
SOAPException -


addHeader

public void addHeader(SOAPHeaderElement hdr)
Add a HeaderElement

Parameters:
hdr -


addTrailer

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

Parameters:
element -


childDeepCloned

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


clearBody

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


cloneNode

public Node cloneNode(boolean deep)
Overrides:
cloneNode in interface MessageElement


createName

public Name createName(String localName)
            throws SOAPException
create a Name given the local part
Specified by:
createName in interface SOAPEnvelope

Parameters:
localName -

Returns:

Throws:
SOAPException -


createName

public Name createName(String localName,
                       String prefix,
                       String uri)
            throws SOAPException
Create a name given local part, prefix and uri
Specified by:
createName in interface SOAPEnvelope

Parameters:
localName -
prefix -
uri -

Returns:

Throws:
SOAPException -


getBody

public SOAPBody getBody()
            throws SOAPException
Get the soap body
Specified by:
getBody in interface SOAPEnvelope

Returns:

Throws:
SOAPException -


getBodyByName

public SOAPBodyElement getBodyByName(String namespace,
                                     String localPart)
            throws AxisFault
Get a body element given its name

Parameters:
namespace -
localPart -

Returns:

Throws:
AxisFault -


getBodyElements

public Vector getBodyElements()
            throws AxisFault
Get all the BodyElement's in the soap body

Returns:
vector with body elements

Throws:
AxisFault -


getFirstBody

public SOAPBodyElement getFirstBody()
            throws AxisFault
Get the first BodyElement in the SOAP Body

Returns:
first Body Element

Throws:
AxisFault -


getHeader

public SOAPHeader getHeader()
            throws SOAPException
Get the soap header
Specified by:
getHeader in interface SOAPEnvelope

Returns:

Throws:
SOAPException -


getHeaderByName

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


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.


getHeaders

public Vector getHeaders()
            throws AxisFault
Get Headers

Returns:
Vector containing Header's

Throws:
AxisFault -


getHeadersByActor

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


getHeadersByName

public Enumeration getHeadersByName(String namespace,
                                    String localPart)
            throws AxisFault
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.


getMessageType

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

Returns:
message type


getSOAPConstants

public SOAPConstants getSOAPConstants()
Get the soap constants for this envelope

Returns:


getSchemaVersion

public SchemaVersion getSchemaVersion()
Get the schema version for this envelope

Returns:


getTrailers

public Vector getTrailers()
Return trailers

Returns:
vector of some type


outputImpl

public void outputImpl(SerializationContext context)
            throws Exception
Should make SOAPSerializationException?
Overrides:
outputImpl in interface MessageElement


removeBody

public void removeBody()
Remove the SOAP Body


removeBodyElement

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

Parameters:
element -


removeChild

public Node removeChild(Node oldChild)
            throws DOMException
Overrides:
removeChild in interface NodeImpl


removeHeader

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

Parameters:
hdr -


removeHeaders

public void removeHeaders()
Remove all headers


removeTrailer

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

Parameters:
element -


setBody

public void setBody(SOAPBody body)
Set the soap body

Parameters:
body -


setHeader

public void setHeader(SOAPHeader hdr)
Set the SOAP Header

Parameters:
hdr -


setMessageType

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

Parameters:
messageType -


setOwnerDocument

public void setOwnerDocument(SOAPPart sp)


setSAAJEncodingCompliance

public void setSAAJEncodingCompliance(boolean comply)


setSchemaVersion

public void setSchemaVersion(SchemaVersion schemaVersion)
Set the schema version for this envelope

Parameters:
schemaVersion -


setSoapConstants

public void setSoapConstants(SOAPConstants soapConstants)
Set the soap constants for this envelope

Parameters:
soapConstants -


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.