Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

IHeaderBlock Class Reference

interface for the IHeaderBlock class. More...

#include <IHeaderBlock.hpp>

List of all members.

Public Member Functions

virtual INamespacecreateNamespaceDecl (const AxisChar *prefix, const AxisChar *uri)=0
virtual BasicNode * getFirstChild ()=0
virtual int getNoOfChildren ()=0
virtual BasicNode * createChild (NODE_TYPE eNODE_TYPE, AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, AxisChar *pachValue)=0
virtual BasicNode * createImmediateChild (NODE_TYPE eNODE_TYPE, AxisChar *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, AxisChar *pachValue)=0
virtual IAttributecreateStdAttribute (HEADER_BLOCK_STD_ATTR_TYPE eStdAttrType, SOAP_VERSION eSOAP_VERSION)=0
virtual IAttributecreateAttribute (const AxisChar *localname, const AxisChar *prefix, const AxisChar *uri, const AxisChar *value)=0
virtual IAttributecreateAttribute (const AxisChar *localname, const AxisChar *prefix, const AxisChar *value)=0
virtual const AxisChar * getAttributeValue (const AxisChar *localname, const AxisChar *prefix)=0
virtual const AxisChar * getAttributeUri (const AxisChar *localname, const AxisChar *prefix)=0
virtual BasicNode * createImmediateChild (NODE_TYPE eNODE_TYPE)=0
virtual BasicNode * createChild (NODE_TYPE eNODE_TYPE)=0
virtual BasicNode * getLastChild ()=0
virtual BasicNode * getChild (int iChildPosition)=0
virtual int addChild (BasicNode *pBasicNode)=0
virtual int setLocalName (const AxisChar *localname)=0
virtual const AxisChar * getLocalName ()=0
virtual int setURI (const AxisChar *uri)=0
virtual int setPrefix (const AxisChar *prefix)=0
virtual int initializeForTesting ()=0
 IHeaderBlock (const IHeaderBlock &rCopy)
virtual IHeaderBlockclone ()=0
virtual ~IHeaderBlock ()


Detailed Description

interface for the IHeaderBlock class.

Author:
Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)

Samisa Abeysinghe (sabeysinghe@virtusa.com)

Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)


Constructor & Destructor Documentation

virtual IHeaderBlock::~IHeaderBlock  )  [inline, virtual]
 

The Destructor.


Member Function Documentation

virtual int IHeaderBlock::addChild BasicNode *  pBasicNode  )  [pure virtual]
 

Adds a child node to the Header Block.

Parameters:
pBasicNode The child node pointer which is to be added NOTE: This cannot be a pointer to a child that has already been added> If you want to add the same data twice then create a new basic node.
Returns:
AXIS_SUCCESS to indicate successfull operation.AXIS_FAIL otherwise

virtual IHeaderBlock* IHeaderBlock::clone  )  [pure virtual]
 

Creates and returns a clone of this Header Block.

Returns:
A clone of this Header Block.

virtual IAttribute* IHeaderBlock::createAttribute const AxisChar *  localname,
const AxisChar *  prefix,
const AxisChar *  value
[pure virtual]
 

Creates a Attribute and adds it to this Header Block. NOTE: No checking is done to see if this attribute creation applies to the xsd rules. We expect that the server side will fail. e.g. If creating more than one attribute with the same name the outcome is undefined

Parameters:
localname The local name of the attribute. (mandatory)
prefix The prefix of the attribute. (optional)
value The value of the attribute. (optional)
Returns:
A pointer to the created Attribute will be returned.

virtual IAttribute* IHeaderBlock::createAttribute const AxisChar *  localname,
const AxisChar *  prefix,
const AxisChar *  uri,
const AxisChar *  value
[pure virtual]
 

Creates a Attribute and adds it to this Header Block. NOTE: No checking is done to see if this attribute creation applies to the xsd rules. We expect that the server side will fail. e.g. If creating more than one attribute with the same name the outcome is undefined

Parameters:
localname The local name of the attribute. (mandatory)
prefix The prefix of the attribute. (optional)
uri The namespace uri of the attribute. (optional)
value The value of the attribute. (optional)
Returns:
A pointer to the created Attribute will be returned.

