Revision: 201014 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 17:07:28 +0300
branchRCL_3
changeset 11 ab1e518f96da
parent 10 bf3935de63a1
child 12 48e9d43c1d7f
Revision: 201014 Kit: 201015
webservices/wsconnection/src/rsenserviceconnection.cpp
webservices/wsconnection/src/senregistrationtimer.cpp
webservices/wsconnection/src/senserviceconnectionimpl.cpp
webservices/wsconnection/src/senservicedispatcher.cpp
webservices/wscore/group/sencore.mmp
webservices/wscore/inc/sencoreservicemanager.h
webservices/wscore/src/senclientsession.cpp
webservices/wscore/src/sencoreservicemanager.cpp
webservices/wsframework/group/senframework.mmp
webservices/wsframework/inc/senmtomutils.h
webservices/wshostletconnection/src/senhostletconnectionimpl.cpp
webservices/wshostletconnection/src/senregistrationtimer.cpp
webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp
webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp
webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp
webservices/wsmanager/src/senservicemanagerimpl.cpp
webservices/wsnotifierplugins/group/sennotifierplugin.mmp
webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp
webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp
webservices/wsutils/group/senutils.mmp
webservices/wsutils/src/sencryptoutils.cpp
--- a/webservices/wsconnection/src/rsenserviceconnection.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsconnection/src/rsenserviceconnection.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -103,7 +103,8 @@
 
 void CSenConnAgentSync::Start()
 	{
-	SetActive();
+	if(!IsActive())
+		SetActive();
 	}
 
 RSenServiceConnection::RSenServiceConnection(RFileLogger* aLog)
@@ -498,7 +499,8 @@
         iFirst = resHandler;
 
         CActiveScheduler::Add(resHandler);
-        resHandler->SetActive();
+        if(!resHandler->IsActive())
+        	resHandler->SetActive();
         resHandler->iStatus = KRequestPending;
 
         TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid);
--- a/webservices/wsconnection/src/senregistrationtimer.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsconnection/src/senregistrationtimer.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -74,7 +74,8 @@
 	if (!IsActive())
         {
         iTimer.After( iStatus, interval );
-        SetActive();
+        if(!IsActive())
+        	SetActive();
         }
     }
 
--- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -192,7 +192,7 @@
 
 void CSenServiceConnectionImpl::ConstructL(MSenServiceDescription& aSD)
     {
-
+	TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD)");
     CSenElement& sdAsElement = ((CSenXmlServiceDescription&)aSD).AsElement();
 
     // Check if this is an internal service connection:
@@ -247,7 +247,8 @@
 #ifndef RD_SEN_SC_PROXY_ENABLED_BY_DEFAULT
     ConnectL(); 
 // #else // ConnectL occurs on  "proxy" / factory  -level
-#endif    
+#endif
+	TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD) Completed");
     }
 
 
@@ -343,12 +344,14 @@
 
 void CSenServiceConnectionImpl::SetConsumer( MSenServiceConsumer& aConsumer, MSenExtendedConsumerInterface* apExtConsumer )
     {
+    TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::SetConsumer");
     iObserver = &aConsumer;
     ipExtendedConsumerInterface = apExtConsumer;
     }
    
 void CSenServiceConnectionImpl::Consumer( MSenServiceConsumer*& aConsumer, MSenExtendedConsumerInterface*& apExtConsumer )
     {
+    TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::Consumer");
     aConsumer = iObserver;
     apExtConsumer = ipExtendedConsumerInterface;
     }   
@@ -451,6 +454,7 @@
         {
         iChunkMap->Reset();
         delete iChunkMap;
+        iChunkMap = NULL;
         }
 
     delete iInBuf;
@@ -478,6 +482,7 @@
 
 TPtrC CSenServiceConnectionImpl::SessionID()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SessionID()")));
     if(ipSessionId)
         {
         return *ipSessionId;
@@ -644,6 +649,7 @@
 TInt CSenServiceConnectionImpl::ResponseFromChunk(CSenChunk& aClientOp,
                                                   HBufC8*& aResponseTo)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk()")));
     TInt leaveCode(KErrNone); // handle OOM case:
     // Read response message, SOAP fault OR error
     TPtrC8 response;
@@ -659,7 +665,7 @@
         // OOM occured
         retVal = leaveCode;
         }
-        
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk() Completed")));
     return retVal;
     }
 
@@ -875,7 +881,7 @@
         }
     else if (!IsActive())
         {
-        SetActive();
+       	SetActive();
         iStatus = KRequestPending;
         }
 	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::CheckConnection Completed")));
@@ -1301,11 +1307,12 @@
             TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("MSenServiceConsumer::HandleErrorL leaved: %d"), leaveCode ));
             }
         }
