1506 } |
1506 } |
1507 TInt CSenClientSession::ParseMessageL(TInt aTransactionId, |
1507 TInt CSenClientSession::ParseMessageL(TInt aTransactionId, |
1508 const TDesC8& aRequest, |
1508 const TDesC8& aRequest, |
1509 CSenAtomEntry& aAtomEntry) |
1509 CSenAtomEntry& aAtomEntry) |
1510 { |
1510 { |
1511 CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL"); |
1511 CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry)"); |
1512 CSenParser* pParser = CSenParser::NewLC(); |
1512 CSenParser* pParser = CSenParser::NewLC(); |
1513 pParser->EnableFeature(EReportNamespaceMapping); |
1513 pParser->EnableFeature(EReportNamespaceMapping); |
1514 pParser->ParseL(aRequest, aAtomEntry); |
1514 pParser->ParseL(aRequest, aAtomEntry); |
1515 |
1515 |
1516 // handle binary containers (BLOBs / attachments) |
1516 // handle binary containers (BLOBs / attachments) |
1557 } |
1557 } |
1558 } |
1558 } |
1559 } |
1559 } |
1560 |
1560 |
1561 CleanupStack::PopAndDestroy(pParser); |
1561 CleanupStack::PopAndDestroy(pParser); |
|
1562 CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry) Completed"); |
1562 return KErrNone; |
1563 return KErrNone; |
1563 } |
1564 } |
1564 TInt CSenClientSession::ParseMessageL(TInt aTransactionId, |
1565 TInt CSenClientSession::ParseMessageL(TInt aTransactionId, |
1565 const TDesC8& aRequest, |
1566 const TDesC8& aRequest, |
1566 CSenSoapEnvelope2& aSoapEnvelope) |
1567 CSenSoapEnvelope2& aSoapEnvelope) |
1567 { |
1568 { |
1568 CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL"); |
1569 CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope)"); |
1569 CSenParser* pParser = CSenParser::NewLC(); |
1570 CSenParser* pParser = CSenParser::NewLC(); |
1570 pParser->EnableFeature(EReportNamespaceMapping); |
1571 pParser->EnableFeature(EReportNamespaceMapping); |
1571 pParser->ParseL(aRequest, aSoapEnvelope); |
1572 pParser->ParseL(aRequest, aSoapEnvelope); |
1572 |
1573 |
1573 |
1574 |
1657 } |
1658 } |
1658 CleanupStack::PopAndDestroy(&elementArray); |
1659 CleanupStack::PopAndDestroy(&elementArray); |
1659 } |
1660 } |
1660 } |
1661 } |
1661 CleanupStack::PopAndDestroy(pParser); |
1662 CleanupStack::PopAndDestroy(pParser); |
1662 |
1663 CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope) Completed"); |
1663 return retVal; |
1664 return retVal; |
1664 } |
1665 } |
1665 |
1666 |
1666 TInt CSenClientSession::SearchMsgChunk( const RMessage2& aMessage, CSenChunk*& aHit ) |
1667 TInt CSenClientSession::SearchMsgChunk( const RMessage2& aMessage, CSenChunk*& aHit ) |
1667 { |
1668 { |
1949 if ( pErrorMsg ) |
1950 if ( pErrorMsg ) |
1950 { |
1951 { |
1951 CleanupStack::PushL( pErrorMsg ); |
1952 CleanupStack::PushL( pErrorMsg ); |
1952 } |
1953 } |
1953 aSenChunk.ChunkHeader().SetContextId(transactionId); // temporary |
1954 aSenChunk.ChunkHeader().SetContextId(transactionId); // temporary |
1954 CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId)); |
1955 CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId)); |
1955 } |
1956 } |
1956 else |
1957 else |
1957 { |
1958 { |
1958 // "Add to ctx" -setter method failed, delete orphan msg: |
1959 // "Add to ctx" -setter method failed, delete orphan msg: |
1959 CleanupStack::PopAndDestroy(pSoapMessage); |
1960 CleanupStack::PopAndDestroy(pSoapMessage); |
3745 delete msg; |
3746 delete msg; |
3746 return err; |
3747 return err; |
3747 } |
3748 } |
3748 void CSenClientSession::AddCredentialL( const RMessage2& aMessage ) |
3749 void CSenClientSession::AddCredentialL( const RMessage2& aMessage ) |
3749 { |
3750 { |
|
3751 CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL()"))); |
3750 TInt retVal(KErrNone); |
3752 TInt retVal(KErrNone); |
3751 CSenChunk* pSenChunk = NULL; |
3753 CSenChunk* pSenChunk = NULL; |
3752 |
3754 |
3753 pSenChunk = CSenChunk::NewLC(KNullDesC); |
3755 pSenChunk = CSenChunk::NewLC(KNullDesC); |
3754 pSenChunk->SetLogger(Log()); |
3756 pSenChunk->SetLogger(Log()); |
3857 |
3859 |
3858 // Following takes the ownership of pIdp and pCredential |
3860 // Following takes the ownership of pIdp and pCredential |
3859 iManager.AddCredentialL(pIdP, pCredential, retVal); |
3861 iManager.AddCredentialL(pIdP, pCredential, retVal); |
3860 |
3862 |
3861 RWSDescriptionArray aMatches; |
3863 RWSDescriptionArray aMatches; |
3862 iManager.ServiceDescriptionsL(aMatches,*pSD); |
3864 iManager.ServiceDescriptionsL(aMatches,*pSD); |
3863 CleanupClosePushL(aMatches); |
3865 CleanupClosePushL(aMatches); |
3864 |
3866 |
3865 for(TInt i = 0; i < aMatches.Count(); i++) |
3867 for(TInt i = 0; i < aMatches.Count(); i++) |
3866 { |
3868 { |
3867 ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential); |
3869 if(((CSenWebServiceSession*)aMatches[i]) && pCredential) |
3868 } |
3870 { |
3869 |
3871 CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SD Type is = %d"), aMatches[i]->DescriptionClassType())); |
|
3872 if( aMatches[i]->HasSuperClass( MSenServiceDescription::EServiceSession ) ) |
|
3873 { |
|
3874 CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Calling AddCredentialObserverL()"))); |
|
3875 ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential); |
|
3876 CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Completed AddCredentialObserverL()"))); |
|
3877 } |
|
3878 else |
|
3879 { |
|
3880 CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - SD is not the session object !!! "))); |
|
3881 } |
|
3882 } |
|
3883 } |
|
3884 |
3870 CleanupStack::PopAndDestroy(&aMatches); |
3885 CleanupStack::PopAndDestroy(&aMatches); |
3871 |
3886 |
3872 CleanupStack::Pop(pCredential); |
3887 CleanupStack::Pop(pCredential); |
3873 CleanupStack::Pop(pIdP); |
3888 CleanupStack::Pop(pIdP); |
3874 |
3889 |
3879 } |
3894 } |
3880 |
3895 |
3881 CleanupStack::PopAndDestroy(pSenChunk); |
3896 CleanupStack::PopAndDestroy(pSenChunk); |
3882 |
3897 |
3883 aMessage.Complete(retVal); |
3898 aMessage.Complete(retVal); |
|
3899 CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() Completed"))); |
3884 } |
3900 } |
3885 |
3901 |
3886 void CSenClientSession::CredentialsL( const RMessage2& aMessage ) |
3902 void CSenClientSession::CredentialsL( const RMessage2& aMessage ) |
3887 { |
3903 { |
3888 _LIT8(KNoProperties, "-"); |
3904 _LIT8(KNoProperties, "-"); |