CSenSoapEnvelope Class Reference

class CSenSoapEnvelope : public CSenBaseFragment
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 3.0

Inherits from

Public Member Functions
~CSenSoapEnvelope ()
IMPORT_C CSenElement & AddHeaderL ( CSenElement &)
IMPORT_C HBufC8 * BodyAsStringL ()
IMPORT_C CSenElement & BodyL ()
IMPORT_C CSenSoapFault * DetachFaultL ()
IMPORT_C CSenSoapFault * FaultL ()
IMPORT_C TBool HasBody ()
IMPORT_C TBool HasHeader ()
IMPORT_C CSenElement & HeaderL ()
IMPORT_C TBool IsFault ()
IMPORT_C CSenSoapEnvelope * NewL ()
IMPORT_C void ParseL (const TDesC8 &)
IMPORT_C TPtrC8 SetBodyL (const TDesC8 &)
IMPORT_C TPtrC8 SetSoapActionL (const TDesC8 &)
IMPORT_C TPtrC8 SoapAction ()
IMPORT_C TPtrC8 SoapAction2 ()
IMPORT_C TSOAPVersion SoapVersion ()
Protected Member Functions
CSenSoapEnvelope ()
IMPORT_C void BaseConstructL ( TSOAPVersion )
IMPORT_C void BaseConstructL ()
IMPORT_C void EndElementL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void ParseHeaderL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
IMPORT_C void StartElementL (const TDesC8 &, const TDesC8 &, const TDesC8 &, 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()
CSenBaseFragment::AllocContentSaverL()
CSenBaseFragment::AsElement()
CSenBaseFragment::AsXmlL()
CSenBaseFragment::AsXmlUnicodeL()
CSenBaseFragment::BaseConstructL(CSenXmlReader &)
CSenBaseFragment::BaseConstructL(const CSenElement &)
CSenBaseFragment::BaseConstructL(const TDesC8 &)
CSenBaseFragment::BaseConstructL(const TDesC8 &,const TDesC8 &)
CSenBaseFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenBaseFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenBaseFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,CSenElement &)
CSenBaseFragment::BuildFrom(const TDesC8 &)
CSenBaseFragment::CSenBaseFragment()
CSenBaseFragment::CharactersL(const TDesC8 &,TInt,TInt)
CSenBaseFragment::ConsistsOfL(MSenFragment &)
CSenBaseFragment::Content()
CSenBaseFragment::ContentOf(const TDesC8 &)
CSenBaseFragment::DelegateParsingL(MSenFragment &)
CSenBaseFragment::DelegateParsingL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenBaseFragment::DetachL()
CSenBaseFragment::EnsureNamespace(const TDesC8 &)
CSenBaseFragment::ExtractElement()
CSenBaseFragment::LocalName()const
CSenBaseFragment::Namespace(const TDesC8 &)
CSenBaseFragment::NewL(const CSenElement &)
CSenBaseFragment::NewL(const TDesC8 &)
CSenBaseFragment::NewL(const TDesC8 &,const TDesC8 &)
CSenBaseFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenBaseFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenBaseFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,CSenElement &)
CSenBaseFragment::NsPrefix()const
CSenBaseFragment::NsUri()const
CSenBaseFragment::ParseWithL(CSenXmlReader &)
CSenBaseFragment::Reader()
CSenBaseFragment::ResetContentL()
CSenBaseFragment::ResumeParsingFromL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenBaseFragment::SaveNamespacesL(const RAttributeArray &,TBool)
CSenBaseFragment::SetAttributesL(const RAttributeArray &)
CSenBaseFragment::SetContentOfL(const TDesC8 &,const TDesC8 &)
CSenBaseFragment::SetOwner(MSenFragment &)
CSenBaseFragment::SetReader(CSenXmlReader &)
CSenBaseFragment::StartEntity(TDesC8 &)
CSenBaseFragment::WriteAsXMLToL(RWriteStream &)
CSenBaseFragment::WriteEndElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenBaseFragment::WriteStartElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenBaseFragment::~CSenBaseFragment()
Protected Attributes
CSenBaseFragment * ipBodyFragment
CSenBaseFragment * ipHeaderFragment
HBufC8 * ipSoapAction
Private Attributes
TBool iFault
Inherited Attributes
CSenBaseFragment::iState
CSenBaseFragment::iWs
CSenBaseFragment::iXmlReader
CSenBaseFragment::ipElement
CSenBaseFragment::ipOwner