-		        
+		TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::InitializeL() Completed")));
     }
 
 TPtrC CSenServiceConnectionImpl::NextChunkName()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName()")));
     if(ipChunkName)
         {
         iChunkNameNumber++;
@@ -1332,6 +1339,7 @@
         }
     else
         {
+        TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName() returns KNullDesC()")));
         return KNullDesC();
         }  
     }
@@ -1934,6 +1942,7 @@
             break ;
             }
         }
+    TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::HandleMessageFromChildAOL Completed");
     }
 
 // Helper function, which delivers response to Service Consumer 
@@ -1976,7 +1985,7 @@
     if( statusCode == KErrNone )
         {
         // STANDARD, "OK" RESPONSE
-        TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- response, (%d bytes):"), response.Length()));
+        TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- response, (%d bytes):"), response.Length()));
         TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response));
         TRAPD( err, iObserver->HandleMessageL( response ); )
         if(err)
@@ -1991,8 +2000,8 @@
             TInt error = statusCode;   
                 
             // SOAP FAULT
-            TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length()));
-            TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response));
+            TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length()));
+            TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,(response));
 
             if ( error == KErrSenSoapFault && !iInitialized ) // China DC
                 {
@@ -2024,6 +2033,7 @@
         CleanupStack::PopAndDestroy( pMessage );
         }
     iTransactionIdKnown = EFalse;
+    TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::DeliverResponseL Completed");
     }
 
 void CSenServiceConnectionImpl::DoCancel()
@@ -2290,6 +2300,7 @@
 
 const TDesC8& CSenServiceConnectionImpl::LocalName() const
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::LocalName()")));
     if(iFragment)
         return iFragment->LocalName();
     else
@@ -2298,6 +2309,7 @@
 
 const TDesC8& CSenServiceConnectionImpl::NsUri() const
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsUri()")));
     if(iFragment)
         return iFragment->NsUri();
     else
@@ -2306,6 +2318,7 @@
 
 const TDesC8& CSenServiceConnectionImpl::NsPrefix() const
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsPrefix()")));
     if(iFragment)
         return iFragment->NsPrefix();
     else
@@ -2314,6 +2327,7 @@
 
 void CSenServiceConnectionImpl::WriteAsXMLToL(RWriteStream& aWriteStream)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::WriteAsXMLToL()")));
     if(iFragment)
         {
         iFragment->WriteAsXMLToL(aWriteStream);
@@ -2322,6 +2336,7 @@
 
 HBufC* CSenServiceConnectionImpl::AsXmlUnicodeL()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlUnicodeL()")));
     if(iFragment)
         {
         return iFragment->AsXmlUnicodeL();
@@ -2334,6 +2349,7 @@
 
 HBufC8* CSenServiceConnectionImpl::AsXmlL()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlL()")));
     if(iFragment)
         {
         return iFragment->AsXmlL();
@@ -2384,6 +2400,7 @@
 
 TBool CSenServiceConnectionImpl::ConsistsOfL(MSenFragment& aCandidate)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ConsistsOfL()")));
     if (iFragment)
         {
         return iFragment->ConsistsOfL(aCandidate);
@@ -2424,6 +2441,7 @@
 
 TInt CSenServiceConnectionImpl::TxnId()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::TxnId()")));
     if( iTransactionIdKnown )
         {
         if( iTxnId>KErrNone )
@@ -2512,6 +2530,7 @@
     	TRAP(retVal, DeliverResponseL(KErrSenCancelled,NULL));
     	if( retVal != KErrNone)
     		{
+    		TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), retVal ));
     		return retVal;
     		}
     	}  
@@ -2520,6 +2539,7 @@
         {
         iConnection.CancelRequest(aTransactionID);
         }
+    TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), KErrNone ));
     return KErrNone;
     }
         
@@ -2555,6 +2575,7 @@
 
 RChunkMap& CSenServiceConnectionImpl::ChunkMapL()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ChunkMapL()")));
     if(!iChunkMap)
         {
         iChunkMap = new (ELeave) RChunkMap(ETrue, ETrue);
@@ -2564,6 +2585,7 @@
     
 RPointerArray<CSenAsyncOperation>& CSenServiceConnectionImpl::AsyncOpsArrayL() //codescannerwarnings
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsyncOpsArrayL()")));
     if(!iAsyncOpsArray)
         {
         iAsyncOpsArray = new (ELeave) RPointerArray<CSenAsyncOperation>;
@@ -2834,6 +2856,7 @@
                                                         CSenSoapEnvelope& aMessage,
                                                         const TDesC8& aProperties)	//codescannerwarnings
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AssignPropertiesToChunkL()")));
     TInt retVal(KErrNone);
     
     if ( aMessage.SoapAction2().Length() > 0 )
@@ -2870,7 +2893,7 @@
             }
         delete pSoapMsg;
         }    
