CSenSoapEnvelope Class Reference

#include <mw/SenSoapEnvelope.h>

Link against: SenUtils.lib

class CSenSoapEnvelope : public CSenBaseFragment

Inherits from

  • CSenSoapEnvelope
    Protected Attributes
    CSenBaseFragment *ipBodyFragment
    CSenBaseFragment *ipHeaderFragment
    HBufC8 *ipSoapAction
    Public Member Functions
    virtual ~CSenSoapEnvelope()
    virtual IMPORT_C CSenElement &AddHeaderL(CSenElement &)
    virtual IMPORT_C HBufC8 *BodyAsStringL()
    virtual IMPORT_C CSenElement &BodyL()
    virtual IMPORT_C CSenSoapFault *DetachFaultL()
    virtual IMPORT_C CSenSoapFault *FaultL()
    IMPORT_C TBoolHasBody()
    IMPORT_C TBoolHasHeader()
    virtual IMPORT_C CSenElement &HeaderL()
    virtual IMPORT_C TBoolIsFault()
    IMPORT_C CSenSoapEnvelope *NewL()
    virtual IMPORT_C voidParseL(const TDesC8 &)
    virtual IMPORT_C TPtrC8SetBodyL(const TDesC8 &)
    virtual IMPORT_C TPtrC8SetSoapActionL(const TDesC8 &)
    virtual IMPORT_C TPtrC8SoapAction()
    IMPORT_C TPtrC8SoapAction2()
    IMPORT_C TSOAPVersionSoapVersion()
    Protected Member Functions
    CSenSoapEnvelope()
    IMPORT_C voidBaseConstructL(TSOAPVersion)
    IMPORT_C voidBaseConstructL()
    virtual IMPORT_C voidEndElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)
    virtual IMPORT_C voidParseHeaderL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
    virtual IMPORT_C voidStartElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
    Inherited Attributes
    CSenBaseFragment::iState
    CSenBaseFragment::iWs
    CSenBaseFragment::iXmlReader
    CSenBaseFragment::ipElement
    CSenBaseFragment::ipOwner
    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()

    Detailed Description

    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.
    Since
    Series60 3.0

    Member Attribute Documentation

    ipBodyFragment

    CSenBaseFragment *ipBodyFragment[protected]

    ipHeaderFragment

    CSenBaseFragment *ipHeaderFragment[protected]

    ipSoapAction

    HBufC8 *ipSoapAction[protected]

    Constructor & Destructor Documentation

    CSenSoapEnvelope ( )

    CSenSoapEnvelope()[protected]

    Constructor.

    ~CSenSoapEnvelope ( )

    IMPORT_C~CSenSoapEnvelope()[virtual]

    Destructor.

    Member Function Documentation

    AddHeaderL ( CSenElement & )

    IMPORT_C CSenElement &AddHeaderL(CSenElement &aHeaderElement)[virtual]
    Adds an element to the header.
    Since
    Series60 3.0
    ParameterDescription
    aHeaderElementnew child element to be added inside Header element. Ownership is always transferred to CSenSoapEnvelope.

    Returns: added CSenElement

    BaseConstructL ( TSOAPVersion )

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

    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

    Returns: body as a HBufC8 pointer. Ownership is transferred to caller.

    BodyL ( )

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

    Returns: body as CSenElement

    DetachFaultL ( )

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

    Returns: pointer to the soap fault. Caller takes the ownership. NULL if <Fault> element is non-existent.

    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
    ParameterDescription
    aNsUriThe namespace URI of the new element
    aLocalNameThe local name of the new element
    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

    Returns: reference to SOAP fault object owned by this SOAP envelope

    HasBody ( )

    IMPORT_C TBoolHasBody()

    HasHeader ( )

    IMPORT_C TBoolHasHeader()

    HeaderL ( )

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

    Returns: header as CSenElement

    IsFault ( )

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

    Returns: TBool ETrue if there is a fault, EFalse if not.

    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
    ParameterDescription
    aNsUriThe namespace URI of the new element
    aLocalNameThe local name of the new element
    aQNameThe qualified name of the new element
    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

    SetBodyL ( const TDesC8 & )

    IMPORT_C TPtrC8SetBodyL(const TDesC8 &aBody)[virtual]
    Sets body of the envelope.
    Since
    Series60 3.0
    ParameterDescription
    aBodyBody (content) to be set.

    Returns: SOAP body (content) which was just 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
    ParameterDescription
    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.

    Returns: newly set SOAP action header. String might have been extended to include double quotation marks, if those were missing from the argument.

    SoapAction ( )

    IMPORT_C TPtrC8SoapAction()[virtual]
    Gets the soap action header.
    Since
    Series60 3.0

    Returns: current SOAP action header, which is always wrapped inside double quotation marks. If SOAPAction has not been set for this SOAP envelope, function will return zero-length descriptor (KNullDesC8)

    SoapAction2 ( )

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

    Returns: current SOAP action header, which is always wrapped inside double quotation marks. If SOAPAction has not been set for this SOAP envelope, function will return zero-length descriptor (KNullDesC8)

    SoapVersion ( )

    IMPORT_C TSOAPVersionSoapVersion()

    Getter for currently effecitve SOAP version.

    Returns: enumeration which dictates 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
    ParameterDescription
    aNsUriThe namespace URI of the new element
    aLocalNameThe local name of the new element
    aQNameThe qualified name of the new element
    aAttributesThe attributes of the new element