CSenSoapEnvelope2 Class Reference

class CSenSoapEnvelope2 : public CSenFragmentBase
CSenSoapEnvelope is an utility class offering capability to parse XML SOAP envelope and manipulation methods to alter its contents. Typically WSC uses this class to parse messages received through WSF HandleMessageL() and HandleErrorL() callbacks. Class has convenience methods for checking if a SOAP envelope body contains a fault and functionality to detach SOAP Fault object out from it. Also possibility to set SOAPAction HTTP header is supported. SenUtils.lib
Since
Series60 4.0

Inherits from

Public Member Functions
~CSenSoapEnvelope2 ()
IMPORT_C TXmlEngElement AddHeaderL ( TXmlEngElement )
IMPORT_C HBufC8 * BodyAsStringL ()
IMPORT_C TXmlEngElement BodyL ()
IMPORT_C MSenMessage * CloneL ()
IMPORT_C MSenMessageContext * Context ()
IMPORT_C CSenSoapFault2 * DetachFaultL ()
IMPORT_C TDirection Direction ()
IMPORT_C CSenSoapFault2 * FaultL ()
IMPORT_C TBool HasBody ()
IMPORT_C TBool HasHeader ()
IMPORT_C TXmlEngElement HeaderL ()
IMPORT_C TBool IsFault ()
IMPORT_C TBool IsSafeToCast (TClass)
IMPORT_C CSenSoapEnvelope2 * NewL ()
IMPORT_C CSenSoapEnvelope2 * NewL ( MSenMessageContext &)
IMPORT_C CSenSoapEnvelope2 * NewL ( CSenSoapEnvelope2 &)
IMPORT_C CSenSoapEnvelope2 * NewLC ()
IMPORT_C CSenSoapEnvelope2 * NewLC ( MSenMessageContext &)
IMPORT_C CSenSoapEnvelope2 * NewLC ( CSenSoapEnvelope2 &)
IMPORT_C MSenProperties * Properties ()
IMPORT_C TPtrC8 SetBodyL (const TDesC8 &)
IMPORT_C TXmlEngElement SetBodyL ( TXmlEngElement )
IMPORT_C TInt SetContext ( MSenMessageContext *)
IMPORT_C TInt SetProperties ( MSenProperties *)
IMPORT_C TPtrC8 SetSoapActionL (const TDesC8 &)
IMPORT_C TPtrC8 SoapAction ()
IMPORT_C TSOAPVersion SoapVersion ()
IMPORT_C TInt TxnId ()
IMPORT_C TClass Type ()
Protected Member Functions
CSenSoapEnvelope2 ()
IMPORT_C void BaseConstructL ( TSOAPVersion )
IMPORT_C void BaseConstructL ()
IMPORT_C void BaseConstructL ( MSenMessageContext &)
IMPORT_C void BaseConstructL ( MSenMessageContext &, TSOAPVersion )
IMPORT_C void BaseConstructL ( CSenSoapEnvelope2 &)
IMPORT_C CSenFragmentBase * CreateBodyFragmentL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, TXmlEngElement &, RSenDocument &)
IMPORT_C void OnEndElementL (const RTagInfo &, TInt )
IMPORT_C void OnStartElementL (const RTagInfo &, const RAttributeArray &, TInt )
IMPORT_C void ParseHeaderL (const RTagInfo &, const RAttributeArray &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSenFragmentBase::AddAttributesL(const RAttributeArray &)
CSenFragmentBase::AddAttributesToElementL(TXmlEngElement,const RAttributeArray &)
CSenFragmentBase::AddContentL(const TDesC8 &)
CSenFragmentBase::AddNamespacesL()
CSenFragmentBase::AsDocumentL()
CSenFragmentBase::AsElementL()
CSenFragmentBase::AsXmlL()
CSenFragmentBase::AsXmlUnicodeL()
CSenFragmentBase::BaseConstructL(TXmlEngElement &,RSenDocument &)
CSenFragmentBase::BaseConstructL(const TDesC8 &)
CSenFragmentBase::BaseConstructL(const TDesC8 &,const TDesC8 &)
CSenFragmentBase::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenFragmentBase::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenFragmentBase::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,TXmlEngElement &)
CSenFragmentBase::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,TXmlEngElement &,RSenDocument &)
CSenFragmentBase::BaseConstructL(const TXmlEngElement &)
CSenFragmentBase::CSenFragmentBase()
CSenFragmentBase::ConsistsOfL(CSenFragmentBase &)
CSenFragmentBase::ConsistsOfL(TXmlEngElement &,TXmlEngElement &)
CSenFragmentBase::ContentL()
CSenFragmentBase::ContentOf(const TDesC8 &)
CSenFragmentBase::ExtractElement()
CSenFragmentBase::GetExtendedInterface(const TInt32)
CSenFragmentBase::LocalName()const
CSenFragmentBase::Namespace(const TDesC8 &)
CSenFragmentBase::NewL(TXmlEngElement &,RSenDocument &)
CSenFragmentBase::NewL(const TDesC8 &)
CSenFragmentBase::NewL(const TDesC8 &,const TDesC8 &)
CSenFragmentBase::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenFragmentBase::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenFragmentBase::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,TXmlEngElement &)
CSenFragmentBase::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,TXmlEngElement &,RSenDocument &)
CSenFragmentBase::NewL(const TXmlEngElement &)
CSenFragmentBase::NsPrefix()const
CSenFragmentBase::NsUri()const
CSenFragmentBase::OnContentL(const TDesC8 &,TInt)
CSenFragmentBase::OnDelegateParsingL(CSenFragmentBase &)
CSenFragmentBase::OnDelegateParsingL(const RTagInfo &,const RAttributeArray &,TInt)
CSenFragmentBase::OnEndDocumentL(TInt)
CSenFragmentBase::OnEndPrefixMappingL(const RString &,TInt)
CSenFragmentBase::OnError(TInt)
CSenFragmentBase::OnIgnorableWhiteSpaceL(const TDesC8 &,TInt)
CSenFragmentBase::OnProcessingInstructionL(const TDesC8 &,const TDesC8 &,TInt)
CSenFragmentBase::OnResumeParsingFromL(const RTagInfo &,TInt)
CSenFragmentBase::OnSkippedEntityL(const RString &,TInt)
CSenFragmentBase::OnStartDocumentL(const RDocumentParameters &,TInt)
CSenFragmentBase::OnStartPrefixMappingL(const RString &,const RString &,TInt)
CSenFragmentBase::OnWriteEndElementL(const RTagInfo &)
CSenFragmentBase::OnWriteStartElementL(const RTagInfo &,const RAttributeArray &)
CSenFragmentBase::RenameL(const TDesC8 &,const TDesC8 &)
CSenFragmentBase::RenameL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenFragmentBase::RenameLocalNameL(const TDesC8 &)
CSenFragmentBase::RenameNamespaceL(const TDesC8 &)
CSenFragmentBase::RenameNamespaceL(const TDesC8 &,const TDesC8 &)
CSenFragmentBase::RenamePrefixL(const TDesC8 &)
CSenFragmentBase::ResetContentL()
CSenFragmentBase::SetContentHandler(CSenFragmentBase &)
CSenFragmentBase::SetContentL(const TDesC8 &)
CSenFragmentBase::SetContentOfL(const TDesC8 &,const TDesC8 &)
CSenFragmentBase::SetDocument(RSenDocument &)
CSenFragmentBase::SetOwner(CSenFragmentBase &)
CSenFragmentBase::StartSavingContent()
CSenFragmentBase::WriteAsXMLToL(RWriteStream &)
CSenFragmentBase::~CSenFragmentBase()
Protected Attributes
TDirection iDirection
TBool iFault
TInt iTransactionId
CSenFragmentBase * ipBodyFragment
CSenFragmentBase * ipHeaderFragment
MSenMessageContext * ipNotOwnedContext
MSenProperties * ipProperties
TAny * ipReserved
HBufC8 * ipSoapAction
Inherited Attributes
CSenFragmentBase::iDocument
CSenFragmentBase::iElement
CSenFragmentBase::iState
CSenFragmentBase::ipContentBuf
CSenFragmentBase::ipContentWriteStream
CSenFragmentBase::ipDelegate
CSenFragmentBase::ipNamespaceArray
CSenFragmentBase::ipOwner
CSenFragmentBase::ipParser