-    
+		TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignPropertiesToChunkL returns [%d]" ), retVal ));
     return retVal;
     }
     
@@ -2999,7 +3022,7 @@
     CleanupStack::PopAndDestroy(pSerializer);
     CleanupStack::PopAndDestroy(&buffer);
     CleanupStack::PopAndDestroy(pPropsAsXml);
-    
+    TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignMessageToChunkL returns [%d]" ), retVal ));
     return retVal;
     }
     
@@ -3007,6 +3030,7 @@
 // plus multiple BLOBs PER ONE MESSAGE AND multiple simultaneous transfers
 TInt CSenServiceConnectionImpl::MoveBinaryContainersToServer( CSenConnectionChunk& aOperation, RArray<TXmlEngDataContainer>& aList )
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveBinaryContainersToServer()")));
     TInt retVal(KErrNone);
     
     TPtrC8 cid8;
@@ -3101,12 +3125,14 @@
                     }
     			}
     		}
-        }
+     }
+    TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::MoveBinaryContainersToServer returns [%d]" ), retVal ));
     return retVal;
     }
     
 TInt CSenServiceConnectionImpl::MoveFileChunkHandleToServer(CSenConnectionChunk& aOperation)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer()")));
     TInt retVal(KErrNone);
     retVal = iConnection.SendFileHandle(aOperation,iSharedFileHandle);
     return retVal;
@@ -3171,6 +3197,7 @@
     
 TInt CSenServiceConnectionImpl::SendL( MSenMessage& aMessage )
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer(aMessage)")));
     if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2 ) )
         {
         CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage;
@@ -3270,6 +3297,7 @@
 TInt CSenServiceConnectionImpl::SubmitL( MSenMessage& aMessage,
                                          CSenSoapEnvelope2*& aResponseTo )
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SubmitL(aMessage, aResponseTo)")));
     if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2) )
         {
         CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage;
@@ -3441,6 +3469,7 @@
 
 void CSenServiceConnectionImpl::MigrateToPrefferedCarrierL(TBool &aUserChoice)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL()")));
     if (iMobiltyObserver)
         {
         User::LeaveIfError(iConnection.MigrateToPrefferedCarrierL(aUserChoice));    	
@@ -3449,10 +3478,12 @@
 	    {
         User::Leave(KErrNotFound);
 	    }	 
+	  TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL() Completed")));
     }
 
 void CSenServiceConnectionImpl::NewCarrierAcceptedL(TBool &aUserChoice)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL()")));
     if (iMobiltyObserver)
         {
         User::LeaveIfError(iConnection.NewCarrierAcceptedL(aUserChoice));    	
@@ -3460,7 +3491,8 @@
 	else
 	    {
         User::Leave(KErrNotFound);
-	    }	 
+	    }
+	  TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL() Completed")));  	 
     }
 #endif
 
@@ -3469,6 +3501,7 @@
         TBool aIncoming, const TDesC8& aMessage, const TDesC8& aCid,
         TInt aProgress)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SendProgressToHostlet()")));
     TBool isSoap = (aMessage != KNullDesC8);
     TPtrC8 ptr;
     if (isSoap)
@@ -3501,6 +3534,7 @@
         TLSLOG_FORMAT(( iTlsLogStatusChannel, KSenServiceConnectionStatusLogLevel, _L("Fatal(!) -- CSenServiceConnectionImpl::DeliverStatus(): MSenServiceConsumer::SetStatus - leaves with %d"), leaveCode));
         leaveCode = KErrNone;
         }
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DeliverStatus() Completed")));
     }
     
     
@@ -3565,7 +3599,8 @@
     }
 
 TInt CSenServiceConnectionImpl::SearchIdentityProviderL( CSenIdentityProvider*& apIdentityProvider, const TDesC8& aProviderId )
-		{
+			{
+			TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SearchIdentityProviderL()")));
 	    TInt retVal(KErrNone);
 	    
 	    CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkName());
@@ -3604,7 +3639,7 @@
 	            }
 	        }
 	    CleanupStack::PopAndDestroy(pSenChunk);
-
+			TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::SearchIdentityProviderL returns [%d]" ), retVal ));
 	    return retVal; 
 		}
  
@@ -3655,6 +3690,7 @@
 
 TBool CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()")));
 #ifdef __ENABLE_ALR__
 	if((ipAuthProvider || iFilesObserver || iMobiltyObserver || ipCoBrandingObserver) && iConnectionAgentCallbackInitialized)
 #else
