webservices/wscore/src/senclientsession.cpp
branchRCL_3
changeset 15 32ab7ae9ec94
parent 14 9e96e2676219
child 22 c5fabff9b552
--- a/webservices/wscore/src/senclientsession.cpp	Tue May 11 17:14:12 2010 +0300
+++ b/webservices/wscore/src/senclientsession.cpp	Tue May 25 13:53:20 2010 +0300
@@ -1508,7 +1508,7 @@
                                       const TDesC8& aRequest,
                                       CSenAtomEntry& aAtomEntry)
     {
-	CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL");
+	CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry)");
     CSenParser* pParser = CSenParser::NewLC();
     pParser->EnableFeature(EReportNamespaceMapping);
 	pParser->ParseL(aRequest, aAtomEntry);
@@ -1559,13 +1559,14 @@
         }
 	
     CleanupStack::PopAndDestroy(pParser);
+    CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry) Completed");
     return KErrNone;
     }    
 TInt CSenClientSession::ParseMessageL(TInt aTransactionId,
                                       const TDesC8& aRequest,
                                       CSenSoapEnvelope2& aSoapEnvelope)
     {
-    CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL");
+    CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope)");
     CSenParser* pParser = CSenParser::NewLC();
     pParser->EnableFeature(EReportNamespaceMapping);
 	pParser->ParseL(aRequest, aSoapEnvelope);
@@ -1659,7 +1660,7 @@
             }
         }
     CleanupStack::PopAndDestroy(pParser);
-    
+    CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope) Completed");
     return retVal;
     }
     
@@ -1951,7 +1952,7 @@
                     CleanupStack::PushL( pErrorMsg );
                     }
                 aSenChunk.ChunkHeader().SetContextId(transactionId); // temporary
-                CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId));
+                CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId));
                 }
             else 
                 {
@@ -3747,6 +3748,7 @@
     }
 void CSenClientSession::AddCredentialL( const RMessage2& aMessage )
     {
+    CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL()")));
     TInt retVal(KErrNone);
     CSenChunk* pSenChunk = NULL;
 
@@ -3859,14 +3861,27 @@
                     iManager.AddCredentialL(pIdP, pCredential, retVal);
                     
                   	RWSDescriptionArray aMatches;
-                    	iManager.ServiceDescriptionsL(aMatches,*pSD);
-               	CleanupClosePushL(aMatches);
-
-                    	for(TInt i = 0; i < aMatches.Count(); i++)
-                    	{
-                    		((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential);
-                    	}
-
+                    iManager.ServiceDescriptionsL(aMatches,*pSD);
+               		CleanupClosePushL(aMatches);
+
+                  	for(TInt i = 0; i < aMatches.Count(); i++)
+                  		{
+                      	if(((CSenWebServiceSession*)aMatches[i]) && pCredential)
+                          {
+	                      CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SD Type is = %d"), aMatches[i]->DescriptionClassType()));						  
+                          if( aMatches[i]->HasSuperClass( MSenServiceDescription::EServiceSession ) )
+                          	{
+                            CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Calling AddCredentialObserverL()")));
+                            ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential);
+                            CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Completed AddCredentialObserverL()")));
+                          	}
+                          else
+                          	{
+                          	CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - SD is not the session object !!! ")));
+                          	}	
+                          }
+                  		}
+                  		
                      CleanupStack::PopAndDestroy(&aMatches);
                     
                     CleanupStack::Pop(pCredential);
@@ -3881,6 +3896,7 @@
     CleanupStack::PopAndDestroy(pSenChunk);
         
     aMessage.Complete(retVal);
+    CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() Completed")));
     }
 
 void CSenClientSession::CredentialsL( const RMessage2& aMessage )