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 TXmlEngElementAddHeaderL(TXmlEngElement)
IMPORT_C HBufC8 *BodyAsStringL()
IMPORT_C TXmlEngElementBodyL()
IMPORT_C MSenMessage *CloneL()
IMPORT_C MSenMessageContext *Context()
IMPORT_C CSenSoapFault2 *DetachFaultL()
IMPORT_C TDirectionDirection()
IMPORT_C CSenSoapFault2 *FaultL()
IMPORT_C TBoolHasBody()
IMPORT_C TBoolHasHeader()
IMPORT_C TXmlEngElementHeaderL()
IMPORT_C TBoolIsFault()
IMPORT_C TBoolIsSafeToCast(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 TPtrC8SetBodyL(const TDesC8 &)
IMPORT_C TXmlEngElementSetBodyL(TXmlEngElement)
IMPORT_C TIntSetContext(MSenMessageContext *)
IMPORT_C TIntSetProperties(MSenProperties *)
IMPORT_C TPtrC8SetSoapActionL(const TDesC8 &)
IMPORT_C TPtrC8SoapAction()
IMPORT_C TSOAPVersionSoapVersion()
IMPORT_C TIntTxnId()
IMPORT_C TClassType()
Protected Member Functions
CSenSoapEnvelope2()
IMPORT_C voidBaseConstructL(TSOAPVersion)
IMPORT_C voidBaseConstructL()
IMPORT_C voidBaseConstructL(MSenMessageContext &)
IMPORT_C voidBaseConstructL(MSenMessageContext &, TSOAPVersion)
IMPORT_C voidBaseConstructL(CSenSoapEnvelope2 &)
IMPORT_C CSenFragmentBase *CreateBodyFragmentL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, TXmlEngElement &, RSenDocument &)
IMPORT_C voidOnEndElementL(const RTagInfo &, TInt)
IMPORT_C voidOnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)
IMPORT_C voidParseHeaderL(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
TDirectioniDirection
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 TXmlEngElementAddHeaderL(TXmlEngElementaHeaderElement)[virtual]
Adds an element to the header.
Since
Series60 4.0

Parameters

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

BaseConstructL(TSOAPVersion)

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

Parameters

TSOAPVersion aVersion

BaseConstructL()

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

BaseConstructL(MSenMessageContext &)

IMPORT_C voidBaseConstructL(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 voidBaseConstructL(MSenMessageContext &aMessage,
TSOAPVersionaVersion
)[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 voidBaseConstructL(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 TXmlEngElementBodyL()[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 TDirectionDirection()[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 TBoolHasBody()

HasHeader()

IMPORT_C TBoolHasHeader()

HeaderL()

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

IsFault()

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

IsSafeToCast(TClass)

IMPORT_C TBoolIsSafeToCast(TClassaType)[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 voidOnEndElementL(const RTagInfo &aElement,
TIntaErrorCode
)[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 voidOnStartElementL(const RTagInfo &aElement,
const RAttributeArray &aAttributes,
TIntaErrorCode
)[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 voidParseHeaderL(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 & aAttributesThe attributes of the new element

Properties()

IMPORT_C MSenProperties *Properties()[virtual]

SetBodyL(const TDesC8 &)

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

Parameters

const TDesC8 & aBodyBody (content) to be set.

SetBodyL(TXmlEngElement)

IMPORT_C TXmlEngElementSetBodyL(TXmlEngElementaBodyElement)[virtual]
Sets body of the envelope.
Since
Series60 4.0

Parameters

TXmlEngElement aBodyElement

SetContext(MSenMessageContext *)

IMPORT_C TIntSetContext(MSenMessageContext *apOwnedContext)[virtual]

Parameters

MSenMessageContext * apOwnedContext

SetProperties(MSenProperties *)

IMPORT_C TIntSetProperties(MSenProperties *apOwnedProperties)[virtual]

Parameters

MSenProperties * apOwnedProperties

SetSoapActionL(const TDesC8 &)

IMPORT_C TPtrC8SetSoapActionL(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 & aSoapActionthe 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 TPtrC8SoapAction()[virtual]
Gets the soap action header.
Since
Series60 4.0

SoapVersion()

IMPORT_C TSOAPVersionSoapVersion()[virtual]

Getter for currently effecitve SOAP version.

TxnId()

IMPORT_C TIntTxnId()[virtual]

Type()

IMPORT_C TClassType()[virtual]

Member Data Documentation

TDirection iDirection

TDirectioniDirection[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]