@@ -3755,6 +3791,7 @@
 void CSenServiceConnectionImpl::DataTrafficDetails(TSenDataTrafficDetails& aDetails,
 												   TSenDataTrafficOperations& aOperations) 
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DataTrafficDetails()")));
 	iConnection.DataTrafficDetails(aDetails, aOperations);
 	}	
 	
@@ -3783,6 +3820,7 @@
 
 TInt CSenServiceConnectionImpl::PendingTrasanctionsCount()
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::PendingTrasanctionsCount()")));
 	return iAsyncOpsArray->Count();
 	}										
 
@@ -3823,7 +3861,8 @@
                      sizeof(TInt),
                      sizeof(TInt));
                      
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
 #ifdef EKA2
     iActive->AsyncOpsArrayL().AppendL(this);	//codescannerwarnings
@@ -3919,7 +3958,8 @@
     CActiveScheduler::Add(this);
     // Initial subscription
     iConnectionStatusProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
     }
 
@@ -3943,7 +3983,8 @@
         
     TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenConnectionStatusObserver::RunL" );
     iConnectionStatusProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
    
     TInt propertyValue(KErrNotFound);
@@ -4021,7 +4062,8 @@
     CActiveScheduler::Add(this);
     // Initial subscription
     iFileProgressProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iStatus = KRequestPending;
     }
 
@@ -4043,7 +4085,8 @@
     {
     // Resubscribe before processing new value to prevent missing updates(!):
 	iFileProgressProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iStatus = KRequestPending;
 
     TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" );
--- a/webservices/wsconnection/src/senservicedispatcher.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsconnection/src/senservicedispatcher.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -156,7 +156,9 @@
     
     for(;;)
         {
+        TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL Before User::WaitForAnyRequest()");
         User::WaitForAnyRequest();
+        TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL After User::WaitForAnyRequest()");
 
         //If iDispatchMessages = FALSE then stop dispacthing messages.
         //Is called from the destructor and thread will end in cleaner way
--- a/webservices/wscore/group/sencore.mmp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wscore/group/sencore.mmp	Wed Apr 14 17:07:28 2010 +0300
@@ -85,7 +85,6 @@
 SYSTEMINCLUDE /epoc32/include/libc
 
 MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
 
 LIBRARY ecom.lib
 LIBRARY euser.lib 
@@ -93,7 +92,7 @@
 LIBRARY estor.lib 
 LIBRARY flogger.lib
 LIBRARY bafl.lib
-LIBRARY imut.lib        // imcvcodc.h - base64 encode and decode
+LIBRARY inetprotutil.lib // for base64 encoding
 LIBRARY sysutil.lib     // sysutil.h
 LIBRARY etel.lib etelmm.lib // IMSI retrieving
 #ifdef __ENABLE_ALR__
--- a/webservices/wscore/inc/sencoreservicemanager.h	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wscore/inc/sencoreservicemanager.h	Wed Apr 14 17:07:28 2010 +0300
@@ -32,10 +32,9 @@
 #include <e32base.h>
 #include <badesca.h>
 #include <f32file.h>
-#include <imcvcodc.h> // for base64 codec
 #include <flogger.h>
 #include <etelmm.h>
-
+#include <tconvbase64.h>
 #include <SenXmlReader.h>
 
 #include "senservicemanagerdefines.h"
@@ -412,7 +411,7 @@
         // New functions
         
         MSIF* Framework(const TDesC8& aFrameworkID);
-        TImCodecB64& Base64Codec();
+        TBase64& Base64Codec();
 
 //        RPointerArray<HBufC8>& ActiveHostletEndpointsL();
 
@@ -436,7 +435,7 @@
         TInt                     iConnectionCount;
         CSenGuidGen*             iGuidGenerator;            // owned
         CSenXmlReader*           iReader;                   // owned
-        TImCodecB64 iBase64Codec; 
+        TBase64 iBase64Codec; 
         RStringPool iStringPool;                            // owned
 //        RPointerArray<HBufC8>*   ipActiveHostletEndpoints;  // owned
 
--- a/webservices/wscore/src/senclientsession.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wscore/src/senclientsession.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -168,7 +168,8 @@
     iFirst = resHandler;
 
     CActiveScheduler::Add(resHandler);
-    resHandler->SetActive();
+    if(!resHandler->IsActive())
+    	resHandler->SetActive();
     resHandler->iStatus = KRequestPending;
 
     TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid);
@@ -361,7 +362,8 @@
 
 void CSenConnAgentSync::Start()
 	{
-	SetActive();
+	if(!IsActive())
+		SetActive();
 	}
 
 CSenClientSession* CSenClientSession::NewL(MSenServiceManager& aServer, CSenServerContext& aCtx)
@@ -4248,6 +4250,7 @@
             TInt cancelledTxnId(*pTxnId);
             txnIds.Remove(i);
             delete pTxnId;
+            pTxnId = NULL;
             CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- Now processing txn with id %d"), cancelledTxnId));
 
 
--- a/webservices/wscore/src/sencoreservicemanager.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wscore/src/sencoreservicemanager.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -973,9 +973,8 @@
     }
 
 // private getter, which always initializes the base64codec