Constructor & Destructor Documentation

CSenSoapEnvelope2()

CSenSoapEnvelope2 ( ) [protected]

Constructor.

~CSenSoapEnvelope2()

IMPORT_C ~CSenSoapEnvelope2 ( ) [virtual]

Destructor.

Member Functions Documentation

AddHeaderL(TXmlEngElement)

IMPORT_C TXmlEngElement AddHeaderL ( TXmlEngElement aHeaderElement ) [virtual]
Adds an element to the header.
Since
Series60 4.0

Parameters

TXmlEngElement aHeaderElement new child element to be added inside Header element. Ownership is always transferred to CSenSoapEnvelope.

BaseConstructL(TSOAPVersion)

IMPORT_C void BaseConstructL ( TSOAPVersion aVersion ) [protected]
This method should be called from the deriving classes ConstructL() methods.
Since
Series60 4.0

Parameters

TSOAPVersion aVersion

BaseConstructL()

IMPORT_C void BaseConstructL ( ) [protected]
This method should be called from the deriving classes ConstructL() methods.
Since
Series60 4.0

BaseConstructL(MSenMessageContext &)

IMPORT_C void BaseConstructL ( MSenMessageContext & aMessage ) [protected]
This method should be called from the deriving classes ConstructL() methods.
Since
Series60 4.0