Constructor & Destructor Documentation

CSenSoapEnvelope()

CSenSoapEnvelope ( ) [protected]

Constructor.

~CSenSoapEnvelope()

IMPORT_C ~CSenSoapEnvelope ( ) [virtual]

Destructor.

Member Functions Documentation

AddHeaderL(CSenElement &)

IMPORT_C CSenElement & AddHeaderL ( CSenElement & aHeaderElement ) [virtual]
Adds an element to the header.
Since
Series60 3.0

Parameters

CSenElement & 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 3.0

Parameters

TSOAPVersion aVersion

BaseConstructL()

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

BodyAsStringL()

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

BodyL()

IMPORT_C CSenElement & BodyL ( ) [virtual]
Getter for envelopes body
Since
Series60 3.0

DetachFaultL()

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

EndElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void EndElementL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName
) [protected, virtual]
Callback function which implement the XML content handler interface. This callback will occur on each end element tag found in the XML document.
Since
Series60 3.0

Parameters

const TDesC8 & aNsUri The namespace URI of the new element
const TDesC8 & aLocalName The local name of the new element
const TDesC8 & aQName The qualified name of the new element

FaultL()

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

HasBody()

IMPORT_C TBool HasBody ( )

HasHeader()

IMPORT_C TBool HasHeader ( )

HeaderL()

IMPORT_C CSenElement & HeaderL ( ) [virtual]
Getter for envelopes header
Since
Series60 3.0

IsFault()

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

NewL()

IMPORT_C CSenSoapEnvelope * NewL ( ) [static]

Two-phased constructor.

ParseHeaderL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

IMPORT_C void ParseHeaderL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
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 3.0

Parameters

const TDesC8 & aNsUri The namespace URI of the new element
const TDesC8 & aLocalName The local name of the new element
const TDesC8 & aQName The qualified name of the new element
const RAttributeArray & aAttributes The attributes of the new element

ParseL(const TDesC8 &)

IMPORT_C void ParseL ( const TDesC8 & aXml ) [virtual]

Method parses given piece of XML into this SOAP envelope

Parameters

const TDesC8 & aXml

SetBodyL(const TDesC8 &)

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

Parameters

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

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 3.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 3.0

SoapAction2()

IMPORT_C TPtrC8 SoapAction2 ( )
Gets the soap action header.
Since
Series60 5.0

SoapVersion()

IMPORT_C TSOAPVersion SoapVersion ( )

Getter for currently effecitve SOAP version.

StartElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

IMPORT_C void StartElementL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
const RAttributeArray & aAttributes
) [protected, virtual]

Callback function which implement the XML content handler interface. This callback will occur on each start element tag found in the XML document. The SOAP envelope recognizes and parses the following elements and their corresponding attributes inside namespace defined in KSenSoapEnvelopeXmlns: KSenSoapEnvelopeName, "Envelope" KSenSoapHeaderName, "Header" KSenSoapBodyName, "Body" KSenSoapFault, "Fault" (only if found inside Body element)

Since
Series60 3.0

Parameters

const TDesC8 & aNsUri The namespace URI of the new element
const TDesC8 & aLocalName The local name of the new element
const TDesC8 & aQName The qualified name of the new element
const RAttributeArray & aAttributes The attributes of the new element

Member Data Documentation

TBool iFault

TBool iFault [private]

CSenBaseFragment * ipBodyFragment

CSenBaseFragment * ipBodyFragment [protected]

CSenBaseFragment * ipHeaderFragment

CSenBaseFragment * ipHeaderFragment [protected]

HBufC8 * ipSoapAction

HBufC8 * ipSoapAction [protected]