-TImCodecB64& CSenCoreServiceManager::Base64Codec()
+TBase64& CSenCoreServiceManager::Base64Codec()
     {
-    iBase64Codec.Initialise();
     return iBase64Codec;
     }
 
--- a/webservices/wsframework/group/senframework.mmp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsframework/group/senframework.mmp	Wed Apr 14 17:07:28 2010 +0300
@@ -88,7 +88,6 @@
 SYSTEMINCLUDE   ../../inc
 SYSTEMINCLUDE /epoc32/include/libc
 MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
 
 // System libs
 LIBRARY euser.lib 
@@ -96,7 +95,8 @@
 LIBRARY estor.lib 
 LIBRARY ecom.lib
 LIBRARY efsrv.lib
-LIBRARY imut.lib 
+LIBRARY	inetprotutil.lib // for base64 encoding
+
 
 #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
 // Serene libs
--- a/webservices/wsframework/inc/senmtomutils.h	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsframework/inc/senmtomutils.h	Wed Apr 14 17:07:28 2010 +0300
@@ -22,7 +22,7 @@
 #define SEN_MTOM_UTILS_H
 
 #include <e32math.h>
-#include <imcvcodc.h>
+
 
 #include <SenSoapEnvelope2.h>
 #include <RSenDocument.h>
--- a/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -763,8 +763,8 @@
     iTxnIdBuffer.Set(reinterpret_cast<TUint8*>(&iTxnId),
                      sizeof(TInt),
                      sizeof(TInt));
-                     
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 #ifdef EKA2
     iActive->AsyncOpsArrayL().AppendL(this);
 #else
@@ -939,7 +939,8 @@
     CActiveScheduler::Add(this);
     // Initial subscription
     iFileProgressProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iStatus = KRequestPending;
     }
 
@@ -961,7 +962,8 @@
     {
     // Resubscribe before processing new value to prevent missing updates(!):
 	iFileProgressProperty.Subscribe( iStatus );
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iStatus = KRequestPending;
 
     TLSLOG_L( KSenHostletConnectionLogChannelBase + iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" );
--- a/webservices/wshostletconnection/src/senregistrationtimer.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wshostletconnection/src/senregistrationtimer.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -74,7 +74,8 @@
 	if (!IsActive())
         {
         iTimer.After( iStatus, interval );
-        SetActive();
+        if(!IsActive())
+        	SetActive();
         }
     }
 
--- a/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -163,10 +163,10 @@
 
 TInt CSenTxnState::Cancel()
     {
-        if (iTimeOut)
-        iTimeOut->Cancel();
-        ipTransaction.Cancel();
-        return KErrNone;
+    if (iTimeOut)
+    	iTimeOut->Cancel();
+    ipTransaction.Cancel();
+    return KErrNone;
     }
 void CSenTxnState::SetSession(RHTTPSession aSession) 
     {
--- a/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -83,7 +83,8 @@
         TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"..calling IdentityManager.ReloadSenSecurityMechanismsL");
         iOwner.ReloadSenSecurityMechanismsL();
         iEcomSession.NotifyOnChange(iStatus);
-        SetActive();
+        if(!IsActive())
+        	SetActive();
         }
     }
 TInt CSenSenSecurityMechanismObserver::RunError(TInt /* aError */)
@@ -100,7 +101,8 @@
 
 void CSenSenSecurityMechanismObserver::Start()
     {
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iEcomSession.NotifyOnChange(iStatus);
     }
 
--- a/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -249,7 +249,8 @@
         if(!pRequest->IsActive())
             {
             TLSLOG_L(KSenLocalTransportLogChannelBase,KNormalLogLevel,"- Activating request / async call to the provider.");
-            pRequest->SetActive();
+            if(!pRequest->IsActive())
+            	pRequest->SetActive();
             }
         pRequest->iStatus = KRequestPending;
         TRequestStatus* status = &pRequest->iStatus;
@@ -426,7 +427,8 @@
         }
 
     iStatus = KRequestPending;
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     }
 
 const TThreadId CSenLocalRequest::OwnerThreadId() const
