org.apache.axis.message

Class SOAPEnvelope

public class SOAPEnvelope extends MessageElement implements SOAPEnvelope

Implementation of a SOAP Envelope
Field Summary
protected static Loglog
StringmessageType
Vectortrailers
Constructor Summary
SOAPEnvelope()
SOAPEnvelope(SOAPConstants soapConstants)
SOAPEnvelope(SOAPConstants soapConstants, SchemaVersion schemaVersion)
SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants)
SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants, SchemaVersion schemaVersion)
SOAPEnvelope(InputStream input)
Method Summary
SOAPBodyaddBody()
Add a soap body if one does not exist
voidaddBodyElement(SOAPBodyElement element)
Add a SOAP Body Element
voidaddHeader(SOAPHeaderElement hdr)
Add a HeaderElement
SOAPHeaderaddHeader()
Add a soap header if one does not exist
voidaddTrailer(MessageElement element)
Add an element to the trailer
protected voidchildDeepCloned(NodeImpl oldNode, NodeImpl newNode)
voidclearBody()
clear the elements in the soap body
NodecloneNode(boolean deep)
NamecreateName(String localName)
create a Name given the local part
NamecreateName(String localName, String prefix, String uri)
Create a name given local part, prefix and uri
SOAPBodygetBody()
Get the soap body
SOAPBodyElementgetBodyByName(String namespace, String localPart)
Get a body element given its name
VectorgetBodyElements()
Get all the BodyElement's in the soap body
SOAPBodyElementgetFirstBody()
Get the first BodyElement in the SOAP Body
SOAPHeadergetHeader()
Get the soap header
SOAPHeaderElementgetHeaderByName(String namespace, String localPart)
Get a header by name (always respecting the currently in-scope actors list)
SOAPHeaderElementgetHeaderByName(String namespace, String localPart, boolean accessAllHeaders)
Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.
VectorgetHeaders()
Get Headers
VectorgetHeadersByActor(ArrayList actors)
Get all the headers targeted at a list of actors.
EnumerationgetHeadersByName(String namespace, String localPart)
Get an enumeration of header elements given the namespace and localpart
EnumerationgetHeadersByName(String namespace, String localPart, boolean accessAllHeaders)
Return an Enumeration of headers which match the given namespace and localPart.
StringgetMessageType()
Get the Message Type (REQUEST/RESPONSE)
SchemaVersiongetSchemaVersion()
Get the schema version for this envelope
SOAPConstantsgetSOAPConstants()
Get the soap constants for this envelope
VectorgetTrailers()
Return trailers
booleanisRecorded()
voidoutputImpl(SerializationContext context)
Should make SOAPSerializationException?
voidremoveBody()
Remove the SOAP Body
voidremoveBodyElement(SOAPBodyElement element)
Remove a Body Element from the soap body
NoderemoveChild(Node oldChild)
voidremoveHeader(SOAPHeaderElement hdr)
Remove a Header Element from SOAP Header
voidremoveHeaders()
Remove all headers
voidremoveTrailer(MessageElement element)
Remove an element from the trailer
voidsetBody(SOAPBody body)
Set the soap body
voidsetDirty(boolean dirty)
voidsetHeader(SOAPHeader hdr)
Set the SOAP Header
voidsetMessageType(String messageType)
Set the Message Type (REQUEST/RESPONSE)
voidsetOwnerDocument(SOAPPart sp)
voidsetRecorded(boolean recorded)
voidsetSAAJEncodingCompliance(boolean comply)
voidsetSchemaVersion(SchemaVersion schemaVersion)
Set the schema version for this envelope
voidsetSoapConstants(SOAPConstants soapConstants)
Set the soap constants for this envelope

Field Detail

log

protected static Log log

messageType

public String messageType

trailers

public Vector trailers

Constructor Detail

SOAPEnvelope

public SOAPEnvelope()

SOAPEnvelope

public SOAPEnvelope(SOAPConstants soapConstants)

SOAPEnvelope

public SOAPEnvelope(SOAPConstants soapConstants, SchemaVersion schemaVersion)

SOAPEnvelope

public SOAPEnvelope(boolean registerPrefixes, SOAPConstants soapConstants)

SOAPEnvelope

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

SOAPEnvelope

public SOAPEnvelope(InputStream input)

Method Detail

addBody

public SOAPBody addBody()
Add a soap body if one does not exist

Returns:

Throws: SOAPException

addBodyElement

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

Parameters: element

addHeader

public void addHeader(SOAPHeaderElement hdr)
Add a HeaderElement

Parameters: hdr

addHeader

public SOAPHeader addHeader()
Add a soap header if one does not exist

Returns:

Throws: SOAPException

addTrailer

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

Parameters: element

childDeepCloned

protected void childDeepCloned(NodeImpl oldNode, NodeImpl newNode)

clearBody

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

cloneNode

public Node cloneNode(boolean deep)

createName

public Name createName(String localName)
create a Name given the local part

Parameters: localName

Returns:

Throws: SOAPException

createName

public Name createName(String localName, String prefix, String uri)
Create a name given local part, prefix and uri

Parameters: localName prefix uri

Returns:

Throws: SOAPException

getBody

public SOAPBody getBody()
Get the soap body

Returns:

Throws: SOAPException

getBodyByName

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

Parameters: namespace localPart

Returns:

Throws: AxisFault

getBodyElements

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

Returns: vector with body elements

Throws: AxisFault

getFirstBody

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

Returns: first Body Element

Throws: AxisFault

getHeader

public SOAPHeader getHeader()
Get the soap header

Returns:

Throws: SOAPException

getHeaderByName

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

getHeaderByName

public 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.

getHeaders

public Vector getHeaders()
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)
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)
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

getSchemaVersion

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

Returns:

getSOAPConstants

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

Returns:

getTrailers

public Vector getTrailers()
Return trailers

Returns: vector of some type

isRecorded

public boolean isRecorded()

outputImpl

public void outputImpl(SerializationContext context)
Should make SOAPSerializationException?

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)

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

setDirty

public void setDirty(boolean dirty)

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)

setRecorded

public void setRecorded(boolean recorded)

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.