org.apache.axis.message

Class SOAPHeaderElement

Implemented Interfaces:
Cloneable, org.w3c.dom.Element, Node, org.w3c.dom.NodeList, Serializable, SOAPElement, SOAPHeaderElement
Known Direct Subclasses:
RPCHeaderParam

public class SOAPHeaderElement
extends MessageElement
implements SOAPHeaderElement

A simple header element abstraction. Extends MessageElement with header-specific stuff like mustUnderstand, actor, and a 'processed' flag.

Authors:
Glen Daniels (gdaniels@apache.org)
Glyn Normington (glyn@apache.org)

Nested Class Summary

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

MessageElement.QNameAttr

Field Summary

protected String
actor
protected boolean
mustUnderstand
protected boolean
processed
protected boolean
relay

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

SOAPHeaderElement(Element elem)
create a node through a deep copy of the passed in element.
SOAPHeaderElement(String namespace, String localPart)
constructor
SOAPHeaderElement(String namespace, String localPart, Object value)
constructor binding the internal object value field to the value parameter
SOAPHeaderElement(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context)
Advanced constructor used for deserialization.
SOAPHeaderElement(QName qname)
constructor declaring the qualified name of the node
SOAPHeaderElement(QName qname, Object value)
constructor declaring the qualified name of the node and its value
SOAPHeaderElement(Name name)
construct using a Name implementation,

Method Summary

String
getActor()
Returns the uri of the actor associated with this SOAPHeaderElement object.
NamedNodeMap
getAttributes()
boolean
getMustUnderstand()
Returns whether the mustUnderstand attribute for this SOAPHeaderElement object is turned on.
boolean
getRelay()
String
getRole()
boolean
isProcessed()
protected void
outputImpl(SerializationContext context)
Subclasses can override
void
setActor(String a)
Sets the actor associated with this SOAPHeaderElement object to the specified actor.
void
setMustUnderstand(boolean b)
Sets the mustUnderstand attribute for this SOAPHeaderElement object to be on or off.
void
setParentElement(SOAPElement parent)
Sets the parent of this Node object to the given SOAPElement object.
void
setProcessed(boolean value)
void
setRelay(boolean relay)
void
setRole(String a)

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

actor

protected String actor


mustUnderstand

protected boolean mustUnderstand


processed

protected boolean processed


relay

protected boolean relay

Constructor Details

SOAPHeaderElement

public SOAPHeaderElement(Element elem)
create a node through a deep copy of the passed in element.

Parameters:
elem - name to copy from


SOAPHeaderElement

public SOAPHeaderElement(String namespace,
                         String localPart)
constructor

Parameters:
namespace - namespace of element
localPart - local name


SOAPHeaderElement

public SOAPHeaderElement(String namespace,
                         String localPart,
                         Object value)
constructor binding the internal object value field to the value parameter

Parameters:
namespace - namespace of the element
localPart - local name
value - value of the node


SOAPHeaderElement

public SOAPHeaderElement(String namespace,
                         String localPart,
                         String prefix,
                         Attributes attributes,
                         DeserializationContext context)
            throws AxisFault
Advanced constructor used for deserialization.
  1. The context provides the mappings and Sax event recorder
  2. The soap messaging style is determined from the current message context, defaulting to SOAP1.1 if there is no current context.
  3. if there is an id attribute (any namespace), then the ID is registered with DeserializationContext.registerElementByID(String,MessageElement) ;a new recorder is created if needed.
  4. If there is an attribute "root" in the default SOAP namespace, then it is examined to see if it marks the element as root (value=="1" or not)
  5. If there is an arrayType attribute then we assume we are an array and set our MessageElement.typeQName field appropriately.
  6. The MessageElement.href field is set if there is a relevant href value

Parameters:
namespace - namespace namespace of element
localPart - local name local name of element
prefix - prefix prefix of element
attributes - attributes to save as our attributes
context - deserialization context for this message element

Throws:
AxisFault - if the encoding style is not recognized/supported


SOAPHeaderElement

public SOAPHeaderElement(QName qname)
constructor declaring the qualified name of the node

Parameters:


SOAPHeaderElement

public SOAPHeaderElement(QName qname,
                         Object value)
constructor declaring the qualified name of the node and its value

Parameters:
value - value of the node


SOAPHeaderElement

public SOAPHeaderElement(Name name)
construct using a Name implementation,

Parameters:

See Also:
MessageElement.MessageElement(String,String,String)

Method Details

getActor

public String getActor()
Returns the uri of the actor associated with this SOAPHeaderElement object.
Specified by:
getActor in interface SOAPHeaderElement

Returns:
a String giving the URI of the actor

See Also:
setActor(java.lang.String)


getAttributes

public NamedNodeMap getAttributes()
Overrides:
getAttributes in interface NodeImpl


getMustUnderstand

public boolean getMustUnderstand()
Returns whether the mustUnderstand attribute for this SOAPHeaderElement object is turned on.
Specified by:
getMustUnderstand in interface SOAPHeaderElement

Returns:
true if the mustUnderstand attribute of this SOAPHeaderElement object is turned on; false otherwise


getRelay

public boolean getRelay()


getRole

public String getRole()


isProcessed

public boolean isProcessed()


outputImpl

protected void outputImpl(SerializationContext context)
            throws Exception
Subclasses can override
Overrides:
outputImpl in interface MessageElement


setActor

public void setActor(String a)
Sets the actor associated with this SOAPHeaderElement object to the specified actor. The default value of an actor is: SOAPConstants.URI_SOAP_ACTOR_NEXT
Specified by:
setActor in interface SOAPHeaderElement

Parameters:

See Also:
getActor()


setMustUnderstand

public void setMustUnderstand(boolean b)
Sets the mustUnderstand attribute for this SOAPHeaderElement object to be on or off.

If the mustUnderstand attribute is on, the actor who receives the SOAPHeaderElement must process it correctly. This ensures, for example, that if the SOAPHeaderElement object modifies the message, that the message is being modified correctly.

Specified by:
setMustUnderstand in interface SOAPHeaderElement

Parameters:

See Also:
getMustUnderstand()


setParentElement

public void setParentElement(SOAPElement parent)
            throws SOAPException
Sets the parent of this Node object to the given SOAPElement object.
Specified by:
setParentElement in interface Node
Overrides:
setParentElement in interface NodeImpl

Parameters:
parent - the SOAPElement object to be set as the parent of this Node object

Throws:
SOAPException - if there is a problem in setting the parent to the given element

See Also:
getParentElement()


setProcessed

public void setProcessed(boolean value)


setRelay

public void setRelay(boolean relay)


setRole

public void setRole(String a)


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