Parameters

MSenMessageContext & aMessage

BaseConstructL(MSenMessageContext &, TSOAPVersion)

IMPORT_C void BaseConstructL ( MSenMessageContext & aMessage,
TSOAPVersion aVersion
) [protected]
This method should be called from the deriving classes ConstructL() methods.
Since
Series60 4.0

Parameters

MSenMessageContext & aMessage
TSOAPVersion aVersion

BaseConstructL(CSenSoapEnvelope2 &)

IMPORT_C void BaseConstructL ( CSenSoapEnvelope2 & aEnvelope ) [protected]
This method should be called from the deriving classes ConstructL() methods.
Since
Series60 4.0

Parameters

CSenSoapEnvelope2 & aEnvelope

BodyAsStringL()

IMPORT_C HBufC8 * BodyAsStringL ( ) [virtual]
Getter for the envelope body as a UTF-8 form XML string.
Since
Series60 4.0

BodyL()

IMPORT_C TXmlEngElement BodyL ( ) [virtual]
Getter for envelopes body
Since
Series60 4.0

CloneL()

IMPORT_C MSenMessage * CloneL ( ) [virtual]

Context()

IMPORT_C MSenMessageContext * Context ( ) [virtual]

CreateBodyFragmentL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, TXmlEngElement &, RSenDocument &)

IMPORT_C CSenFragmentBase * CreateBodyFragmentL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aPrefix,
const RAttributeArray & aAttributes,
TXmlEngElement & aParent,
RSenDocument & aOwnerDocument
) [protected, virtual]

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aPrefix
const RAttributeArray & aAttributes
TXmlEngElement & aParent
RSenDocument & aOwnerDocument

DetachFaultL()

IMPORT_C CSenSoapFault2 * DetachFaultL ( ) [virtual]
Detaches the <Fault> element from the envelope, removing the element from the envelope.
Since
Series60 4.0

Direction()

IMPORT_C TDirection Direction ( ) [virtual]

FaultL()

IMPORT_C CSenSoapFault2 * FaultL ( ) [virtual]
Gets the <Fault> element. Ownership is not transferred. NULL if not a fault.
Since
Series60 4.0

HasBody()

IMPORT_C TBool HasBody ( )

HasHeader()

IMPORT_C TBool HasHeader ( )

HeaderL()

IMPORT_C TXmlEngElement HeaderL ( ) [virtual]
Getter for envelopes header
Since
Series60 4.0

IsFault()

IMPORT_C TBool IsFault ( ) [virtual]
Checks if this SOAP envelope body contains SOAP fault or not.
Since
Series60 4.0

IsSafeToCast(TClass)

IMPORT_C TBool IsSafeToCast ( TClass aType ) [virtual]

Parameters

TClass aType

NewL()

IMPORT_C CSenSoapEnvelope2 * NewL ( ) [static]

Two-phased constructor.

NewL(MSenMessageContext &)

IMPORT_C CSenSoapEnvelope2 * NewL ( MSenMessageContext & aContext ) [static]

Two-phased constructor.

Parameters

MSenMessageContext & aContext

NewL(CSenSoapEnvelope2 &)

IMPORT_C CSenSoapEnvelope2 * NewL ( CSenSoapEnvelope2 & aEnvelope ) [static]

Two-phased copy constructor.

Parameters

CSenSoapEnvelope2 & aEnvelope

NewLC()

IMPORT_C CSenSoapEnvelope2 * NewLC ( ) [static]

Two-phased constructor.

NewLC(MSenMessageContext &)