--- a/webservices/wsmanager/src/senservicemanagerimpl.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsmanager/src/senservicemanagerimpl.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -180,6 +180,7 @@
 */
 TPtrC CSenServiceManagerImpl::NextChunkNameL()	//Codescannerwarnings
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::NextChunkNameL");
     if(ipChunkName)
         {
         iChunkNameNumber++;
@@ -204,7 +205,6 @@
             pos = chunkname.Find(KDash);
             }
         TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KNormalLogLevel , _L("CSenServiceManagerImpl::NextChunkNameL(): %S"), &chunkname));
-
         return chunkname;
         }
     else
@@ -219,6 +219,7 @@
 TInt CSenServiceManagerImpl::ServiceDescriptionsL(const TDesC8& aUri, 
                                                   RServiceDescriptionArray& aList)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList)");
     TInt retVal(KErrNone);
     TPtrC8 descriptions;
 
@@ -242,12 +243,14 @@
             }
         }
     CleanupStack::PopAndDestroy(pSenChunk); // Close chunk
+    TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList) returns [%d]"), retVal));
     return retVal;
     }
 
 TInt CSenServiceManagerImpl::ServiceDescriptionsL(MSenServiceDescription& aSD,
                                                   RServiceDescriptionArray& aList)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList)");
     TInt retVal(KErrNone);
     
     HBufC8* pPattern = aSD.AsXmlL();
@@ -278,12 +281,13 @@
 
     // In any case, destroy the pattern as XML buffer:
     CleanupStack::PopAndDestroy(); // pPattern
-
+		TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList) returns [%d]"), retVal));
     return retVal;
     }
 
 TInt CSenServiceManagerImpl::RegisterServiceDescriptionL(MSenServiceDescription& aSD)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD)");
     // do not register if both endpoint and contract are 
     // missing
     if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0)
@@ -323,7 +327,7 @@
         // now register the XML string (descriptor) to WSF Symbian server:
         TInt retVal(iConnection.RegisterServiceDescription(ptr));
         CleanupStack::PopAndDestroy(); // pAsXml
-        
+        TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD) returns [%d]"), retVal));
         return retVal;
         }
     }
@@ -331,6 +335,7 @@
 TInt CSenServiceManagerImpl::UnregisterServiceDescriptionL(
                                                 MSenServiceDescription& aSD)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD)");
     // do not unregister if both endpoint and contract are 
     // missing
     if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0)
@@ -371,6 +376,7 @@
         TPtr8 ptr = pAsXml->Des();
         TInt retVal(iConnection.UnregisterServiceDescription(ptr));
         CleanupStack::PopAndDestroy(); // pAsXml
+        TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD) returns [%d]"), retVal));
         return retVal;
         }
     }
@@ -378,6 +384,7 @@
 TInt CSenServiceManagerImpl::RegisterIdentityProviderL(
                                             CSenIdentityProvider& aProvider)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider)");
     HBufC8* provider = aProvider.AsXmlL();
     TPtr8 ptr = provider->Des();
     TInt retVal = iConnection.RegisterIdentityProvider(ptr);
@@ -388,6 +395,7 @@
 TInt CSenServiceManagerImpl::UnregisterIdentityProviderL(
                                             CSenIdentityProvider& aProvider)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterIdentityProviderL(aProvider)");
     HBufC8* provider = aProvider.AsXmlL();
     TPtr8 ptr = provider->Des();
     TInt retVal(iConnection.UnregisterIdentityProvider(ptr));
@@ -398,6 +406,7 @@
 TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID,
                                                const TDesC8& aProviderID)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AssociateServiceL(aServiceID, aProviderID)");
     if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0)
         {
         return KErrArgument;
@@ -411,6 +420,7 @@
 TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID,
                                                 const TDesC8& aProviderID)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::DissociateServiceL(aServiceID, aProviderID)");
     if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0)
         {
         return KErrArgument;
@@ -668,6 +678,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     
     CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
@@ -685,6 +696,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -734,6 +746,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -780,6 +793,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -870,6 +884,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -916,6 +931,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
 
@@ -963,6 +979,7 @@
                                             const CSenIdentityProvider& aIdP,
                                             const CSenCredential2& aCredential)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials)");
     TInt retVal(KErrNone);
     
     if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL)
@@ -1004,6 +1021,7 @@
                                             const CSenIdentityProvider& aIdP,
                                             const CSenCredential2& aCredential)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials)");
     CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
     pServDesc->SetEndPointL(aEndpoint);
     
@@ -1019,6 +1037,7 @@
                                             const CSenCredential2& aCredential,
                                             const CSenXmlProperties& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     
     if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL )
@@ -1067,6 +1086,7 @@
                                             const CSenCredential2& aCredential,
                                             const CSenXmlProperties& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials, aCredentialProperties)");
     CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
     pServDesc->SetEndPointL(aEndpoint);
     
