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 TBoolHasBody()
IMPORT_C TBoolHasHeader()
IMPORT_C CSenElement &HeaderL()
IMPORT_C TBoolIsFault()
IMPORT_C CSenSoapEnvelope *NewL()
IMPORT_C voidParseL(const TDesC8 &)
IMPORT_C TPtrC8SetBodyL(const TDesC8 &)
IMPORT_C TPtrC8SetSoapActionL(const TDesC8 &)
IMPORT_C TPtrC8SoapAction()
IMPORT_C TPtrC8SoapAction2()
IMPORT_C TSOAPVersionSoapVersion()
Protected Member Functions
CSenSoapEnvelope()
IMPORT_C voidBaseConstructL(TSOAPVersion)
IMPORT_C voidBaseConstructL()
IMPORT_C voidEndElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C voidParseHeaderL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
IMPORT_C voidStartElementL(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 & 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 3.0

Parameters

TSOAPVersion aVersion

BaseConstructL()

IMPORT_C voidBaseConstructL()[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 voidEndElementL(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 & aNsUriThe namespace URI of the new element
const TDesC8 & aLocalNameThe local name of the new element
const TDesC8 & aQNameThe 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 TBoolHasBody()

HasHeader()

IMPORT_C TBoolHasHeader()

HeaderL()

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

IsFault()

IMPORT_C TBoolIsFault()[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 voidParseHeaderL(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 & aNsUriThe namespace URI of the new element
const TDesC8 & aLocalNameThe local name of the new element
const TDesC8 & aQNameThe qualified name of the new element
const RAttributeArray & aAttributesThe attributes of the new element

ParseL(const TDesC8 &)

IMPORT_C voidParseL(const TDesC8 &aXml)[virtual]

Method parses given piece of XML into this SOAP envelope

Parameters

const TDesC8 & aXml

SetBodyL(const TDesC8 &)

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

Parameters

const TDesC8 & aBodyBody (content) to be set.

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

SoapAction2()

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

SoapVersion()

IMPORT_C TSOAPVersionSoapVersion()

Getter for currently effecitve SOAP version.

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

IMPORT_C voidStartElementL(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 & aNsUriThe namespace URI of the new element
const TDesC8 & aLocalNameThe local name of the new element
const TDesC8 & aQNameThe qualified name of the new element
const RAttributeArray & aAttributesThe 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]