virtual BasicNode* IHeaderBlock::createChild NODE_TYPE  eNODE_TYPE  )  [pure virtual]
 

Creates a child node depending on the given type. If the type is CHARACTER_NODE a CharacterElement is created. If the type is ELEMENT_NODE a ComplexElement is created. After creating the child it will not be added as a child to the header block. The user has to add the created child to the appropriate locaion as his wish.

Parameters:
eNODE_TYPE The type of the child to be created, it should be either CHARACTER_NODE for CharacterElements or ELEMENT_NODE for ComplexElements.
Returns:
The child node created will be returned if the creation is successfull. If the creation is unsccessfull it will return NULL.

virtual BasicNode* IHeaderBlock::createChild NODE_TYPE  eNODE_TYPE,
AxisChar *  pachLocalName,
AxisChar *  pachPrefix,
AxisChar *  pachUri,
AxisChar *  pachValue
[pure virtual]
 

Creates a child node depending on the given node type. i.e: if node type == CHARACTER_NODE then it creates a Character Element. if node type == ELEMENT_NODE then it creates a Complex Element. This method doesn't add the created child to this Header Block. If the user needs to add this created child then he has to use the addChild(BasicNode *pBasicNode) method after creating the child. If the node to be created is a CHARACTER_NODE then only the parameter pachValue will be usefull and for others you can provide NULL. If the node to be created is a ELEMENT_NODE then the parameters pachLocalName, pachPrefix, pachUri will be needed to provide and you can provide NULL for the pachValue.

Parameters:
eNODE_TYPE The node type to be created, i.e CHARACTER_NODE or ELEMENT_NODE.
pachLocalName The local name of the child node. A CHARACTER_NODE will ignore this.
pachPrefix The prefix of the child node. A CHARACTER_NODE will ignore this.
pachUri The namespace uri of the child node. A CHARACTER_NODE will ignore this.
pachValue The value of the child node. A ELEMENT_NODE will ignore this.
Returns:
The child node created will be returned if the creation is successfull. If the creation is unsccessfull it will return NULL.

virtual BasicNode* IHeaderBlock::createImmediateChild NODE_TYPE  eNODE_TYPE  )  [pure virtual]
 

Creates a child node depending on the given type. If the type is CHARACTER_NODE a CharacterElement is created. If the type is ELEMENT_NODE a ComplexElement is created. After creating the child it will be added as a immediate child to the header block.

Parameters:
The type of the child to be created, it should be either CHARACTER_NODE for CharacterElements or ELEMENT_NODE for ComplexElements.
Returns:
The child node created will be returned if the creation is successfull. If the creation is unsccessfull it will return NULL.

virtual BasicNode* IHeaderBlock::createImmediateChild NODE_TYPE  eNODE_TYPE,
AxisChar *  pachLocalName,
AxisChar *  pachPrefix,
AxisChar *  pachUri,
AxisChar *  pachValue
[pure virtual]
 

Creates a child node depending on the given type. If the type is CHARACTER_NODE a CharacterElement is created. If the type is ELEMENT_NODE a ComplexElement is created. After creating the child it will be added as a immediate child to the header block. It is important to note that if the type is CHARACTER_NODE only the NODE_TYPE and value (pachValue) parameters will be usefull.If the type is ELEMENT_NODE the parameters NODE_TYPE, pachLocalName, pachPrefix, pachUri will be usefull.

Parameters:
eNODE_TYPE The type of the child to be created, it should be either CHARACTER_NODE for CharacterElements or ELEMENT_NODE for ComplexElements.
pachLocalName The local name of the complex element to be created.
pachPrefix The prefix of the complex element to be created.
pachUri The namespace uri of the complex element to be created.
pachValue The value of the character element to be created.
Returns:
The child node created will be returned if the creation is successfull. If the creation is unsccessfull it will return NULL.

virtual INamespace* IHeaderBlock::createNamespaceDecl const AxisChar *  prefix,
const AxisChar *  uri
[pure virtual]
 

Creates a Attribute and adds it to this Header Block as a namespace.

Parameters:
prefix The prefix of the attribute.
uri The namespace uri of the attribute.
Returns:
A pointer to the created Attribute will be returned.