@@ -1079,10 +1099,12 @@
 
 TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp)");
     TInt retVal(KErrNone);
         
     if(&aIdP == NULL)
         {
+        TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns KErrArgument");
         return  KErrArgument; 
         }
     
@@ -1104,12 +1126,13 @@
 
     CleanupStack::PopAndDestroy(pIdPAsXml);
     
+		TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns [%d]"), retVal));
     return retVal;
-
     }
 TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern,
                                                 const CSenIdentityProvider& aIdP)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aIdP)");
     TInt retVal(KErrNone);
     
     if(&aPattern == NULL || &aIdP == NULL)
@@ -1146,6 +1169,7 @@
                                                 const TDesC8& aUserName,
                                                 const TDesC8& aPassword)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aUserName, aPassword)");
     CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName);
     pIdP->SetUserInfoL(aUserName, aUserName, aPassword);
     
@@ -1159,6 +1183,7 @@
 
 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList )
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)");
     TInt retVal(KErrNone);
     TPtrC8 descriptions;
 
@@ -1182,7 +1207,7 @@
 TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, 
                                                       RIdentityProviderArray& aList)
     {
-    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL");
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL(aIdPs, aList)");
     TInt retVal(KErrNotFound);
 
     
@@ -1280,6 +1305,7 @@
     }
 TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID )
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::InterfaceByUid(aUID)");
     if ( aUID == KSenInterfaceUidInternalServiceManager )
 		{
 		TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid ));
--- a/webservices/wsnotifierplugins/group/sennotifierplugin.mmp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsnotifierplugins/group/sennotifierplugin.mmp	Wed Apr 14 17:07:28 2010 +0300
@@ -118,7 +118,7 @@
 
 SYSTEMINCLUDE   ../../inc
 SYSTEMINCLUDE   /epoc32/include/libc
-SYSTEMINCLUDE   /epoc32/include/uikon 
+//SYSTEMINCLUDE   /epoc32/include/uikon 
 SYSTEMINCLUDE   /epoc32/include/ecom
 
 LIBRARY avkon.lib
--- a/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -348,7 +348,8 @@
 
     iStatus = KRequestPending;
     TRequestStatus* status = &iStatus;
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     User::RequestComplete(status, KErrNone);
 
     DOLOG(_L("[ CSenNotPluginDlgImpl::StartL(aBuffer, aReturnVal, aMessage): Done ]"));