IMPORT_C CSenSoapEnvelope2 * NewLC ( MSenMessageContext & aContext ) [static]

Two-phased constructor.

Parameters

MSenMessageContext & aContext

NewLC(CSenSoapEnvelope2 &)

IMPORT_C CSenSoapEnvelope2 * NewLC ( CSenSoapEnvelope2 & aEnvelope ) [static]

Two-phased copy constructor.

Parameters

CSenSoapEnvelope2 & aEnvelope

OnEndElementL(const RTagInfo &, TInt)

IMPORT_C void OnEndElementL ( const RTagInfo & aElement,
TInt aErrorCode
) [protected, virtual]
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Since
Series60 3.1
MContentHandler

Parameters

const RTagInfo & aElement
TInt aErrorCode

OnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)

IMPORT_C void OnStartElementL ( const RTagInfo & aElement,
const RAttributeArray & aAttributes,
TInt aErrorCode
) [protected, virtual]
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Since
Series60 3.1
MContentHandler

Parameters

const RTagInfo & aElement
const RAttributeArray & aAttributes
TInt aErrorCode

ParseHeaderL(const RTagInfo &, const RAttributeArray &)

IMPORT_C void ParseHeaderL ( const RTagInfo & aElement,
const RAttributeArray & aAttributes
) [protected, virtual]
This method should be overridden by subclasses. Implements functionality to parse SOAP header if one is found during parsing the envelope. Parses all elements found under top <Header> element by using DOM fragment.
Since
Series60 4.0

Parameters

const RTagInfo & aElement
const RAttributeArray & aAttributes The attributes of the new element

Properties()

IMPORT_C MSenProperties * Properties ( ) [virtual]

SetBodyL(const TDesC8 &)

IMPORT_C TPtrC8 SetBodyL ( const TDesC8 & aBody ) [virtual]
Sets body of the envelope.
Since
Series60 4.0

Parameters

const TDesC8 & aBody Body (content) to be set.

SetBodyL(TXmlEngElement)

IMPORT_C TXmlEngElement SetBodyL ( TXmlEngElement aBodyElement ) [virtual]
Sets body of the envelope.
Since
Series60 4.0

Parameters

TXmlEngElement aBodyElement

SetContext(MSenMessageContext *)

IMPORT_C TInt SetContext ( MSenMessageContext * apOwnedContext ) [virtual]

Parameters

MSenMessageContext * apOwnedContext

SetProperties(MSenProperties *)

IMPORT_C TInt SetProperties ( MSenProperties * apOwnedProperties ) [virtual]

Parameters

MSenProperties * apOwnedProperties

SetSoapActionL(const TDesC8 &)

IMPORT_C TPtrC8 SetSoapActionL ( const TDesC8 & aSoapAction ) [virtual]
Sets the SOAP action HTTP header. WSF will use this value while submitting this SOAP envelope request over HTTP/S transport.
Since
Series60 4.0

Parameters

const TDesC8 & aSoapAction the SOAP Action HTTP header to be set. The default value is KSenSoapActionHeaderValueEmpty, which is two double quotation marks - "" - without any character in between. SOAP specification requires double quotation marks, even if action is empty. If a string without double quotation marks is passed, it will be wrapped inside double quotation marks, added in the beginning and at the end of the actual SOAP Action string.

SoapAction()

IMPORT_C TPtrC8 SoapAction ( ) [virtual]
Gets the soap action header.
Since
Series60 4.0

SoapVersion()

IMPORT_C TSOAPVersion SoapVersion ( ) [virtual]

Getter for currently effecitve SOAP version.

TxnId()

IMPORT_C TInt TxnId ( ) [virtual]

Type()

IMPORT_C TClass Type ( ) [virtual]

Member Data Documentation

TDirection iDirection

TDirection iDirection [protected]

TBool iFault

TBool iFault [protected]

TInt iTransactionId

TInt iTransactionId [protected]

CSenFragmentBase * ipBodyFragment

CSenFragmentBase * ipBodyFragment [protected]

CSenFragmentBase * ipHeaderFragment

CSenFragmentBase * ipHeaderFragment [protected]

MSenMessageContext * ipNotOwnedContext

MSenMessageContext * ipNotOwnedContext [protected]

MSenProperties * ipProperties

MSenProperties * ipProperties [protected]

TAny * ipReserved

TAny * ipReserved [protected]

HBufC8 * ipSoapAction

HBufC8 * ipSoapAction [protected]