CSenSoapEnvelope2 Class Reference

#include <mw/SenSoapEnvelope2.h>

Link against: SenUtils.lib

class CSenSoapEnvelope2 : public CSenFragmentBase

Inherits from

  • CSenSoapEnvelope2
    Protected Attributes
    TDirectioniDirection
    TBool iFault
    TInt iTransactionId
    CSenFragmentBase *ipBodyFragment
    CSenFragmentBase *ipHeaderFragment
    MSenMessageContext *ipNotOwnedContext
    MSenProperties *ipProperties
    TAny *ipReserved
    HBufC8 *ipSoapAction
    Public Member Functions
    virtual ~CSenSoapEnvelope2()
    virtual IMPORT_C TXmlEngElementAddHeaderL(TXmlEngElement)
    virtual IMPORT_C HBufC8 *BodyAsStringL()
    virtual IMPORT_C TXmlEngElementBodyL()
    virtual IMPORT_C MSenMessage *CloneL()
    virtual IMPORT_C MSenMessageContext *Context()
    virtual IMPORT_C CSenSoapFault2 *DetachFaultL()
    virtual IMPORT_C TDirectionDirection()
    virtual IMPORT_C CSenSoapFault2 *FaultL()
    IMPORT_C TBoolHasBody()
    IMPORT_C TBoolHasHeader()
    virtual IMPORT_C TXmlEngElementHeaderL()
    virtual IMPORT_C TBoolIsFault()
    virtual 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 &)
    virtual IMPORT_C MSenProperties *Properties()
    virtual IMPORT_C TPtrC8SetBodyL(const TDesC8 &)
    virtual IMPORT_C TXmlEngElementSetBodyL(TXmlEngElement)
    virtual IMPORT_C TIntSetContext(MSenMessageContext *)
    virtual IMPORT_C TIntSetProperties(MSenProperties *)
    virtual IMPORT_C TPtrC8SetSoapActionL(const TDesC8 &)
    virtual IMPORT_C TPtrC8SoapAction()
    virtual IMPORT_C TSOAPVersionSoapVersion()
    virtual IMPORT_C TIntTxnId()
    virtual 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 &)
    virtual IMPORT_C CSenFragmentBase *CreateBodyFragmentL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, TXmlEngElement &, RSenDocument &)
    virtual IMPORT_C voidOnEndElementL(const RTagInfo &, TInt)
    virtual IMPORT_C voidOnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)
    virtual IMPORT_C voidParseHeaderL(const RTagInfo &, const RAttributeArray &)
    Inherited Attributes
    CSenFragmentBase::iDocument
    CSenFragmentBase::iElement
    CSenFragmentBase::iState
    CSenFragmentBase::ipContentBuf
    CSenFragmentBase::ipContentWriteStream
    CSenFragmentBase::ipDelegate
    CSenFragmentBase::ipNamespaceArray
    CSenFragmentBase::ipOwner
    CSenFragmentBase::ipParser
    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()

    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 4.0

    Member Attribute Documentation

    iDirection

    TDirectioniDirection[protected]

    iFault

    TBool iFault[protected]

    iTransactionId

    TInt iTransactionId[protected]

    ipBodyFragment

    CSenFragmentBase *ipBodyFragment[protected]

    ipHeaderFragment

    CSenFragmentBase *ipHeaderFragment[protected]

    ipNotOwnedContext

    MSenMessageContext *ipNotOwnedContext[protected]

    ipProperties

    MSenProperties *ipProperties[protected]

    ipReserved

    TAny *ipReserved[protected]

    ipSoapAction

    HBufC8 *ipSoapAction[protected]

    Constructor & Destructor Documentation

    CSenSoapEnvelope2 ( )

    CSenSoapEnvelope2()[protected]

    Constructor.

    ~CSenSoapEnvelope2 ( )

    IMPORT_C~CSenSoapEnvelope2()[virtual]

    Destructor.

    Member Function Documentation

    AddHeaderL ( TXmlEngElement )

    IMPORT_C TXmlEngElementAddHeaderL(TXmlEngElementaHeaderElement)[virtual]
    Adds an element to the header.
    Since
    Series60 4.0
    ParameterDescription
    aHeaderElementnew child element to be added inside Header element. Ownership is always transferred to CSenSoapEnvelope.

    Returns: added TXmlEngElement

    BaseConstructL ( TSOAPVersion )

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

    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

    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

    BaseConstructL ( CSenSoapEnvelope2 & )

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

    BodyAsStringL ( )

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

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

    BodyL ( )

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

    Returns: body as TXmlEngElement

    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]

    DetachFaultL ( )

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

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

    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

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

    HasBody ( )

    IMPORT_C TBoolHasBody()

    HasHeader ( )

    IMPORT_C TBoolHasHeader()

    HeaderL ( )

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

    Returns: header as TXmlEngElement

    IsFault ( )

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

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

    IsSafeToCast ( TClass )

    IMPORT_C TBoolIsSafeToCast(TClassaType)[virtual]

    NewL ( )

    IMPORT_C CSenSoapEnvelope2 *NewL()[static]

    Two-phased constructor.

    NewL ( MSenMessageContext & )

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

    Two-phased constructor.

    NewL ( CSenSoapEnvelope2 & )

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

    Two-phased copy constructor.

    NewLC ( )

    IMPORT_C CSenSoapEnvelope2 *NewLC()[static]

    Two-phased constructor.

    NewLC ( MSenMessageContext & )

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

    Two-phased constructor.

    NewLC ( CSenSoapEnvelope2 & )

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

    Two-phased copy constructor.

    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

    See also: MContentHandler

    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

    See also: MContentHandler

    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
    ParameterDescription
    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
    ParameterDescription
    aBodyBody (content) to be set.

    Returns: SOAP body (content) which was just set

    SetBodyL ( TXmlEngElement )

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

    Returns: SOAP body (content) which was just set

    SetContext ( MSenMessageContext * )

    IMPORT_C TIntSetContext(MSenMessageContext *apOwnedContext)[virtual]

    SetProperties ( MSenProperties * )

    IMPORT_C TIntSetProperties(MSenProperties *apOwnedProperties)[virtual]

    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
    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 4.0

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

    SoapVersion ( )

    IMPORT_C TSOAPVersionSoapVersion()[virtual]

    Getter for currently effecitve SOAP version.

    Returns: enumeration which dictates SOAP version.

    TxnId ( )

    IMPORT_C TIntTxnId()[virtual]

    Type ( )

    IMPORT_C TClassType()[virtual]