--- a/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -754,7 +754,7 @@
     TInt count = iMsgHandlers.Count();
     for(TInt i=0;i<count; i++)
         {
-        if (iMsgHandlers[i]->Name() == aCue)
+        if( iMsgHandlers[i] && (iMsgHandlers[i]->Name() == aCue) )
             {
             delete iMsgHandlers[i];
             iMsgHandlers.Remove(i);
@@ -764,7 +764,7 @@
     count = iSessionHandlers.Count();
     for(TInt i=0;i<count; i++)
         {
-        if (iSessionHandlers[i]->Name() == aCue)
+        if( iSessionHandlers[i] && (iSessionHandlers[i]->Name() == aCue) )
             {
             delete iSessionHandlers[i];
             iSessionHandlers.Remove(i);
@@ -789,13 +789,15 @@
         {
         CWSStarPolicyHandler* policyHandler = (CWSStarPolicyHandler*)Handler(WSStarConfig::KPolicyValue);
         pSessionValidateCtx = CWSStarSessionContext::NewLC(Manager().XMLReader(), &aPattern, policyHandler);
-        pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
+        if(pSessionValidateCtx)
+        	pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
         ((CWSStarServiceSession*)aRemoteServiceSession)->SetSessionContext(pSessionValidateCtx);
         CleanupStack::Pop(pSessionValidateCtx);
         }
     else
         {
-        pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
+        if(pSessionValidateCtx)
+        	pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession);
         }
     TInt error(KErrNone);
     TRAPD(errorL, error = pSTShandler->InvokeL(*pSessionValidateCtx));
@@ -841,9 +843,7 @@
             aErrorMessage = pNotOwnedErrorMsg->AllocL();
             }
         }
-    
-    
-    
+
     if (cberrorL!=KErrNone)
         {
         TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSStarPlugin::ProcessOutboundValidationL() !!!!leave from validate handler")));
@@ -1051,7 +1051,8 @@
     CSenGuidGen* pGuidGenerator = CSenGuidGen::NewLC();
     delete iDeviceId;
     iDeviceId = NULL;
-    iDeviceId = pGuidGenerator->GetRandomGuid8LC();
+    if(pGuidGenerator)
+    	iDeviceId = pGuidGenerator->GetRandomGuid8LC();
     TPtr8 deviceIdDes = iDeviceId->Des();
     deviceIdDes.LowerCase();
     CleanupStack::Pop(iDeviceId);
--- a/webservices/wsutils/group/senutils.mmp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsutils/group/senutils.mmp	Wed Apr 14 17:07:28 2010 +0300
@@ -79,10 +79,7 @@
 USERINCLUDE   ../../wsdescription/inc      // removes <SenXmlServiceDescription.h> warning..
 USERINCLUDE   ../../wsxml/inc								//senxmldebug.h
 
-//SYSTEMINCLUDE   ../../wsServiceDescription/inc      // removes <SenXmlServiceDescription.h> warning..
-
 MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib
 LIBRARY         hash.lib
@@ -90,7 +87,8 @@
 LIBRARY         efsrv.lib // TVolumeInfo => hostid for CMD5 based UUID (URN) generation
 LIBRARY         flogger.lib
 LIBRARY         bafl.lib    // RStringbase
-LIBRARY imut.lib // for base64 encoding
+LIBRARY 				inetprotutil.lib // for base64 encoding
+
 // WSF libraries
 #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
 LIBRARY         SenLogger.lib // for TLS based logging
--- a/webservices/wsutils/src/sencryptoutils.cpp	Wed Mar 31 23:17:32 2010 +0300
+++ b/webservices/wsutils/src/sencryptoutils.cpp	Wed Apr 14 17:07:28 2010 +0300
@@ -22,16 +22,13 @@
 
 
 
-
-
+#include <e32math.h>
+#include <tconvbase64.h>
 #include "sencryptoutils.h"
-#include <imcvcodc.h>
 #include "senguidgen.h"
-#include <e32math.h>
-#include <SenDomFragment.h>
-#include <SenNameSpace.h>
+#include "SenDomFragment.h"
+#include "SenNameSpace.h"
 #include "SenWsSecurityHeader.h"
-//#include "senxmldebug.h"
 
 namespace
     {
@@ -90,57 +87,46 @@
         {
         return NULL;
         }
-
-    TInt remainder = aData.Length() % KToBase64CoefficientNominative;
-    TInt length = aData.Length() * KToBase64CoefficientNumerator;
-    length /= KToBase64CoefficientNominative;
-    if (remainder)
-        {
-        length++;
-        length += KToBase64CoefficientNominative - remainder;
-        }
-
-    HBufC8* buffer = HBufC8::NewLC(length);
-    
-    
-    TImCodecB64 base64Codec;
-    base64Codec.Initialise();
-    TPtr8 des = buffer->Des();  // don't blame me, it's the compiler's fault    
-    base64Codec.Encode(aData, des);
-    
-    CleanupStack::Pop(buffer);
+    TInt length = aData.Length(); 
+    TInt destLen = (length + 1 ) * 2;
+    HBufC8* buffer = HBufC8::NewMaxL(destLen);
+    TInt test = buffer->Des().Length(); 
+    TPtr8 encodedPtr(buffer->Des());
+    TBase64 base64Codec;
+    TInt error = base64Codec.Encode(aData, encodedPtr);
+	if(error > 1) //There is a problem in encoding always returns 1
+		{
+		delete buffer;
+		buffer = NULL;		
+		}
+	else
+		{
+		//Successful encoding
+		}
     return buffer;
 }
 
 EXPORT_C HBufC8* SenCryptoUtils::DecodeBase64L(const TDesC8& aData)
 {
-    const TUint8 KBase64Fill = '=';
-
-    TInt length = aData.Length();
-    if (aData[length-1] == KBase64Fill)
-        {
-        length--;
-        if (aData[length-2] == KBase64Fill)
-            {
-            length--;
-            }
-        }
-    length *= KToBase64CoefficientNominative;
-    length /= KToBase64CoefficientNumerator;
-    if (length <= 0)
-        {
-        return NULL;
-        }
-
-    HBufC8* buffer = HBufC8::NewLC(length);
-
-    TImCodecB64 base64Codec;
-    base64Codec.Initialise();
-    TPtr8 des = buffer->Des();  // don't blame me, it's the compiler's fault    
-
-    base64Codec.Decode(aData, des);
-
-    CleanupStack::Pop(buffer);
+	TInt data_len = aData.Length();
+	HBufC8* buffer = NULL;
+	if (data_len > 0)
+		{
+		buffer = aData.AllocL();
+		buffer->Des().Zero(); //added
+		TPtr8 des( buffer->Des() );
+		TBase64 base64Codec;
+//		if (base64Codec.Decode(aData,des) != EFalse)
+//			{
+//			//Successful decoding
+//			}
+//		else
+//			{
+//			delete buffer;			
+//			buffer = NULL;
+//			}
+		base64Codec.Decode(aData, des);
+		}
     return buffer;    
 }