virtual IAttribute* IHeaderBlock::createStdAttribute HEADER_BLOCK_STD_ATTR_TYPE  eStdAttrType,
SOAP_VERSION  eSOAP_VERSION
[pure virtual]
 

A user can use this method to create a standard HeaderBlock attribute. The types of HEADER_BLOCK_STD_ATTR_TYPE are: ROLE_NEXT : To create the role attribute to point to next. ROLE_NONE : To create the role attribute to point to none. ROLE_ULTIMATE_RECEIVER : To create the role attribute to point to ultimate receiver. ACTOR : To create the actor attribute to point to next. MUST_UNDERSTAND_TRUE : To create the mustUnderstand attribute to point to true. MUST_UNDERSTAND_FALSE : To create the mustUnderstand attribute to point to false. To use ROLE_NEXT, ROLE_NONE, ROLE_ULTIMATE_RECEIVER, MUST_UNDERSTAND_TRUE, MUST_UNDERSTAND_FALSE the user has to pass SOAP_VER_1_2 as the SOAP_VERSION. To use ACTOR, MUST_UNDERSTAND_TRUE, MUST_UNDERSTAND_FALSE the user has to pass SOAP_VER_1_1 as the SOAP_VERSION. NOTE: No checking is done to see if the attributs being created on the header are correct for SOAP. e.g. if two MUST_UNDERSTAND_TRUE headers are created then the SOAP message is invalid but it will still get sent across to the server. In such instances we expect most servers to respond with a server fault.

Parameters:
eStdAttrType The standard attribute to be created. The current values that can be passes are: ROLE_NEXT, ROLE_NONE, ROLE_ULTIMATE_RECEIVER, ACTOR, MUST_UNDERSTAND_TRUE, MUST_UNDERSTAND_FALSE.
eSOAP_VERSION The related soap version. The vallues which could be passes are SOAP_VER_1_1 and SOAP_VER_1_2.
Returns:
A pointer to the created standard Attribute will be returned.

virtual const AxisChar* IHeaderBlock::getAttributeValue const AxisChar *  localname,
const AxisChar *  prefix
[pure virtual]
 

Gets an Attribute from the HeaderBlock.

Parameters:
localname The local name of the attribute.
prefix The prefix of the attribute.
Returns:
the value of the attribute is returned.

virtual BasicNode* IHeaderBlock::getChild int  iChildPosition  )  [pure virtual]
 

Returns the child element at the given postion. The user has to check whether the method return NULL before proceding.

Parameters:
iChildPosition The positon of the required child element.
Returns:
The required child element is returned if it exists. If the child element doesn't exsist this method returns NULL.

virtual BasicNode* IHeaderBlock::getLastChild  )  [pure virtual]
 

Returns the last child element. The user has to check whether the method return NULL before proceding.

Returns:
The last child element is returned if it exists. If the child element doesn't exsist this method returns NULL.

virtual const AxisChar* IHeaderBlock::getLocalName  )  [pure virtual]
 

Gets the local name of this Header Block.

virtual int IHeaderBlock::getNoOfChildren  )  [pure virtual]
 

Returns the number of child elements of this HeaderBlock.

Returns:
The number of child elements of this HeaderBlock.

virtual int IHeaderBlock::initializeForTesting  )  [pure virtual]
 

Initialized the Header Block for testing.

virtual int IHeaderBlock::setLocalName const AxisChar *  localname  )  [pure virtual]
 

Sets the local name of this Header Block.

Parameters:
localname The localname to set in.
Returns:
AXIS_SUCCESS if successful AXIS_FAIL otherwise

virtual int IHeaderBlock::setPrefix const AxisChar *  prefix  )  [pure virtual]
 

Sets the prefix of this Header Block.

Parameters:
prefix The prefix to set in.IF NULL is passed in the prefix is set to ""
Returns:
AXIS_SUCCESS if successful AXIS_FAIL otherwise

virtual int IHeaderBlock::setURI const AxisChar *  uri  )  [pure virtual]
 

Sets the namespace uri of this Header Block.

Parameters:
uri The namespace uri to set in. IF NULL is passed in then URI is set to ""
Returns:
AXIS_SUCCESS if successful AXIS_FAIL otherwise


The documentation for this class was generated from the following file:
Generated on Sat Apr 9 15:11:57 2005 for AxisC++ by doxygen 1.3.8