201021
authorhgs
Sun, 30 May 2010 23:54:06 +0530
changeset 28 0802db42e4e9
parent 2 150a13bad6af
child 29 5743aa3a72c3
201021
webservices/idwsfplugin/group/senidwsfplugin.mmp
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/inc/senmobilityobserver.h
webservices/wscore/src/senclientsession.cpp
webservices/wscore/src/sencoreservicemanager.cpp
webservices/wscore/src/senmobilityobserver.cpp
webservices/wscore/src/senxmldao.cpp
webservices/wscredentialmanager/src/sencredentialmanager.cpp
webservices/wscredentialmanager/src/seninternalcredential.cpp
webservices/wsdescription/src/sencredential2.cpp
webservices/wsdescription/src/senservicepolicy.cpp
webservices/wsfragment/inc/wslibxml2utils.h
webservices/wsfragment/src/rsendocument.cpp
webservices/wsfragment/src/sendomfragmentbase.cpp
webservices/wsfragment/src/senfragmentbase.cpp
webservices/wsfragment/src/wslibxml2utils.cpp
webservices/wsframework/group/senframework.mmp
webservices/wsframework/inc/senmtomutils.h
webservices/wsframework/inc/senmultipartutils.h
webservices/wsframework/src/saslmechanism.cpp
webservices/wsframework/src/senservicesession.cpp
webservices/wsframework/src/sensyncrequester.cpp
webservices/wsframework/src/senwebservicesession.cpp
webservices/wshostletconnection/src/senhostletconnectionimpl.cpp
webservices/wshostletconnection/src/senregistrationtimer.cpp
webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp
webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h
webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h
webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h
webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp
webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp
webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp
webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp
webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp
webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp
webservices/wslogger/group/senlogger.mmp
webservices/wslogger/src/senlogger.cpp
webservices/wsmanager/src/rsenservicemanager.cpp
webservices/wsmanager/src/senservicemanagerimpl.cpp
webservices/wsmessages/src/senatomentry.cpp
webservices/wsmessages/src/senatomfeed.cpp
webservices/wsmessages/src/senatommessage.cpp
webservices/wsmessages/src/sensoapenvelope2.cpp
webservices/wsmessages/src/sensoapfault2.cpp
webservices/wsmessages/src/sensoapmessage2.cpp
webservices/wsmessages/src/sensoapmessagedom2.cpp
webservices/wsmessages/src/senwssecurityheader2.cpp
webservices/wsnotifierplugins/group/sennotifierplugin.mmp
webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp
webservices/wsoviplugin/inc/wsovicons.h
webservices/wsoviplugin/inc/wsoviservicesession.h
webservices/wsoviplugin/inc/wsovitokencreationresponse.h
webservices/wsoviplugin/src/wsovihandlercontext.cpp
webservices/wsoviplugin/src/wsovioauthclient.cpp
webservices/wsoviplugin/src/wsoviplugin.cpp
webservices/wsoviplugin/src/wsoviregisterhandler.cpp
webservices/wsoviplugin/src/wsoviservicesession.cpp
webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp
webservices/wsoviplugin/src/wsovisessioncontext.cpp
webservices/wsoviplugin/src/wsovitokencreationresponse.cpp
webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp
webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h
webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp
webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp
webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp
webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp
webservices/wsstar/wsstarpolicy/src/wspolicy.cpp
webservices/wsutils/group/senutils.mmp
webservices/wsutils/src/sencryptoutils.cpp
webservices/wsutils/src/senxmlproperties.cpp
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp
websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp
websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp
websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h
websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp
websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp
websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp
websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp
websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp
websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp
websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp
websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp
websrv_pub/xml_fragment_api/inc/RSenDocument.h
websrv_pub/xml_fragment_api/inc/SenFragmentBase.h
websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp
--- a/webservices/idwsfplugin/group/senidwsfplugin.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/idwsfplugin/group/senidwsfplugin.mmp	Sun May 30 23:54:06 2010 +0530
@@ -35,7 +35,8 @@
 UID 0x10009D8D 0x101F972F
 #endif
 
-paged
+PAGEDDATA
+PAGEDCODE
 //For enabling bytepair compression for code paging
 
 #ifdef EKA2
--- a/webservices/wsconnection/src/rsenserviceconnection.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsconnection/src/rsenserviceconnection.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsconnection/src/senregistrationtimer.cpp	Sun May 30 23:54:06 2010 +0530
@@ -74,7 +74,8 @@
 	if (!IsActive())
         {
         iTimer.After( iStatus, interval );
-        SetActive();
+        if(!IsActive())
+        	SetActive();
         }
     }
 
--- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Sun May 30 23:54:06 2010 +0530
@@ -45,9 +45,9 @@
 
 #include "senservicemanagerdefines.h"
 #include "SenBaseAttribute.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
 #include "senconnagentserver.h"
 #include "senxmldebug.h"
 #include "senatomentry.h"
@@ -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")));
@@ -916,7 +922,7 @@
 
         TInt appendRetVal(KErrNone);
         appendRetVal = ChunkMapL().Append( pTxnId, apClientOp );
-        TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal));
+        TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal));
         if( appendRetVal == KErrNone )
             {
             TMessage msg;
@@ -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 )
@@ -2481,6 +2499,7 @@
     
 TInt CSenServiceConnectionImpl::CancelTransaction(TInt aTransactionID)
     {
+    TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::CancelTransaction");
     TInt retVal(0);
     if ( iDispatcherEnabled ) // DISPATCHER IS ENABLED
         {
@@ -2511,6 +2530,7 @@
     	TRAP(retVal, DeliverResponseL(KErrSenCancelled,NULL));
     	if( retVal != KErrNone)
     		{
+    		TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), retVal ));
     		return retVal;
     		}
     	}  
@@ -2519,6 +2539,7 @@
         {
         iConnection.CancelRequest(aTransactionID);
         }
+    TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), KErrNone ));
     return KErrNone;
     }
         
@@ -2554,6 +2575,7 @@
 
 RChunkMap& CSenServiceConnectionImpl::ChunkMapL()
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ChunkMapL()")));
     if(!iChunkMap)
         {
         iChunkMap = new (ELeave) RChunkMap(ETrue, ETrue);
@@ -2563,6 +2585,7 @@
     
 RPointerArray<CSenAsyncOperation>& CSenServiceConnectionImpl::AsyncOpsArrayL() //codescannerwarnings
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsyncOpsArrayL()")));
     if(!iAsyncOpsArray)
         {
         iAsyncOpsArray = new (ELeave) RPointerArray<CSenAsyncOperation>;
@@ -2833,6 +2856,7 @@
                                                         CSenSoapEnvelope& aMessage,
                                                         const TDesC8& aProperties)	//codescannerwarnings
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AssignPropertiesToChunkL()")));
     TInt retVal(KErrNone);
     
     if ( aMessage.SoapAction2().Length() > 0 )
@@ -2869,7 +2893,7 @@
             }
         delete pSoapMsg;
         }    
-    
+		TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignPropertiesToChunkL returns [%d]" ), retVal ));
     return retVal;
     }
     
@@ -2998,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;
     }
     
@@ -3006,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;
@@ -3100,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;
@@ -3170,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;
@@ -3269,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;
@@ -3440,6 +3469,7 @@
 
 void CSenServiceConnectionImpl::MigrateToPrefferedCarrierL(TBool &aUserChoice)
     {
+    TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL()")));
     if (iMobiltyObserver)
         {
         User::LeaveIfError(iConnection.MigrateToPrefferedCarrierL(aUserChoice));    	
@@ -3448,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));    	
@@ -3459,7 +3491,8 @@
 	else
 	    {
         User::Leave(KErrNotFound);
-	    }	 
+	    }
+	  TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL() Completed")));  	 
     }
 #endif
 
@@ -3468,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)
@@ -3500,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")));
     }
     
     
@@ -3564,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());
@@ -3603,7 +3639,7 @@
 	            }
 	        }
 	    CleanupStack::PopAndDestroy(pSenChunk);
-
+			TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::SearchIdentityProviderL returns [%d]" ), retVal ));
 	    return retVal; 
 		}
  
@@ -3654,6 +3690,7 @@
 
 TBool CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()")));
 #ifdef __ENABLE_ALR__
 	if((ipAuthProvider || iFilesObserver || iMobiltyObserver || ipCoBrandingObserver) && iConnectionAgentCallbackInitialized)
 #else
@@ -3754,6 +3791,7 @@
 void CSenServiceConnectionImpl::DataTrafficDetails(TSenDataTrafficDetails& aDetails,
 												   TSenDataTrafficOperations& aOperations) 
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DataTrafficDetails()")));
 	iConnection.DataTrafficDetails(aDetails, aOperations);
 	}	
 	
@@ -3782,6 +3820,7 @@
 
 TInt CSenServiceConnectionImpl::PendingTrasanctionsCount()
 	{
+	TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::PendingTrasanctionsCount()")));
 	return iAsyncOpsArray->Count();
 	}										
 
@@ -3822,7 +3861,8 @@
                      sizeof(TInt),
                      sizeof(TInt));
                      
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
 #ifdef EKA2
     iActive->AsyncOpsArrayL().AppendL(this);	//codescannerwarnings
@@ -3918,7 +3958,8 @@
     CActiveScheduler::Add(this);
     // Initial subscription
     iConnectionStatusProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
     }
 
@@ -3942,7 +3983,8 @@
         
     TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenConnectionStatusObserver::RunL" );
     iConnectionStatusProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
 	iStatus = KRequestPending;
    
     TInt propertyValue(KErrNotFound);
@@ -4020,7 +4062,8 @@
     CActiveScheduler::Add(this);
     // Initial subscription
     iFileProgressProperty.Subscribe(iStatus);
-    SetActive();
+    if(!IsActive())
+    	SetActive();
     iStatus = KRequestPending;
     }
 
@@ -4042,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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsconnection/src/senservicedispatcher.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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
@@ -312,6 +314,7 @@
     }
 TBool CSenServiceDispatcher::RemoveFromQueue(TInt aTransactionID)
     {
+    TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromQueue - VrtlTxnID (%d)"), aTransactionID));
     //This method gets called from two places 1)main thread from
     //CancelTransaction(aTransactionID) method and 2)child thread from
     //ExecuteL method once message has been dispacthed.
@@ -368,6 +371,7 @@
 
 TInt CSenServiceDispatcher::AddToTheTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId)
     {
+    TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::AddToTheTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId));
     TInt returnValue = KErrNone;
     //Wait on transaction map critical section if it is locked, and then add to 
     //the map.
@@ -382,6 +386,7 @@
 
 TInt CSenServiceDispatcher::RemoveFromTransMap(TInt* pVrtlaTxnId)
     {
+    TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromTransMap - VrtlTxnID [%d]"), pVrtlaTxnId));
     TInt returnValue = KErrNone;
     //Is called from the main thread after we recieve the response.
     returnValue = TransactionMap().Find(*pVrtlaTxnId);
@@ -396,6 +401,7 @@
 
 TInt CSenServiceDispatcher::UpdateTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId)
     {
+    TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::UpdateTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId));
     TInt returnValue = KErrNone;
     //Is called from the main thread from HandleMessageChildAOL method.
     //Typically gets called when ESenReAuthAndResendNeeded and ESenResendNeeded
--- a/webservices/wscore/group/sencore.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/group/sencore.mmp	Sun May 30 23:54:06 2010 +0530
@@ -85,7 +85,6 @@
 SYSTEMINCLUDE /epoc32/include/libc
 
 MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
 
 LIBRARY ecom.lib
 LIBRARY euser.lib 
@@ -93,13 +92,15 @@
 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__
 LIBRARY esock.lib		//MOBILITY
 LIBRARY commdb.lib //MOBILITY
 LIBRARY  netmeta.lib
+LIBRARY  platformver.lib //extendedconnpref.h
+LIBRARY  extendedconnpref.lib //extendedconnpref.h
 #endif
 #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
 LIBRARY senlogger.lib   // for TLS based logging
--- a/webservices/wscore/inc/sencoreservicemanager.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/inc/sencoreservicemanager.h	Sun May 30 23:54:06 2010 +0530
@@ -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/inc/senmobilityobserver.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/inc/senmobilityobserver.h	Sun May 30 23:54:06 2010 +0530
@@ -88,6 +88,9 @@
 	TInt StartConnection(TUint32& aId, TBool aIsSnapId) ;
 	TInt OpenSocketSever() ;
 	void RefreshAvailabilityL() ;
+	TInt SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP);
+	TBool IsOCCImplementedSDK();
+	TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor);
 
 	/**
 	* By default Symbian OS constructor is private.
@@ -100,8 +103,9 @@
 	TUint32 iIapId;
 	TUint32 iNewIapId;
 	TUint32 iSnapId;
-	 CSenXmlReader &iReader ;
-	private:    // Data
+	CSenXmlReader &iReader ;
+	TBool iOCCenabled;
+	private:    // Data	      
 	};
     
 #endif /*M_SEN_MOBILITY_OBSERVER_H    */
--- a/webservices/wscore/src/senclientsession.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/src/senclientsession.cpp	Sun May 30 23:54:06 2010 +0530
@@ -37,7 +37,7 @@
 #include <SenXmlUtils.h>
 #include <SenXmlProperties.h>
 
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 #include <defaultcaps.hrh>
 
 #include "senclientsession.h"
@@ -59,9 +59,9 @@
 
 #include "SenSoapEnvelope2.h"
 #include "sensoapmessagedom2.h"
-#include "xmlengchunkcontainer.h"
-#include "xmlengfilecontainer.h"
-#include "xmlengdeserializer.h"
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengdeserializer.h>
 #include "SenParser.h"
 #include "seninternalcredential.h"
 #include "senservercontext.h"
@@ -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);
@@ -224,6 +225,7 @@
         CSenMessageResourceHandler* tmp = resHandler;
         resHandler = resHandler->iNext;
         delete tmp;
+        tmp = NULL;
         }
     RSessionBase::Close();
     }
@@ -260,6 +262,7 @@
 		SendReceive(ESenCliServPrefferedCarrierAvailable, args, caSync->iStatus);
         retVal = caSync->iStatus.Int();
 		delete caSync;
+		caSync = NULL;
 		}
 	return retVal;        
 	
@@ -279,6 +282,7 @@
         SendReceive(ESenCliServNewCarrierActive, args, caSync->iStatus);
         retVal = caSync->iStatus.Int();
         delete caSync;
+        caSync = NULL;
         }
     return retVal;
     }
@@ -294,6 +298,7 @@
         SendReceive(ESenCliServMobilityError, args, caSync->iStatus);
         retVal = caSync->iStatus.Int();
         delete caSync;
+        caSync = NULL;
         }
     return retVal;        
     }
@@ -328,6 +333,7 @@
 		asWait.Start();
 		retVal = caSync->iStatus.Int();
 		delete caSync;
+		caSync = NULL;
 		}
 	return retVal;
 	}
@@ -356,7 +362,8 @@
 
 void CSenConnAgentSync::Start()
 	{
-	SetActive();
+	if(!IsActive())
+		SetActive();
 	}
 
 CSenClientSession* CSenClientSession::NewL(MSenServiceManager& aServer, CSenServerContext& aCtx)
@@ -991,6 +998,7 @@
         	{
         	CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders");
         	IdentityProviders(aMessage);
+	       	CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders Completed");
         	break;
         	}
         default:
@@ -1500,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);
@@ -1551,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);
@@ -1651,7 +1660,7 @@
             }
         }
     CleanupStack::PopAndDestroy(pParser);
-    
+    CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope) Completed");
     return retVal;
     }
     
@@ -1943,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 
                 {
@@ -3739,6 +3748,7 @@
     }
 void CSenClientSession::AddCredentialL( const RMessage2& aMessage )
     {
+    CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL()")));
     TInt retVal(KErrNone);
     CSenChunk* pSenChunk = NULL;
 
@@ -3851,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);
@@ -3873,6 +3896,7 @@
     CleanupStack::PopAndDestroy(pSenChunk);
         
     aMessage.Complete(retVal);
+    CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() Completed")));
     }
 
 void CSenClientSession::CredentialsL( const RMessage2& aMessage )
@@ -4243,6 +4267,7 @@
             TInt cancelledTxnId(*pTxnId);
             txnIds.Remove(i);
             delete pTxnId;
+            pTxnId = NULL;
             CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- Now processing txn with id %d"), cancelledTxnId));
 
 
@@ -5544,6 +5569,7 @@
         const RPointerArray<CSenIdentityProvider> pIdps = ((MSenCoreServiceManager&)iManager).IdentityProvidersL();
         
         const TInt count = pIdps.Count();
+        CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- TOTAL IDP Found: %d"), count));		
   
         // Calculate required heap allocation size:
         TInt size(0);
@@ -5658,11 +5684,12 @@
                 }
             CSLOG_L(iConnectionID,KMaxLogLevel ,"- Requested descriptions:");
             CSLOG_ALL(iConnectionID,KMaxLogLevel ,(*pIdPrs));
+		     CSLOG_L(iConnectionID,KMinLogLevel ,"CSenClientSession::IdentityProviders completed");			
             }
     #ifdef _SENDEBUG
         else
             {
-            CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal));
+            CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal));
             }
     #endif // _SENDEBUG
 
--- a/webservices/wscore/src/sencoreservicemanager.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/src/sencoreservicemanager.cpp	Sun May 30 23:54:06 2010 +0530
@@ -379,7 +379,7 @@
             error = additions;
             additions = 0;
             }
-        CSLOG_FORMAT((aConsumer.ConnectionId(), KNormalLogLevel , _L8(" - Just added %d service description(s)."), additions));
+        CSLOG_FORMAT((aConsumer.ConnectionId(), KMinLogLevel , _L8(" - Just added %d service description(s)."), additions));
         if ( error )
             {
             retVal = error;
@@ -973,9 +973,8 @@
     }
 
 // private getter, which always initializes the base64codec
-TImCodecB64& CSenCoreServiceManager::Base64Codec()
+TBase64& CSenCoreServiceManager::Base64Codec()
     {
-    iBase64Codec.Initialise();
     return iBase64Codec;
     }
 
--- a/webservices/wscore/src/senmobilityobserver.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/src/senmobilityobserver.cpp	Sun May 30 23:54:06 2010 +0530
@@ -27,6 +27,8 @@
 #include "senlayeredtransportproperties.h"
 #include "senlogger.h"
 #include "senservicemanagerdefines.h"
+#include <versioninfo.h>  // VersionInfo
+#include <extendedconnpref.h>
 
 // -----------------------------------------------------------------------------
 // CALRObserver::NewL
@@ -65,6 +67,7 @@
 #endif    
     User::LeaveIfError( iSocketServer.Connect());
     TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "CALRObserver::ConstructL()");
+    IsOCCImplementedSDK();
     }
 
 // -----------------------------------------------------------------------------
@@ -77,7 +80,8 @@
      iIapId(0),
      iNewIapId(0),
      iSnapId(0),
-     iReader(aReader)
+     iReader(aReader),
+     iOCCenabled(EFalse)
     {
     CActiveScheduler::Add( this );
     }
@@ -140,8 +144,59 @@
         //RunL status error: " ) );
         User::Leave(iStatus.Int()) ;
         }
-    }    
-
+    }
+    
+// On return, aMajor and aMinor contain the version information
+TBool CALRObserver::IsOCCImplementedSDK()
+	{   
+	TBool occ = EFalse;
+	// Obtain the version number
+	TUint major;
+	TUint minor;	
+	TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()")));		
+	TInt ret = GetS60PlatformVersion(major, minor);
+	if (ret == KErrNone)
+		{
+		if(major == 5 && minor == 2)
+			{
+			occ = ETrue;
+			iOCCenabled = ETrue;
+			TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE")));
+			}
+		else
+			{
+			TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns False")));
+			}
+		}
+	return occ;
+	}
+	
+// On return, aMajor and aMinor contain the version information
+TInt CALRObserver::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor)
+	{   
+	TInt ret = KErrNone;
+	// Connect to the file server session
+	RFs fsSession;
+	TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()")));	
+	ret = fsSession.Connect();
+	if(ret == KErrNone)
+		{
+		CleanupClosePushL(fsSession); // Obtain the version numberTUint major;
+		VersionInfo::TPlatformVersion platformVersion;  
+		TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "--- GetS60PlatformVersion getting Version info");		
+		ret = VersionInfo::GetVersion(platformVersion, fsSession);   
+		CleanupStack::PopAndDestroy();  // fsSession		
+		if (ret == KErrNone)       
+			{     
+			aMajor = platformVersion.iMajorVersion;  
+			aMinor = platformVersion.iMinorVersion;   
+		   	TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor));
+			}		
+		}
+	TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret));
+	return ret;
+	}	
+	
 // -----------------------------------------------------------------------------
 // CALRObserver::RunError
 // -----------------------------------------------------------------------------
@@ -363,7 +418,7 @@
 
     TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pTransportProperties ");
 	TInt error = pTransportProperties->SnapIdL(id) ;
-	if(error || id >= (TUint)KErrNotFound) //
+	if(error || id >= (TUint)KErrNotFound) //SNAP not found
 		{
         TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pTransportProperties ");
 	    error = pTransportProperties->IapIdL(id);		
@@ -373,7 +428,7 @@
 		isSnap = ETrue ;
 		}  
 		
-    if(error || id >= (TUint)KErrNotFound) 
+    if(error || id >= (TUint)KErrNotFound) //IAP also not found
 	    {
     	//Application Did not provide IAP ID through transport properties
     	//Now we need to check consumer and provider policy of service description
@@ -385,7 +440,7 @@
             CSenWSPattern* pConsumerPolicy = (CSenWSPattern*)&aInitializer;
 		    TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pConsumerPolicy ");
 			error = pConsumerPolicy->ConsumerSnapId( id );
-			if(error || id >= (TUint)KErrNotFound) 
+			if(error || id >= (TUint)KErrNotFound) //SNAP not found
 			    {
         		TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pConsumerPolicy ");
 				error = pConsumerPolicy->ConsumerIapId( id );			 	
@@ -445,6 +500,11 @@
         {
         //check with first Snapid
         isStartConnectionRequired = ETrue ;
+        if(iOCCenabled != EFalse)
+	        {
+	        isSnap = ETrue; //We must start with SNAP for OCC
+			TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- isSnap Modified for OCC Support ");     
+			}
      	TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- StartConnection required as (iIapId == 0 && iSnapId == 0) openId = %d, isSnap = %d, iIapId = %d and iSnapId = %d "), openId, isSnap, iIapId, iSnapId));
         }
     else if(isSnap != EFalse && openId != iSnapId)
@@ -495,6 +555,146 @@
      	TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::OpenConnectionL returnd %d "), error));
         return error ;
 	}
+	
+TInt CALRObserver::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP)
+	{
+   /*
+    * Single click connectivity feature has been implemented by CSock (RConnection class).
+    * According to this client no need to set the IAP ID. 
+    * Automatically RConnection will use the suitable IAP
+    */
+    TInt retVal = KErrNone;
+    TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("CSenHttpChannelImpl  called with ID [%d]"), aId));
+	    
+	if (iOCCenabled == EFalse)	    
+		{
+		if(aSNAP != EFalse && aId)
+		    {
+		    TConnSnapPref SNAPPrefs;
+		    iSnapId = aId ;
+		    SNAPPrefs.SetSnap( aId ); 
+		    // Start connecting with Snap
+		    retVal = iConnection.Start(SNAPPrefs);						
+		    TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
+		    }
+		else //default is iap
+			{
+		    if( aId )
+		        {
+		        TCommDbConnPref iapPrefs ;
+		        iapPrefs.SetIapId( aId );
+				iapPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
+				TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");					
+				//iapPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );					
+		        // Start connecting with IAP
+		        retVal = iConnection.Start(iapPrefs);
+		        TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
+		        }
+		    else
+		    	{
+		    	if (iIapId != 0)
+		        	{
+		        	//OpenSocketSever is already called for this iIapId When multiple
+		        	//sendL are calld for the same IAPId StartConnection may be called
+		        	//unintentionaly and may create crash
+		        	//strange case StartConnection must not be called in this case
+		        	TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0");
+		        	}
+		    	else
+		        	{
+		        	//Using Default Connection
+		            TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection");
+		        	retVal = iConnection.Start();	            	
+		        	}
+		    	}
+			}
+		}
+	else
+		{
+		if (aSNAP == EFalse)
+			{
+			/* If IAP id is zero, it is interpreted as
+		    * client's request for not requesting any specific IAP.
+		    * Default value is 0.
+		    * 
+		    * If IAP id is set, SNAP id shall be zero.
+		    * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+		    * If IAP id is set, Connection selection dialog shall be disabled.
+		    * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown.
+		    * If IAP id is set, forced roaming is disabled automatically.
+		    * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+		    * selection dialog shall be enabled.
+		    */
+		    
+		    TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with IAP Settings");
+			TConnPrefList prefList;
+			TExtendedConnPref extPrefs;
+			//extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+			//TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection");
+			//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+			//extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+			extPrefs.SetIapId(aId);
+			extPrefs.SetSnapId(0);
+			prefList.AppendL(&extPrefs);
+			retVal = aConnection.Start(prefList);
+			if(retVal == KErrNone)
+			    {
+			    iIapId = aId;
+			    }
+			 else
+			    {
+				TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("IAP ->Start retVal [%d]"), retVal));
+			    }
+		    }
+		else
+		    {
+		    /**
+		    * Sets SNAP id. If SNAP id is zero, it is interpreted as 
+		    * client's request for not requesting any specific SNAP.
+		    * Default value is 0.
+		    *
+		    * If SNAP id is set, IAP id shall be zero.
+		    * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+		    * If SNAP id is set, Connection selection dialog shall be disabled.
+		    * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+		    * selection dialog shall be enabled.
+		    */
+			TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with SNAP Settings");
+			TConnPrefList prefList;
+			TExtendedConnPref extPrefs;
+			//extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+			//TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection");
+			//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+			//extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+			if(aId == 0)
+				{
+				TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting SnapPurpose Internet");
+				if(aDialogPref) //If it fails because of unavailibility of access points
+					{
+					extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+					extPrefs.SetConnSelectionDialog(ETrue);
+					}
+				else
+					{
+					extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+					//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);					
+					}
+				}
+			else
+				{
+				extPrefs.SetSnapId(aId);
+				extPrefs.SetIapId(0);	
+				extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+				extPrefs.SetConnSelectionDialog(EFalse);
+				}
+			prefList.AppendL(&extPrefs);
+			retVal = aConnection.Start(prefList);							
+		    }
+		}    
+    
+	return retVal;
+	}
+
 // -----------------------------------------------------------------------------
 // CALRObserver::StartConnection
 // -----------------------------------------------------------------------------
@@ -530,49 +730,13 @@
 				TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection closed as new SNAPID for the same connection");				      
 				}
 			}
-		errRet = OpenSocketSever();		
+			
+		errRet = OpenSocketSever();
+		
 		if (!errRet)
 		    {
-			if(aIsSnapId != EFalse && aId)
-                {
-                TConnSnapPref SNAPPrefs;
-                iSnapId = aId ;
-                SNAPPrefs.SetSnap( aId ); 
-                // Start connecting with Snap
-                errRet = iConnection.Start(SNAPPrefs);						
-                TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP");
-                }
-			else //default is iap
-				{
-	    	    if( aId )
-                    {
-                    TCommDbConnPref iapPrefs ;
-                    iapPrefs.SetIapId( aId );
-					iapPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
-					TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE");					
-					//iapPrefs.SetDialogPreference( ECommDbDialogPrefPrompt );					
-                    // Start connecting with IAP
-                    errRet = iConnection.Start(iapPrefs);
-                    TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId));
-                    }
-	            else
-	            	{
-	            	if (iIapId != 0)
-		            	{
-		            	//OpenSocketSever is already called for this iIapId When multiple
-		            	//sendL are calld for the same IAPId StartConnection may be called
-		            	//unintentionaly and may create crash
-		            	//strange case StartConnection must not be called in this case
-		            	TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0");
-		            	}
-	            	else
-		            	{
-		            	//Using Default Connection
-	                    TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection");
-		            	errRet = iConnection.Start();	            	
-		            	}
-	            	}
-				}
+			errRet = SetID(aId, EFalse, iConnection, iSocketServer, aIsSnapId);
+			
 			if (errRet == KErrNone)
     			{	
      			//iConnection.GetIntSetting( _L( "IAP\\Id" ), aId );
--- a/webservices/wscore/src/senxmldao.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscore/src/senxmldao.cpp	Sun May 30 23:54:06 2010 +0530
@@ -1253,7 +1253,7 @@
                 }
             }
         }
-     TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KNormalLogLevel, _L8(" - total of %d matches found."), 
+     TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMinLogLevel, _L8(" - total of %d matches found."), 
                         aMatches.Count()));
 
     return retVal; // last error from Append() is returned atm
@@ -1604,7 +1604,7 @@
     // This method needs to be wrapped inside critical section 
     // NOTE: do *NOT* file log before this line(!):
 
-    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel,"CSenXMLDAO::LookupHostletForL:");
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CSenXMLDAO::LookupHostletForL:");
     TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel,(aReqThreadId));
     TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel,(aReqConsumerId));
 
@@ -1624,7 +1624,7 @@
             {
             if(pHostlet->Endpoint()==aHostletEndpoint)
                 {
-                TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet));
+                TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMinLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet));
                 return *pHostlet;
                 }
             }
@@ -1652,11 +1652,11 @@
             // Next line is critical; when count goes to zero,
             // provider can be de-allocated from memory!
             pLookupInfo->IncrementLookupCount();
-            TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount()));
+            TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMinLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount()));
             if(pHostlet->Reinitializable())
                 {
                 pHostlet->ReinitL();
-                TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel,"- Provider was also reinitialized.");
+                TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"- Provider was also reinitialized.");
                 }
             return *pHostlet;
             }
@@ -1693,7 +1693,7 @@
         append = iSharableProviders.Append(pHostlet);
         if(append==KErrNone)
             {
-            TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMaxLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet));
+            TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMinLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet));
             CleanupStack::Pop(); // pHostlet
             }
         else
@@ -1740,6 +1740,7 @@
         }
 	}
     User::LeaveIfError(append); // KErrNoMemory
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CSenXMLDAO::LookupHostletForL: Completed");	
     return *pHostlet;
     }
 
--- a/webservices/wscredentialmanager/src/sencredentialmanager.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscredentialmanager/src/sencredentialmanager.cpp	Sun May 30 23:54:06 2010 +0530
@@ -47,7 +47,7 @@
 #include "senwebservicesession.h"
 
 #include <SenServiceConnection.h> // KErrSenNoPermission ( -30315 )
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 #include <SenCredential.h>
 
 #include <SenXmlUtils.h>
@@ -1336,6 +1336,7 @@
 RSenCredentialPtr CSenCredentialManager::CredentialL( TInt aInternalCredentialId,
                                                       TInt& aErrorTo )
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CSenCredentialManager::CredentialL()");
     TInt count = iCredentialArray.Count();
     for (TInt i=0; i<count; i++)
         {
@@ -1391,7 +1392,8 @@
             return iCredentialArray[i];
             }
         }
-    aErrorTo = KErrNotFound;     
+    aErrorTo = KErrNotFound;
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CSenCredentialManager::CredentialL() Completed"); 
     return RSenCredentialPtr();
     }
 
--- a/webservices/wscredentialmanager/src/seninternalcredential.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wscredentialmanager/src/seninternalcredential.cpp	Sun May 30 23:54:06 2010 +0530
@@ -42,7 +42,7 @@
     //#include "Attribute.h"
 #endif
 
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 using namespace Xml;
 
 namespace
--- a/webservices/wsdescription/src/sencredential2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsdescription/src/sencredential2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -279,7 +279,10 @@
 
 EXPORT_C CSenCredential2::~CSenCredential2()
     {
-    delete iId;
+    if(iId)
+    	{
+    	delete iId;    	
+    	}
     }
 
 EXPORT_C void CSenCredential2::SetIdL(const TDesC8& aNewId)
--- a/webservices/wsdescription/src/senservicepolicy.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsdescription/src/senservicepolicy.cpp	Sun May 30 23:54:06 2010 +0530
@@ -16,12 +16,6 @@
 */
 
 
-
-
-
-
-
-
 // INCLUDE FILES
 #include <e32std.h>
 #include <s32strm.h>
@@ -159,7 +153,8 @@
                 }
             }
         }
-    delete copy; 
+    delete copy;
+    copy = NULL;
     return retVal;  
     }
     
--- a/webservices/wsfragment/inc/wslibxml2utils.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsfragment/inc/wslibxml2utils.h	Sun May 30 23:54:06 2010 +0530
@@ -26,7 +26,7 @@
 #define WS_LIBXML2_UTILS_H_INCLUDED
 
 #include <e32base.h>
-#include "xmlengelement.h"
+#include <xml/dom/xmlengelement.h>
 
 class WsXmlUtils
 {
--- a/webservices/wsfragment/src/rsendocument.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsfragment/src/rsendocument.cpp	Sun May 30 23:54:06 2010 +0530
@@ -21,8 +21,8 @@
 
 
 #include "RSenDocument.h"
-#include <xmlengxestd.h>
-#include <xmlengdomimplementation.h>
+#include <xml/utils/xmlengxestd.h>
+#include <xml/dom/xmlengdomimplementation.h>
 
 LOCAL_C void CleanupRSenDocument(TAny* aDocumentData)
 	{
--- a/webservices/wsfragment/src/sendomfragmentbase.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsfragment/src/sendomfragmentbase.cpp	Sun May 30 23:54:06 2010 +0530
@@ -24,7 +24,7 @@
 
 // INCLUDE FILES
 #include "SenDomFragmentBase.h"
-#include <xmlengserializationoptions.h> // needed for TSerializationOptions
+#include <xml/dom/xmlengserializationoptions.h> // needed for TSerializationOptions
 
 
 EXPORT_C CSenDomFragmentBase* CSenDomFragmentBase::NewL()
--- a/webservices/wsfragment/src/senfragmentbase.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsfragment/src/senfragmentbase.cpp	Sun May 30 23:54:06 2010 +0530
@@ -34,9 +34,9 @@
 
 #include <xml/attribute.h>               // needed for RAttributeArray
 #include <xml/parserfeature.h>           // for TParserFeature enumeration
-#include <xmlengserializationoptions.h> // for TSerializationOptions
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializationoptions.h> // for TSerializationOptions
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
 
 
 typedef unsigned char xmlChar; // from "libxml/Libxml2_xmlstring.h"
--- a/webservices/wsfragment/src/wslibxml2utils.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsfragment/src/wslibxml2utils.cpp	Sun May 30 23:54:06 2010 +0530
@@ -24,10 +24,10 @@
 
 #include "wslibxml2utils.h"
 
-#include <libxml2_globals.h>
-#include <xmlengelement.h>
-#include <xmlengerrors.h>
-#include <xmlengxestd.h>
+#include <stdapis/libxml2/libxml2_globals.h>
+#include <xml/dom/xmlengelement.h>
+#include <xml/dom/xmlengerrors.h>
+#include <xml/utils/xmlengxestd.h>
 
 #define INTERNAL_NODEPTR(aNodeObject)   (*reinterpret_cast<xmlNodePtr*>(&(aNodeObject)))
 #define INTERNAL_NSPTR(aNsDefObject)    (*reinterpret_cast<xmlNsPtr*>(&(aNsDefObject)))
--- a/webservices/wsframework/group/senframework.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/group/senframework.mmp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/inc/senmtomutils.h	Sun May 30 23:54:06 2010 +0530
@@ -22,16 +22,16 @@
 #define SEN_MTOM_UTILS_H
 
 #include <e32math.h>
-#include <imcvcodc.h>
+
 
 #include <SenSoapEnvelope2.h>
 #include <RSenDocument.h>
 
-#include <xmlengserializer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
 
 // CONSTANTS
 _LIT(KMtomNoRequestSoapEnvelopePanicText, "NULL MTOM request soap envelope");
--- a/webservices/wsframework/inc/senmultipartutils.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/inc/senmultipartutils.h	Sun May 30 23:54:06 2010 +0530
@@ -32,11 +32,11 @@
 #include "senatomentry.h"
 #include <RSenDocument.h>
 
-#include <xmlengserializer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengbinarycontainer.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
+#include <xml/dom/xmlengnodelist.h>
 
 // CONSTANTS
 _LIT(KMultiPartNoRequestMessagePanicText, "NULL MultiPart request message");
--- a/webservices/wsframework/src/saslmechanism.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/src/saslmechanism.cpp	Sun May 30 23:54:06 2010 +0530
@@ -124,6 +124,11 @@
 EXPORT_C void CSaslMechanism::SetTransforms(
                         RPointerArray<CSenPasswordTransform> aList)
     {
+	//deallocate the original objects and the array itself which were owned
+	if(iTransforms.Count())
+		{
+		iTransforms.ResetAndDestroy();
+		}
     iTransforms = aList;
     }
 
--- a/webservices/wsframework/src/senservicesession.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/src/senservicesession.cpp	Sun May 30 23:54:06 2010 +0530
@@ -50,10 +50,12 @@
     iFramework(aFramework),
     ipTransport(NULL)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel ,"CSenServiceSession::CSenServiceSession()");
     }
 
 EXPORT_C CSenServiceSession::~CSenServiceSession()
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel ,"CSenServiceSession::~CSenServiceSession()");
     // The REMOTE consumers are also sessions which are
     // owned by XMLDAO or ClientSession
     iConsumerList.Reset();
@@ -562,6 +564,7 @@
         {
         if(!(thisFrameworkId.Length()>0 && patternFrameworkId == thisFrameworkId))
             {
+            TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CSenServiceSession::Matches() - Framework Id not same returning EFalse");
             return EFalse;
             }
         }
--- a/webservices/wsframework/src/sensyncrequester.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/src/sensyncrequester.cpp	Sun May 30 23:54:06 2010 +0530
@@ -148,7 +148,11 @@
                                      MSenProperties* /*aResponseTransportProperties*/)
     {
     // NONE of the errors between transport and session are handled in this level:
-    delete apError;
+    if(apError)
+    	{
+    	delete apError;
+    	apError = NULL;
+    	}
     return aErrorCode; // simply bounce the error back to the caller
     }
 
@@ -176,7 +180,8 @@
         }
     // Now stop the SYNC wait in the SubmitL, so that the main thread 
     // of the Serene Core Active Scheduler can continue it's execution
-    iSchedulerWait.AsyncStop();
+    if(iSchedulerWait.IsStarted())
+    	iSchedulerWait.AsyncStop();
     return aTxnId;
     }
 
@@ -195,7 +200,8 @@
         }
     // Now stop the SYNC wait in the SubmitL, so that the main thread 
     // of the Serene Core Active Scheduler can continue it's execution
-    iSchedulerWait.AsyncStop();
+    if(iSchedulerWait.IsStarted())
+    	iSchedulerWait.AsyncStop();
     return aTxnId;
     }
 
--- a/webservices/wsframework/src/senwebservicesession.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsframework/src/senwebservicesession.cpp	Sun May 30 23:54:06 2010 +0530
@@ -39,7 +39,7 @@
 #include "senservicepolicy.h"
 #include "seninternalcredential.h"
 #include "sensaxutils.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 #include <SenIdentityProvider.h>
 #include "senlogger.h"
 #include <SenXmlConstants.h>
@@ -91,7 +91,7 @@
 
 EXPORT_C void CSenWebServiceSession::ConstructL()
     {
-
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,_L("CSenWebServiceSession::ConstructL()"));
     // Sets the local name to "ServiceDescription"
     // and initiates the inner ipElement
     CSenServiceSession::BaseConstructL();
@@ -103,6 +103,7 @@
 
 EXPORT_C CSenWebServiceSession::~CSenWebServiceSession()
     {
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,_L("CSenWebServiceSession::~CSenWebServiceSession()"));
     delete iSecurity;
     delete iContract;
     delete iEndpoint;
@@ -631,6 +632,7 @@
                                                            MSenRemoteServiceConsumer& aConsumer,
                                                            MSenProperties* aResponseTransportProperties )
     {
+    CSLOG_FORMAT((aConsumer.ConnectionId() , KMinLogLevel, _L8("CSenWebServiceSession::SendErrorToConsumerL - aErrorCode [%d]"), aErrorCode));
     CleanupStack::PushL(apError);
     TInt retVal(KErrNone);
 
@@ -2120,6 +2122,7 @@
     
 EXPORT_C  TInt CSenWebServiceSession::AddCredentialObserverL(CSenInternalCredential& aCredential)
 {
+	TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL()"));
 	TInt error(KErrNone);
 	RSenCredentialPtr credentialPtr = 
 	((MSenServiceManager&)iFramework.Manager()).CredentialL(
@@ -2151,7 +2154,7 @@
 	}
     CredentialChanged(MSenCredentialObserver::EAdded, NULL);      
 	SetStatusL();
-
+	TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL() Completed"));
 	return KErrNone;
 }
 
--- a/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshostletconnection/src/senregistrationtimer.cpp	Sun May 30 23:54:06 2010 +0530
@@ -74,7 +74,8 @@
 	if (!IsActive())
         {
         iTimer.After( iStatus, interval );
-        SetActive();
+        if(!IsActive())
+        	SetActive();
         }
     }
 
--- a/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp	Sun May 30 23:54:06 2010 +0530
@@ -115,6 +115,11 @@
 LIBRARY         HttpFilterCommon.lib
 LIBRARY         netmeta.lib
 
+#ifndef __ENABLE_ALR__
+LIBRARY  		platformver.lib //extendedconnpref.h
+LIBRARY  		extendedconnpref.lib //extendedconnpref.h
+#endif
+
 #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES
 // WSF libraries:
 LIBRARY         SenServDesc.lib
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h	Sun May 30 23:54:06 2010 +0530
@@ -158,7 +158,9 @@
     virtual void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec) = 0;
     virtual void DisableTimeOutL(TInt aTxnId) = 0;
     virtual TInt32 UsedIap() = 0;
-    
+    virtual void ResetIapId() = 0;
+    virtual void ResetUsedIapId() = 0;
+    virtual void SetExplicitIapDefined(TBool aExplicitIapDefined) = 0;
     };
 
 #endif // SEN_HTTP_CHANNEL_H
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h	Sun May 30 23:54:06 2010 +0530
@@ -107,7 +107,7 @@
     TInt CancelTransaction(const TInt aTxnId);
     void CancelAllTransactions();
 
-    void SetExplicitIapDefined(TBool aExplicitIapDefined);
+    virtual void SetExplicitIapDefined(TBool aExplicitIapDefined);
     /*
     * Getter for currently effective IAP ID
     * @param aIapId will be assigned to hold
@@ -131,6 +131,8 @@
     void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec);
     void DisableTimeOutL(TInt aTxnId);
     virtual TInt32 UsedIap();
+    virtual void ResetIapId();
+    virtual void ResetUsedIapId();
     
 protected:
     CSenHttpChannelImpl(MSenIdentityManager& aManager);
@@ -160,8 +162,10 @@
 private:
     
     // New functions
-    
-    
+
+	TInt SetID(TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP = EFalse);
+	TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor);
+	TBool IsOCCImplementedSDK();	
     TPtrC8 SoapActionL(MSenElement& aSoapEnvelope);
     TInt SubmitRequestL(MSenResponseObserver& aObserver,
                         const TDesC8& aUri,
@@ -210,6 +214,9 @@
     TBool iHasHttpContentType;
     SenMultiPartUtils::TMultiPartContentType iMultiPartContentType; // content type of MultiPart response
     RHTTPTransaction iHttpTransaction ;
+#ifndef __ENABLE_ALR__    
+    TBool iOCCenabled ;
+#endif    
     };
 
 #endif //SEN_HTTP_CHANNEL_IMPL_H
--- a/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h	Sun May 30 23:54:06 2010 +0530
@@ -303,6 +303,7 @@
         //RFileLogger iLogger;
         TInt iStatusCode; // containts latest error or zero
 		TSenDataTrafficDetails iDetails;
+		TBool iIsConnectionFailed;
     };
 
 #endif // SEN_HTTP_CHANNEL_TRANSPORT_PLUGIN_H
--- a/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp	Sun May 30 23:54:06 2010 +0530
@@ -16,25 +16,16 @@
 */
 
 
-
-
-
-
-
-
-
-
-
 #include <uri8.h>
 #include <es_sock.h>
 #include <in_sock.h>
 #include <http.h>
 
 #include "sendebug.h" // filelogging and debugging MACROS
-#include "senserviceconnection.h" // KErrSenNoHttpResponseBody
-#include "senelement.h"
-#include "senxmlutils.h"
-#include "senhttptransportproperties.h"
+#include "SenServiceConnection.h" // KErrSenNoHttpResponseBody
+#include "SenElement.h"
+#include "SenXmlUtils.h"
+#include "SenHttpTransportProperties.h"
 #include "senhttpchannelimpl.h"
 #include "senhttpeventhandler.h"
 #include "sentxnstate.h"
@@ -52,6 +43,11 @@
 #include <httpfiltercommonstringsext.h>
 #include <deflatefilterinterface.h>
 
+#ifndef __ENABLE_ALR__
+#include <versioninfo.h>  // VersionInfo
+#include <extendedconnpref.h>
+#endif
+
 // CONSTANTS
 namespace
     {
@@ -85,7 +81,11 @@
     iProxyHostPort(NULL),
     iXopResponse(EFalse),
     iHasHttpContentType(ETrue)
+#ifndef __ENABLE_ALR__
+    , iOCCenabled(EFalse)
+#endif    
     {
+//    IsOCCImplementedSDK();
     }
 
 CSenHttpChannelImpl* CSenHttpChannelImpl::NewL(MSenIdentityManager& aManager)
@@ -120,41 +120,94 @@
     return pNew;
     }
 
+#ifndef __ENABLE_ALR__
+// On return, aMajor and aMinor contain the version information
+TInt CSenHttpChannelImpl::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor)
+	{   
+	TInt ret = KErrNone;
+	// Connect to the file server session
+	RFs fsSession;
+	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()")));	
+	ret = fsSession.Connect();
+	if(ret == KErrNone)
+		{
+		CleanupClosePushL(fsSession); // Obtain the version numberTUint major;
+		VersionInfo::TPlatformVersion platformVersion;  
+		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "--- GetS60PlatformVersion getting Version info");		
+		ret = VersionInfo::GetVersion(platformVersion, fsSession);   
+		CleanupStack::PopAndDestroy();  // fsSession		
+		if (ret == KErrNone)       
+			{     
+			aMajor = platformVersion.iMajorVersion;  
+			aMinor = platformVersion.iMinorVersion;   
+		   	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor));
+			}		
+		}
+	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret));
+	return ret;
+	}
+
+// On return, aMajor and aMinor contain the version information
+TBool CSenHttpChannelImpl::IsOCCImplementedSDK()
+	{   
+	TBool occ = EFalse;
+	// Obtain the version number
+	TUint major;
+	TUint minor;	
+	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()")));		
+	TInt ret = GetS60PlatformVersion(major, minor);
+	if (ret == KErrNone)
+		{
+		if(major == 5 && minor == 2)
+			{
+			occ = ETrue;
+			iOCCenabled = ETrue;
+			TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE")));
+			}
+		else
+			{
+			TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns False")));
+			}
+		}
+	return occ;
+	}
+#endif	
+
 // Ask IAP from user
 void CSenHttpChannelImpl::ConstructL()
     {
-    // Open connection to the file logger server
-    TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile);
-    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL - Log file opened")));
-
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL()")));
+    	
     // Open the RHTTPSession
-    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("- Opening HTTP/TCP session.")));
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Opening HTTP/TCP session.")));
 
     iSess.OpenL();
 
     // Store the string pool for this HTTP session
     iStringPool = iSess.StringPool();
-
+	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Calling InstallAuthenticationL()")));
     // Install this class as the callback for authentication requests
     InstallAuthenticationL( iSess );
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Completed InstallAuthenticationL()")));
     //Install Proxy Filter  
     iDeflateFilter = EFalse;
 
 #ifdef EKA2
   //#ifndef _DEBUG 
+  	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing  HTTPProxyFilter for EKA2 build.")));
     CHttpFilterProxyInterface::InstallFilterL( iSess );
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPProxyFilter installed for EKA2 build.")));
     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetLanguageTable());
     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetTable());
-
-    CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess);
-    TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter installed for EKA2 build.");
-    TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptFilter installed for EKA2 build.");
+	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing  HTTPAcceptProxyFilter for EKA2 build.")));
+    //CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess); //There is issue with installing this filter. so disabling it temporarly
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPAcceptProxyFilter installed for EKA2 build.")));
   //#else
   //  LOG_WRITE_L("HTTPProxyFilter is NOT in use with EKA2 debug builds.");
   //#endif
 #else // __INSTALL_HTTP_PROXY_FILTER__ is not defined by macro in .mmp
-    TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter is NOT in use with EKA1.");
-    TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1.");
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPProxyFilter is NOT in use with EKA1.");
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1.");
 #endif // __INSTALL_HTTP_PROXY_FILTER__
 
     iTransObs = CSenHttpEventHandler::NewL(this);//, &iLog);
@@ -162,10 +215,15 @@
         new (ELeave) CArrayPtrFlat<CSenTxnState>(KMinimumArrayGranularity);
 
     iBasicConnectionTries = 0;
+    
+#ifndef __ENABLE_ALR__
+    IsOCCImplementedSDK();
+#endif    
 
 #ifdef _SENDEBUG
     ListFilters();
 #endif // _SENDEBUG
+	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() Completed")));
     }
 
 // Forces preselected IAP to be used!
@@ -183,10 +241,14 @@
 //    Use local variable (new RSocketServer each time; handle is given to RHTTPSession via RConnectionInfo..)
 //    RSocketServ server; // with "anon" (local) socket servers, should we keep array of open ones in case of pending txns?
 //    SetIapPrefsL(aIapId, iConnection, server);
-
-    const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ);
-    User::LeaveIfError( result );
-    
+#ifndef __ENABLE_ALR__
+	IsOCCImplementedSDK();
+#endif	
+	if(aIapId > 0)
+		{
+    	const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ);
+    	User::LeaveIfError( result );
+    	}
     }
 
 CSenHttpChannelImpl::~CSenHttpChannelImpl()
@@ -223,137 +285,55 @@
         
     iConnection.Close();
     iSockServ.Close();
-
-    // Close the log file and the connection to the server.
-    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("Log file closed.")));
-    TLSLOG_CLOSE(KSenHttpChannelLogChannelBase);
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::~CSenHttpChannelImpl() Completed");
     }
 
-// This function expects that RConnection has been connected
-// and that RConnection has already been opened!
-/*
-void CSenHttpChannelImpl::SetIapPrefsL(TUint32 aIapId, 
-                                       RConnection& aConnection, 
-                                       RSocketServ& aSocketServer)
-    {
+TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
+   	{
+   	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL	, aIapId (%d)"), aIapId));
+   	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL	, iIapId (%d)"), iIapId));
+   	
     // Check whether IAP ID is not equal with the one that is currently in effect:
-    if(iExplicitIapDefined && iIapId == aIapId )
+    if(iExplicitIapDefined || iIapId == aIapId && iIapId > 0)
         {
-        return; // nothing to do
+        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect");
+        return KErrNone;
         }
-        
-    LOG_WRITEFORMAT((_L8("- SetIapPrefsL: Re-setting IAP ID (%d)"), aIapId));
+	else
+		{
+		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect");
+		}    
+    
 
     // Check if socket server (connection) is already open..
     if( iExplicitIapDefined )
         {
          // Socket server opened once before for some other IAP
-        LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
         aConnection.Stop();
         }
     else
         {
-        aConnection.Stop(); // prompted from user
-        iSess.DisconnectL();
-        iSess.ConnectL();
-
-        // Connect to a socket server    
-        LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server");    
-        User::LeaveIfError(aSocketServer.Connect());       
-
-        // Open new connection
-        LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server.");       
-        User::LeaveIfError(aConnection.Open(aSocketServer)); 
+        if(aConnection.SubSessionHandle())
+        	{
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+        	aConnection.Stop();
+        	}
+        else
+            {
+            // Connect to a socket server    
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server");    
+            User::LeaveIfError( aSocketServer.Connect() );       
+    
+            // Open new connection
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server.");       
+            User::LeaveIfError( aConnection.Open(aSocketServer) );        
+            }
         }
         
-    // Set the IAP selection preferences (IAP ID, do not prompt)
-    TCommDbConnPref pref;
-    pref.SetIapId( aIapId );    
-
-    TCommDbDialogPref dialogPref;
-    dialogPref = ECommDbDialogPrefDoNotPrompt;
-    pref.SetDialogPreference(dialogPref);
-    
-    // Start the connection with the new preferences
-    LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
-    aConnection.Start(pref);
-    
-    // Get the connection "handle" from the HTTP session    
-    RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
-     
-    // Attach socket server
-    connInfo.SetPropertyL(iStringPool.StringF(  HTTP::EHttpSocketServ,
-                                                RHTTPSession::GetTable()),
-                                                THTTPHdrVal(aSocketServer.Handle()));
-    
-    // Attach connection  
-    TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
-    connInfo.SetPropertyL(iStringPool.StringF(  HTTP::EHttpSocketConnection, 
-                                                RHTTPSession::GetTable()), 
-                                                THTTPHdrVal(connPtr));
-                                                
-    // Remember the IAP id that is being set; there is
-    // no direct API to query effective IAP ID from CommsDB.
-    iExplicitIapDefined = ETrue;
-    iIapId = aIapId;
-    }
-*/
-
-
-/*
-void CSenHttpChannelImpl::SetupConnectionWithIapPrefsL( TUint32 aIapId, 
-                                                        RConnection& aConnection, 
-                                                        RSocketServ& aSocketServer )
-    {
-    // Check whether IAP ID is not equal with the one that is currently in effect:
-    if(iExplicitIapDefined && iIapId == aIapId )
-        {
-        return; // nothing to do
-        }
-        
-    LOG_WRITEFORMAT((_L8("- SetIapPrefsL, IAP ID (%d)"), aIapId));
-
-    // Check if socket server (connection) is already open..
-    if( iExplicitIapDefined )
-        {
-         // Socket server opened once before for some other IAP
-        LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
-        aConnection.Stop();
-        }
-    else
-        {
-        // Connect to a socket server    
-        LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server");    
-        User::LeaveIfError( aSocketServer.Connect() );       
-
-        // Open new connection
-        LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server.");       
-        User::LeaveIfError( aConnection.Open(aSocketServer) ); 
-        }
-        
-    // Set the IAP selection preferences (IAP ID, do not prompt)
-    TCommDbConnPref pref;
-    pref.SetIapId( aIapId );    
-
-    TCommDbDialogPref dialogPref;
-    dialogPref = ECommDbDialogPrefDoNotPrompt;
-    pref.SetDialogPreference(dialogPref);
-    
-    // Start the connection with the new preferences
-    LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
-    aConnection.Start(pref);
-    }
-    
-
-void CSenHttpChannelImpl::AttachSocketServerAndConnectionWithHttpSession( TUint32 aIapId, 
-                                                                          RConnection& aConnection, 
-                                                                          RSocketServ& aSocketServer )
-    {
-    if(iExplicitIapDefined && iIapId == aIapId )
-        {
-        return; // nothing to do
-        }
-
+    // Set the IAP selection preferences (IAP ID, do not prompt)    
+	TInt retVal = SetID(aIapId, aDialogPref, aConnection, aSocketServer);	        
+	
     // Get the connection "handle" from the HTTP session    
     RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
      
@@ -366,134 +346,198 @@
     TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
     connInfo.SetPropertyL(iStringPool.StringF(  HTTP::EHttpSocketConnection, 
                                                 RHTTPSession::GetTable()), 
-                                                THTTPHdrVal(connPtr));
-                                                
-    // Remember the IAP id that is being set, because *at the moment*,
-    // there is NO direct API to query effective IAP ID from CommsDB.
-    iExplicitIapDefined = ETrue;
-    iIapId = aIapId;
-    }
-    
-
-void CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, RConnection& aConnection, RSocketServ& aSocketServer )
-    {
-    SetupConnectionWithIapPrefsL( aIapId, aConnection, aSocketServer );
-    AttachSocketServerAndConnectionWithHttpSession( aIapId, aConnection, aSocketServer );
-    }        
-*/
-
-
-TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
-   	{
-   	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KNormalLogLevel, _L8("- SetIapPrefsL, IAP ID (%d)"), aIapId));
-   	
-    // Check whether IAP ID is not equal with the one that is currently in effect:
-    if(iExplicitIapDefined && iIapId == aIapId )
-        {
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect");
-        return KErrNone;
-        }
-		else
-				{
-				TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect");
-				}    
-    
-
-    // Check if socket server (connection) is already open..
-    if( iExplicitIapDefined )
-        {
-         // Socket server opened once before for some other IAP
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
-        aConnection.Stop();
-        }
-    else
-        {
-        // Connect to a socket server    
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server");    
-        User::LeaveIfError( aSocketServer.Connect() );       
-
-        // Open new connection
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server.");       
-        User::LeaveIfError( aConnection.Open(aSocketServer) ); 
-        }
-        
-    // Set the IAP selection preferences (IAP ID, do not prompt)
-    /*
-    *Single click connectivity feature has been implemented by CSock (RConnection class).
-    *According to this client no need to set the IAP ID. 
-    *Automatically RConnection will use the suitable IAP
-    */
-    
-
-	    TCommDbConnPref pref;
-    #ifndef __SINGLE_CLICK_CONNECTIVITY_ENABLED__	    
-	    pref.SetIapId( aIapId );
-		#else
-			pref.SetIapId( 0 );	 //By default IAP ID is "0". IAP selection will take care by RConnection
-    #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__	    
-	    TCommDbDialogPref dialogPref;
-	    
-	    if (aDialogPref)
-	        {
-	        dialogPref = ECommDbDialogPrefDoNotPrompt;
-	        }
-	    else
-	        {
-	        dialogPref = ECommDbDialogPrefPrompt;
-	        }     
-	    pref.SetDialogPreference(dialogPref);
-    
-  	// Start the connection with the new preferences
-	  TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Calling RConnection::Start with new IAP prefs");
-
-    TInt retVal =aConnection.Start(pref);
-    
-		TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal));
-		        
-    // Get the connection "handle" from the HTTP session    
-    RHTTPConnectionInfo connInfo = iSess.ConnectionInfo();
-     
-    // Attach socket server
-    connInfo.SetPropertyL(iStringPool.StringF(  HTTP::EHttpSocketServ,
-                                                RHTTPSession::GetTable()),
-                                                THTTPHdrVal(aSocketServer.Handle()));
-    
-    // Attach connection  
-    TInt connPtr = REINTERPRET_CAST(TInt, &aConnection);
-    connInfo.SetPropertyL(iStringPool.StringF(  HTTP::EHttpSocketConnection, 
-                                                RHTTPSession::GetTable()), 
-                                                THTTPHdrVal(connPtr));
-                                                
-    // Remember the IAP id that is being set, because *at the moment*,
-    // there is NO direct API to query effective IAP ID from CommsDB.
-    if (!retVal)
-        {
-        #ifdef __SINGLE_CLICK_CONNECTIVITY_ENABLED__
-        	//Since we are using by default setIapId "0".
-        	//There won't be any explicitly defined Iap Id
-        	iExplicitIapDefined = EFalse;
-        	iIapId = 0;
-				#else        	
-        	iExplicitIapDefined = ETrue;
-        	iIapId = aIapId;
-        #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__
-        }
+                                                THTTPHdrVal(connPtr));                                                    
     return retVal;
     }
+
+TInt CSenHttpChannelImpl::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP)
+{
+   /*
+    * Single click connectivity feature has been implemented by CSock (RConnection class).
+    * According to this client no need to set the IAP ID. 
+    * Automatically RConnection will use the suitable IAP
+    */
+    TInt retVal = KErrNone;
+    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl  called with ID [%d]"), aId));
+	    
+#ifndef __ENABLE_ALR__	    
+	if (iOCCenabled == EFalse)	    
+		{
+#endif		
+		if (aSNAP == EFalse)
+			{
+			TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetIAPID");
+		    TCommDbConnPref pref;		
+			pref.SetIapId( aId );
+			TCommDbDialogPref dialogPref;
+		    if (aDialogPref)
+		        {
+		        dialogPref = ECommDbDialogPrefDoNotPrompt;
+		        }
+		    else
+		        {
+		        dialogPref = ECommDbDialogPrefPrompt;
+		        }
+	    	pref.SetDialogPreference(dialogPref);
+	    	retVal = aConnection.Start(pref);
+			TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal));
+			}
+		else
+			{
+			TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetSNAPID");
+			// Set the SNAP selection preferences (SNAP ID)
+		    TConnSnapPref pref;
+		    pref.SetSnap(aId);		    
+		    // Start the connection with the new preferences
+		    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs");
+		    TInt retVal = aConnection.Start(pref);
+			}
+#ifndef __ENABLE_ALR__			
+		}   
+	else
+		{
+		if (aSNAP == EFalse)
+			{
+			/* If IAP id is zero, it is interpreted as
+		    * client's request for not requesting any specific IAP.
+		    * Default value is 0.
+		    * 
+		    * If IAP id is set, SNAP id shall be zero.
+		    * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+		    * If IAP id is set, Connection selection dialog shall be disabled.
+		    * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown.
+		    * If IAP id is set, forced roaming is disabled automatically.
+		    * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+		    * selection dialog shall be enabled.
+		    */
+		    
+		    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with IAP Settings");
+			TConnPrefList prefList;
+			TExtendedConnPref extPrefs;
+			//extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+			//TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection");
+			//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+			//extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+			if(aId != 0)
+				{
+				extPrefs.SetIapId(aId);
+				extPrefs.SetSnapId(0);
+				}
+			else
+				{
+				extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+				extPrefs.SetConnSelectionDialog(ETrue);
+				}
+			prefList.AppendL(&extPrefs);
+			retVal = aConnection.Start(prefList);
+			if(retVal == KErrNone)
+			    {
+			    if(aId == 0)
+			    	{
+                    aConnection.GetIntSetting( _L("IAP\\Id"), iIapId);
+                    TName name;
+                    retVal = aConnection.Name(name);
+                    if(retVal == KErrNone)
+                        {
+                        TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name));
+                        }
+                    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId));			    
+			    	}
+			    else
+			    	{	
+			    	iIapId = aId;
+			    	}
+			    }
+			 else
+			    {
+                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP ->Start retVal [%d]"), retVal));
+			    }
+		    }
+		else
+		    {
+		    /**
+		    * Sets SNAP id. If SNAP id is zero, it is interpreted as 
+		    * client's request for not requesting any specific SNAP.
+		    * Default value is 0.
+		    *
+		    * If SNAP id is set, IAP id shall be zero.
+		    * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown.
+		    * If SNAP id is set, Connection selection dialog shall be disabled.
+		    * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection
+		    * selection dialog shall be enabled.
+		    */
+			TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with SNAP Settings");
+			TConnPrefList prefList;
+			TExtendedConnPref extPrefs;
+			//extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown);
+			//TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection");
+			//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+			//extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown);
+			if(aId == 0)
+				{
+				TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting SnapPurpose Internet");
+				if(aDialogPref) //If it fails because of unavailibility of access points
+					{
+					TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Fails because of unavailibility of access points");
+					extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+					extPrefs.SetConnSelectionDialog(ETrue);
+					}
+				else
+					{
+					extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+					//extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);					
+					}
+				}
+			else
+				{
+				extPrefs.SetSnapId(aId);
+				extPrefs.SetIapId(0);	
+				extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown);
+				extPrefs.SetConnSelectionDialog(EFalse);
+				}
+			prefList.AppendL(&extPrefs);
+			TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "SetID: RConnection Start");
+			retVal = aConnection.Start(prefList);
+			TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection Start retval[%d]"), retVal));
+			if(retVal == KErrNone)
+				{
+				aConnection.GetIntSetting( _L("IAP\\Id"), iIapId);
+				TName name;
+				retVal = aConnection.Name(name);
+				if(retVal == KErrNone)
+					{
+					TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name));
+					}
+				TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId));
+				}
+			 else
+			    {
+				TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("SNAP ->Start retVal [%d]"), retVal));
+			    }				
+		    }
+		}    
+#endif    
+    if (!retVal && !aSNAP)
+        {
+        iExplicitIapDefined = ETrue;
+        }	
+	return retVal;
+}
+
 TInt CSenHttpChannelImpl::SetSnapPrefsL( TUint32 aSnapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer )
     {
     TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- CSenHttpChannelImpl::SetSnapPrefsL, SNAP ID (%d)"), aSnapId));
 		// Check whether SNAP ID is not equal with the one that is currently in effect:
-    if(iExplicitIapDefined && iSnapId == aSnapId )
+    if(iExplicitIapDefined && iSnapId == aSnapId)
         {
         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is same as currently in effect");
         return KErrNone;
         }
-		else
-			{
-			TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect");
-			}        
-
+	else
+		{
+		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect");
+		}
+	
     // Check if socket server (connection) is already open..
     if( iExplicitIapDefined )
         {
@@ -503,22 +547,27 @@
         }
     else
         {
-        // Connect to a socket server    
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server");    
-        User::LeaveIfError( aSocketServer.Connect() );       
-
-        // Open new connection
-        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server.");       
-        User::LeaveIfError( aConnection.Open(aSocketServer) ); 
+        if(aConnection.SubSessionHandle())
+        	{
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop");
+        	aConnection.Stop();
+        	}
+        else
+            {
+            // Connect to a socket server    
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server");    
+            User::LeaveIfError( aSocketServer.Connect() );       
+    
+            // Open new connection
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server.");       
+            User::LeaveIfError( aConnection.Open(aSocketServer) );         
+            }
         }
         
-    // Set the SNAP selection preferences (SNAP ID)
-    TConnSnapPref pref;
-    pref.SetSnap(aSnapId);     
+        
+	// Set the SNAP selection preferences (SNAP ID, do not prompt)    
+	TInt retVal = SetID(aSnapId, aDialogPref, aConnection, aSocketServer, ETrue);
     
-    // Start the connection with the new preferences
-    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs");
-    TInt retVal = aConnection.Start(pref);
     TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetSnapPrefsL, RConnection::Start returned: (%d)"), retVal));
     
     // Get the connection "handle" from the HTTP session    
@@ -539,7 +588,7 @@
     // there is NO direct API to query effective SNAP ID from CommsDB.
     if (!retVal)
         {
-        iExplicitIapDefined = ETrue;
+        //iExplicitIapDefined = ETrue;
         iSnapId = aSnapId;
         }
     return retVal;
@@ -669,42 +718,64 @@
     RStringF method;
     TPtrC8 deflate;
     // Set IAP preferences, if such exist in properties (and not already in effect):
-    TUint32 iapId(KErrNone);
-    TBool doNotPrompt(ETrue); 
+    TUint32 id(KErrNone);
+    TBool prompt(ETrue); 
     
-    TInt retVal = aProps.IAPDialogL( doNotPrompt );
+    TInt retVal = aProps.IAPDialogL( prompt );
     if ( retVal != KErrNone )
         {
         // by default, do not prompt (even if property does not exist!) 
         // => only if property is set, and has value "FALSE", show PROMPT            
-        doNotPrompt = ETrue;
+        prompt = ETrue;
         }
-
+	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL - iIapId [%d]"), iIapId)); 
+#ifndef __ENABLE_ALR__
+		TInt propRetVal = aProps.IapIdL(id);
     // Independent of dialog preference (property's existance), if IAP was predefined, it must be set        
-    if(((aProps.IapIdL(iapId)) == KErrNone))
+    if(propRetVal == KErrNone)
         {
-        retVal = SetIapPrefsL(iapId, doNotPrompt, iConnection, iSockServ);
+        TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - id [%d]"), id));
+        retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ);
         }
-    else if(((aProps.SnapIdL(iapId)) == KErrNone))
+    else if(iIapId > 0)
         {
-        retVal = SetSnapPrefsL(iapId, doNotPrompt, iConnection, iSockServ);
+        TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - iIapId [%d]"), iIapId)); 
+        retVal = SetIapPrefsL(iIapId, prompt, iConnection, iSockServ);
+        }
+    else if(((aProps.SnapIdL(id)) == KErrNone))
+        {
+        retVal = SetSnapPrefsL(id, prompt, iConnection, iSockServ);
         }
     else//to better control RConnection, we have to call Start by ourselve
         {
         retVal = SetSnapPrefsL(0, EFalse, iConnection, iSockServ);
         if(retVal == KErrNotFound)
             {
-            retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ);
+            if(iOCCenabled == EFalse)
+		        {
+	    	    retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ);	
+	        	}
+        	else
+	        	{
+	        	retVal = SetSnapPrefsL(0, prompt, iConnection, iSockServ);	
+	        	}
             }
         }
     TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Set Snap/IAP prefs retVal [%d]"), retVal));    
     User::LeaveIfError(retVal);
     TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::InvokeHttpMethodL After User::Leave");
-    TInt ret=iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId);
+    //TInt ret= iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId);
+    iUsedIapId = iIapId;
     // Check transport properties
+    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id));
+#else
+	retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ);
+	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id));	
+	iUsedIapId = id;
+#endif
+    
     CSenLayeredHttpTransportProperties::TSenHttpMethod httpMethod;
-    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP %d"), iapId));
-    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("DONT PROMPT %d"), doNotPrompt));
+    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("PROMPT %d"), prompt));
     TInt retValHttpMethod = aProps.HttpMethodL(httpMethod);
     
     
@@ -1014,11 +1085,13 @@
     // It is MANDATORY, that at least one Accept header TOKEN exists:
   if ( tokens.Count()==0 )
         {
+        TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::AddRequestHeadersL Default Token")));
         TPtrC8* pDefaultToken = new (ELeave) TPtrC8( KSenHttpChannelAcceptHeaderDefault );
         TInt error = tokens.Append( pDefaultToken );
         if ( error )
             {
             delete pDefaultToken;
+            pDefaultToken = NULL;
             }
         }
     // Http headers
@@ -1050,8 +1123,7 @@
                     }
 
                 TPtrC8 value = property->Value();
-                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"),
-                    &name, &value));
+                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"), &name, &value));
 
                 // Open stringpool strings
                 RStringF headerName = iStringPool.OpenFStringL(name);
@@ -1064,8 +1136,7 @@
                 // Check if the header field value already exists
                 TBool fieldValueExists = EFalse;
                 TInt fieldCount = aHeaders.FieldPartsL(headerName);
-                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name,
-                                        fieldCount));
+                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name, fieldCount));
 
                 for(TInt j=0; j<fieldCount; j++)
                     {
@@ -1087,8 +1158,7 @@
                 if(!fieldValueExists)
                     {
                     aHeaders.SetFieldL(headerName, headerFieldVal);
-                    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S: %S > added"),
-                                       &name, &value));
+                    TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S: %S > added"),&name, &value));
                     }
 
                 // Close stringpool strings
@@ -1143,8 +1213,7 @@
                 {
 #ifdef _SENDEBUG
                 const TDesC8& hValStr = hVal.StrF().DesC();
-                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"),
-                                   &hValStr));
+                TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"), &hValStr));
 #endif // _SENDEBUG
                 if(hVal == headerFieldVal)
                     {
@@ -1558,6 +1627,7 @@
 void CSenHttpChannelImpl::HandleRunErrorL(RHTTPTransaction aTransaction,
                                           TInt aError)
     {
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL()");
     TInt txnId = aTransaction.Id();
     TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::HandleRunErrorL( %d ): %d"),txnId, aError));
     CSenTxnState* pTxnState = FindTxnState(txnId);
@@ -1568,6 +1638,7 @@
     pTxnState->ResponseErrorL(aError);
     DeleteTxnState(txnId);
     aTransaction.Close();
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL() Completed");
     }
 
 void CSenHttpChannelImpl::HandleRedirectRequiresConfirmationL(
@@ -1875,19 +1946,25 @@
 
 TBool CSenHttpChannelImpl::EffectiveIapId( TUint32 &aIapId )
     {
-	TInt handle = iConnection.SubSessionHandle();
+    /*
+		TInt handle = iConnection.SubSessionHandle();
 		if (handle>0)
-	    {
+		    {
+				TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), handle ));	    
         TUint connEnum(0);
         TInt err = iConnection.EnumerateConnections(connEnum);
+        TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId -  EnumerateConnections retVal [%d]"), err ));
         if (!err && !connEnum)
             {
+            TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId returns");
             return EFalse;
             }
-	    }
-
-	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), iIapId ));
-#ifdef _SENDEBUG
+		    }
+	    else
+		    {
+		    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized.");	
+		    }
+		*/
 	if( iExplicitIapDefined )
 		{
 		TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8(" - IAP ID is known: %d"), iIapId ));
@@ -1896,31 +1973,26 @@
 		{
 		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," - IAP ID is not known.");
 		}
-		
-	if( handle < KErrNone )
-		{
-		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized.");
-		}
-#endif // _SENDEBUG    
-    
-    if( handle && !iExplicitIapDefined )
-    	{
+		    
+  if(/* handle && */!iExplicitIapDefined )
+  	{
 		// Eventhough IAP was not explicitely set (through Serene API), this
 		// code can check what IAP end-user provided via IAP selection dialog:
 		TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId: about to call RConnection::GetIntSetting()");
-		_LIT( KIapIdKey, "IAP\\Id" );
-	    iConnection.GetIntSetting( KIapIdKey, iIapId);
-	    if ( iIapId > 0 )
-	    	{
-			TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): end-user provided IAP(%d)"), iIapId ));
-	    	// Treat the end-user selection as "explicit" definition as well(!):
-	    	iExplicitIapDefined = ETrue; 
-	    	}
-	    }
-    if( iExplicitIapDefined )
-        {
-        aIapId = iIapId;
-        }
+	//_LIT( KIapIdKey, "IAP\\Id" );
+    //iConnection.GetIntSetting( KIapIdKey, iIapId);
+    if ( iIapId > 0 )
+    	{
+			TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("---- GetIntSetting(): retuens IAP(%d)"), iIapId ));
+    	// Treat the end-user selection as "explicit" definition as well(!):
+    	iExplicitIapDefined = ETrue; 
+    	}
+    }
+  if( iExplicitIapDefined )
+      {
+      aIapId = iIapId;
+      }
+  	TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId() returns(%d)"), iExplicitIapDefined ));
     return iExplicitIapDefined;
     }
 
@@ -1941,6 +2013,17 @@
     {
     return iUsedIapId;
     }
+    
+void CSenHttpChannelImpl::ResetIapId()
+    {
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetIapId()");
+    iIapId = 0; //Reset to Zero in case of errors to enable other IAP
+    }
+		
+void CSenHttpChannelImpl::ResetUsedIapId()
+    {
+    TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetUsedIapId()");
+    iUsedIapId = 0; //Reset to Zero in case of errors to enable other IAP
+    }
+    
 // END OF FILE
-
-
--- a/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp	Sun May 30 23:54:06 2010 +0530
@@ -26,31 +26,31 @@
 
 
 // INCLUDE FILES
-#include "senserviceconnection.h"
+#include "SenServiceConnection.h"
 #include "senhttpchanneltransportplugin.h"
 #include "senhttpchannelimpl.h"
 #include "senhttpsyncrequester.h"
-#include "senxmlutils.h"
-#include "senidentityprovider.h"
+#include "SenXmlUtils.h"
+#include "SenIdentityProvider.h"
 #include "senwspattern.h"
-#include "senfragment.h"
-#include "senelement.h"
+#include "SenFragment.h"
+#include "SenElement.h"
 #include "sendebug.h"
-#include "msenproperty.h"
-#include "senhttptransportproperties.h" // Utils\inc
+#include "MSenProperty.h"
+#include "SenHttpTransportProperties.h" // Utils\inc
 #include "sentransportcontext.h"
 #include "senlayeredhttptransportproperties.h" // internal Framework\inc
 #include "msenmessagecontext.h"
-#include "msenmessage.h"
-#include "sensoapmessage2.h"
-#include "rsendocument.h"
-#include "senparser.h"
+#include "MSenMessage.h"
+#include "SenSoapMessage2.h"
+#include "RSenDocument.h"
+#include "SenParser.h"
 #include "senservicesession.h"
 #include "senlogger.h"
 #include "senclientsession.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
 
 
 
@@ -104,7 +104,8 @@
     iProperties(NULL),
     iConsumerMap(EFalse, ETrue), 
     iSessionMap(EFalse, EFalse), // iConsumerMap deletes the txnIds (using same "new reserved" TInt here!)
-    iStatusCode(0)
+    iStatusCode(0),
+    iIsConnectionFailed(EFalse)
     {
     }
 
@@ -115,12 +116,19 @@
     iSessionMap.Reset(); 
 
     delete iHttpChannel;
+    iHttpChannel = NULL;
     delete iRequester;
+    iRequester = NULL;
     delete iProperties;
+    iProperties = NULL;
 
     delete ipCtx;
     ipCtx = NULL;
 
+    // Close the log file and the connection to the server.
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file closed.")));
+    TLSLOG_CLOSE(KSenHttpChannelLogChannelBase);
+
     TLSLOG(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,(_L("Got last data chunk.")));
     TLSLOG_CLOSE(KSenHttpChannelObserverLogChannelBase);
     }
@@ -132,6 +140,10 @@
     TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL(): log file opened.");
     TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL - Version 2 [2006-05-09]");
 
+    // Open connection to the file logger server
+    TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile);
+    TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file opened")));
+
     if( ipCtx )
         {
         // Attempt to find pre-defined IAP ID from transport context
@@ -452,10 +464,29 @@
 // Method to catch async error responses from httpchannel
 void CSenHttpChannelTransportPlugin::ResponseErrorL(TInt aRequestId, TInt aErrorCode, HBufC8* apErrorBody,CSenHttpTransportProperties* aHttpProperties)
     {
+    TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResponseErrorL() - aErrorCode [%d]"), aErrorCode));
     CleanupStack::PushL(apErrorBody);
-    iHttpChannel->DisableTimeOutL(aRequestId);
+    if( (aErrorCode < KErrNone) && (apErrorBody == NULL) || aErrorCode == KErrAbort)
+    	{
+    	TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL() Set iIsConnectionFailed True");
+    	iHttpChannel->ResetIapId();
+    	iHttpChannel->ResetUsedIapId();
+    	iHttpChannel->SetExplicitIapDefined(EFalse);
+    	iIsConnectionFailed = ETrue;
+    	TUint32 zeroIap = 0;
+			TBuf8<128> buf;
+	    buf.AppendFormat(_L8("%u"), zeroIap);
+    	LayeredPropertiesL().SetPropertyL(KIapIdLocalName, buf); //Reset the layered properties in case of wrong IAP
+    	}
+    else
+    	{
+    	iHttpChannel->SetExplicitIapDefined(ETrue);
+    	}	
+    if(iHttpChannel)
+    	{
+    	iHttpChannel->DisableTimeOutL(aRequestId);
+    	}
 #ifdef _SENDEBUG    
-    TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL:");
     TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- Request's txnID: %d"), aRequestId));
     if ( apErrorBody )
         {
@@ -555,11 +586,12 @@
     // ALWAYS HANDLE IAP ID FIRST, SINCE IT *CAN RESET* HTTPCHANNEL!
     
     TUint32 iapId(KErrNone);
-
     retVal = LayeredPropertiesL().IapIdL(iapId);
-    if(retVal==KErrNone)
+    TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- CSenHttpChannelTransportPlugin::ApplyPropertiesL() - iapId [%d]"), iapId));
+	TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- LayeredPropertiesL() retVal [%d]"), retVal)); 
+    if(iIsConnectionFailed)
         {
-        TInt resetPerformed = ResetHttpChannelByIapIdL(iapId);
+		TInt resetPerformed = ResetHttpChannelByIapIdL(0); //Incase of connection error set Iap ID 0
 #ifdef _SENDEBUG
         if(resetPerformed == KErrNone)
             {
@@ -567,6 +599,16 @@
             }
 #endif // _SENDEBUG
         }
+    else if(retVal==KErrNone)
+        {
+       	TInt resetPerformed = ResetHttpChannelByIapIdL(iapId);
+#ifdef _SENDEBUG
+        if(resetPerformed == KErrNone)
+            {
+            TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- IAP re-set performed: (%d)"), 0));
+            }
+#endif // _SENDEBUG				
+        }
 
     // Handle ProxyHost and ProxyPort
     TPtrC8 proxyHost;
@@ -608,6 +650,7 @@
 
 TInt CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL(TUint32 aIapId)
     {
+    TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL()");
     TUint32 effectiveIapId(KErrNone);
     TBool explicitIapIdDefined(EFalse);
     if(iHttpChannel)
@@ -616,15 +659,16 @@
         }
 
     TInt retVal(KErrNone);
-    if(!explicitIapIdDefined || explicitIapIdDefined && effectiveIapId != aIapId)
+    TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- explicitIapIdDefined[%d], effectiveIapId[%d], aIapId[%d]"), explicitIapIdDefined, effectiveIapId, aIapId));
+    if(!explicitIapIdDefined || (explicitIapIdDefined && (effectiveIapId != aIapId) ) || iIsConnectionFailed)
         {
         TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannel():");
-
+        iIsConnectionFailed = EFalse;
         delete iHttpChannel;
         iHttpChannel = NULL;
         delete iRequester;
         iRequester = NULL;
-        TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- New IAP ID: %d"), aIapId));
+        TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- New IAP ID: %d"), aIapId));
         CSenHttpChannel* pHttpChannel = CSenHttpChannelImpl::NewL(iServiceManager, aIapId);
         
         CleanupStack::PushL(pHttpChannel);
@@ -640,6 +684,7 @@
         {
         retVal = KErrAlreadyExists;
         }
+    TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL() - returns [%d]"), retVal));
     return retVal;
     }
 
--- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Sun May 30 23:54:06 2010 +0530
@@ -90,7 +90,7 @@
     {
     delete iContentType;
     delete iContent;
-    if (!isStopped)
+    if (!isStopped && iSchedulerWait.IsStarted())
         {
         iSchedulerWait.AsyncStop();
         }
@@ -104,7 +104,10 @@
     if (!isStopped)
         {
         iStatusCode = KErrTimedOut;
-        iSchedulerWait.AsyncStop();
+	    if (iSchedulerWait.IsStarted())
+	        {
+	        iSchedulerWait.AsyncStop();
+	        }
         }
     isStopped = ETrue;
     }
@@ -112,8 +115,11 @@
     {
     if (!isStopped)
         {
-        iStatusCode = aError;
-        iSchedulerWait.AsyncStop();
+    	iStatusCode = aError;
+	    if (iSchedulerWait.IsStarted())
+	        {
+	        iSchedulerWait.AsyncStop();
+	        }
         }
     isStopped = ETrue;
     return aError;
@@ -182,7 +188,7 @@
     {
     iContent = apContent; // transfers ownership of content into _this_ class
     iContentType = ((HBufC8*)aContentType)->AllocL();
-    if (!isStopped)
+    if (!isStopped && iSchedulerWait.IsStarted())
         {
         iSchedulerWait.AsyncStop();
         }
--- a/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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/wslogger/group/senlogger.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wslogger/group/senlogger.mmp	Sun May 30 23:54:06 2010 +0530
@@ -56,7 +56,6 @@
 
 SYSTEMINCLUDE   ../../inc
 MW_LAYER_SYSTEMINCLUDE
-APP_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib
 LIBRARY         flogger.lib
--- a/webservices/wslogger/src/senlogger.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wslogger/src/senlogger.cpp	Sun May 30 23:54:06 2010 +0530
@@ -25,10 +25,8 @@
 
 
 #include "senlogger.h"
-//#include <flogger.h>
 #include <f32file.h>
 #include <s32file.h> 
-#include <versit.h>
 
 namespace
     {
@@ -49,7 +47,6 @@
 EXPORT_C TInt CSenLogger::CreateL(TInt aChannel, TInt aLevel, const TDesC& aLogDir, const TDesC& aLogFileName, TFileLoggingMode aMode)
     {
     TInt index(KErrNotFound);
-    //	  CSenLogger* pSenLogger = (CSenLogger*)Dll::Tls();
     CSenLogger* pSenLogger = NULL;
     TWsTls* tls = (TWsTls*)Dll::Tls();
     if( !tls )
@@ -65,12 +62,11 @@
   		pSenLogger = new (ELeave) CSenLogger();
         if ( pSenLogger )
             {
-            //      		  Dll::SetTls(pSenLogger);
             tls->iLogger = pSenLogger;
       		pSenLogger->iCount = 0;
       		//reading the configuration file for the logging levels!!!
       		
-      		/*the file has the  following format
+      		/*the file has the  following format (IN ANSI)
       		* ==============================================================================
       		  * LogChannel LogLevel
       		    1000 0
@@ -92,74 +88,56 @@
       	    RFs fs;
       	    res=fs.Connect();
       	      if(res==KErrNone)
+			{
+			RFileReadStream readStream;
+	      	res=readStream.Open(fs, KPath, EFileRead|EFileStreamText);
+			if(res == KErrNone)
 				{
-      	     
-                RFileReadStream readStream;
-      	        res=readStream.Open(fs,KPath,EFileRead|EFileStreamText);
-      	   		if(res==KErrNone)
-      	     		{
-      	      		TInt error;
-      	      		TBool result;
-      	      		TInt retVal;
-      	      		
-      	      		CLineReader *readLine = CLineReader::NewL(readStream);
-                    CleanupStack::PushL(readLine);
-      	    		
-                	do
-      	    		    {
-      	      		    result=readLine->ReadLineL(0,error);
-      	      		    
-      	       	        if(result==CLineReader::ELineHasContent)
-      	       			    {
-      	       			    
-              	      		TInt *key = new (ELeave) TInt;
-              	      	
-          	      		
-      	       			    TLex8 lexBuf(readLine->iBufPtr);
-      	     			    retVal = lexBuf.Val(*key);
-      	     			    
-      	     			    if(retVal!=0)
-      	     			        {
-      	     			        delete key;
-                             
-      	     			        continue;
-      	     			        }
-      	     			    else
-      	     			        {
-                  	      		TInt *value = new (ELeave) TInt;
-                  	      
-      	      		
-  	     			            lexBuf.SkipSpace();
-  	     			            retVal=lexBuf.Val(*value);
-  	     			            if(retVal==0)
-	  	     			            {
-  	     			    	        retVal = pSenLogger->iMap.Append(key,value);
-  	     			    	        if(retVal != KErrNone)
-  	     			    	            {
-  	     			    	            delete key;
-  	     			    	            delete value;
-      	    		                   
-  	     			    	            }
-  	     			    	   
-  		     			            }
-  		     			         else
-  		     			            {
-  		     			              delete key;
-  	     			    	          delete value;
-  		     			                
-  		     			            }
-      	     			    	
-      	     			        }
-      	       			    }
-      	       			 
-      	    		    }while(error!=KErrEof);
-      	    		 
-      	    		 CleanupStack::PopAndDestroy(readLine);
-      	      	     readStream.Close();
-      	     		}
-      	     
-      	      	fs.Close();
-      	      	}
+				TInt error;
+				TInt retVal;
+				do
+					{
+					TBuf8<128> readLineBuf;
+					TRAP(error, readStream.ReadL(readLineBuf, (TChar)'\n'));
+					if(error == KErrNone)
+						{      
+						TInt32 length(0);
+						length = readLineBuf.Length() ;
+						TInt *key = new (ELeave) TInt;
+						TLex8 lexBuf(readLineBuf);
+						retVal = lexBuf.Val(*key);
+
+						if(retVal!=0)
+							{
+							delete key;
+							continue;
+							}
+						else
+							{
+							TInt *value = new (ELeave) TInt;
+							lexBuf.SkipSpace();
+							retVal=lexBuf.Val(*value);
+							if(retVal==0)
+								{
+								retVal = pSenLogger->iMap.Append(key,value);
+								if(retVal != KErrNone)
+									{
+									delete key;
+									delete value;
+									}
+								}
+							else
+								{
+								delete key;
+								delete value;
+								}
+							}
+						}
+					}while(error == KErrNone);
+				readStream.Close();
+				}
+			fs.Close();
+			}
             }
         else
             {
--- a/webservices/wsmanager/src/rsenservicemanager.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmanager/src/rsenservicemanager.cpp	Sun May 30 23:54:06 2010 +0530
@@ -272,7 +272,7 @@
 
 TInt RSenServiceManager::IdentityProvidersL(CSenChunk& aSenChunk)
     {
-    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL");
+    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL()");
 
     TIpcArgs args;
     aSenChunk.ChunkToArgs(args, 0);
@@ -284,7 +284,7 @@
 
 TInt RSenServiceManager::ServiceDescriptionsByPatternL(CSenChunk& aSenChunk)
     {
-    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::ServiceDescriptionsByPatternL()");
 
     TIpcArgs args;
     aSenChunk.ChunkToArgs(args, 0);
@@ -296,7 +296,7 @@
 
 TInt RSenServiceManager::CredentialsL(CSenChunk& aSenChunk)
     {
-    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::CredentialsL");
 
     TIpcArgs args;
     aSenChunk.ChunkToArgs(args, 0);
@@ -308,7 +308,7 @@
     
 TInt RSenServiceManager::AddCredentialL(CSenChunk& aSenChunk)
     {
-    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::AddCredentialL()");
 
     TIpcArgs args;
     aSenChunk.ChunkToArgs(args, 0);
@@ -320,7 +320,7 @@
 
 TInt RSenServiceManager::RemoveCredentialsL(CSenChunk& aSenChunk)
     {
-    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern");
+    TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::RemoveCredentialsL()");
 
     TIpcArgs args;
     aSenChunk.ChunkToArgs(args, 0);
--- a/webservices/wsmanager/src/senservicemanagerimpl.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmanager/src/senservicemanagerimpl.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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,16 +384,20 @@
 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);
     delete provider;
+    provider = NULL;
+	TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider) Completed");    
     return retVal;
     }
 
 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 +408,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 +422,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 +680,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     
     CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC();
@@ -685,6 +698,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -734,6 +748,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -780,6 +795,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -870,6 +886,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
     
@@ -916,6 +933,7 @@
                                           RCredentialArray& aCredentials,
                                           RCredentialPropertiesArray& aCredentialProperties)
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)");
     TInt retVal(KErrNone);
     TPtrC8 credentials;
 
@@ -963,6 +981,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 +1023,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 +1039,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 +1088,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 +1101,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 +1128,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 +1171,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 +1185,7 @@
 
 TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList )
     {
+    TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)");
     TInt retVal(KErrNone);
     TPtrC8 descriptions;
 
@@ -1173,6 +1200,7 @@
             if(retVal == KErrNone)
                 {
                 retVal = ExtractIdentiyProvidersL(descriptions, aList);
+                TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("-ExtractIdentiyProvidersL returned [%d]"), retVal));
                 }
             }
         }
@@ -1182,7 +1210,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);
 
     
@@ -1276,10 +1304,15 @@
 
             }
         } //  END OF: if idp.Length() > 0
+    else
+       	{
+		TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL aIdPs(aIdPs, aList) aIdPs = 0 length");
+        }
     return retVal;
     }
 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/wsmessages/src/senatomentry.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/senatomentry.cpp	Sun May 30 23:54:06 2010 +0530
@@ -27,7 +27,7 @@
 #include <badesca.h>
 
 #include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 
 #include "senatomentry.h"
 
--- a/webservices/wsmessages/src/senatomfeed.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/senatomfeed.cpp	Sun May 30 23:54:06 2010 +0530
@@ -25,7 +25,7 @@
 #include <badesca.h>
 
 #include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 
 #include "senatomfeed.h"
 #include "senatomentry.h"
--- a/webservices/wsmessages/src/senatommessage.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/senatommessage.cpp	Sun May 30 23:54:06 2010 +0530
@@ -32,7 +32,7 @@
 
 #include "sendebug.h"
 #include "senlogger.h"
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 
 CSenAtomMessage::CSenAtomMessage() 
 //:iTitle(NULL), iId(NULL), iUpdated(NULL), iPublished(NULL)
--- a/webservices/wsmessages/src/sensoapenvelope2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/sensoapenvelope2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -27,7 +27,7 @@
 
 #include <SenXmlUtils.h>
 #include <SenDomFragmentBase.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 
 
 #include "SenSoapEnvelope2.h"
--- a/webservices/wsmessages/src/sensoapfault2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/sensoapfault2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -95,7 +95,7 @@
 #include "SenSoapFault2.h"
 #include "SenSoapEnvelope2.h"
 
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 
 EXPORT_C CSenSoapFault2* CSenSoapFault2::NewL(
                                         const TDesC8& aNsUri,
--- a/webservices/wsmessages/src/sensoapmessage2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/sensoapmessage2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -23,7 +23,7 @@
 
 
 // INCLUDE FILES
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengnodelist.h>
 #include <badesca.h>
 #include <SenXmlReader.h>
 #include <s32mem.h>
--- a/webservices/wsmessages/src/sensoapmessagedom2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/sensoapmessagedom2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -27,7 +27,7 @@
 #include <SenXmlReader.h>
 #include <s32mem.h>
 #include <utf.h>
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
 
 #include "SenWsSecurityHeader2.h"
 #include "sensoapmessagedom2.h"
--- a/webservices/wsmessages/src/senwssecurityheader2.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsmessages/src/senwssecurityheader2.cpp	Sun May 30 23:54:06 2010 +0530
@@ -24,7 +24,7 @@
 
 // INCLUDE FILES
 #include <SenIdentityProvider.h>
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengbinarycontainer.h>
 
 #include "SenWsSecurityHeader2.h"
 #include "sendebug.h"
--- a/webservices/wsnotifierplugins/group/sennotifierplugin.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsnotifierplugins/group/sennotifierplugin.mmp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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/wsoviplugin/inc/wsovicons.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/inc/wsovicons.h	Sun May 30 23:54:06 2010 +0530
@@ -164,6 +164,7 @@
     
     _LIT8(KTTL,"TTL");
     _LIT8(KTokenCreationTime,"TokenCreationTime");
+    _LIT8(KTokenValidUntilTime,"TokenValidUntil");
     _LIT8( KTokenSecret, "TokenSecret");
     _LIT8( KToken, "Token");
     _LIT8(KOnlySharing,       "OnlySharing");
@@ -191,16 +192,18 @@
 	_LIT8(KTokenCreationResponseLocalName, "tokenCreationResponse");
 	_LIT8(KTokenSecretLocalName, "tokenSecret");
 	_LIT8(KTTLLocalName, "ttl");
+	_LIT8(KExpiresLocalName, "expires");
 	_LIT8(KTokenInfoLocalName,"tokenInfo");
     _LIT8(KErrorNode,                    "error");
     _LIT8(KErrorCode,                    "errorCode");
     _LIT8(KErrorText,                    "errorText");
     _LIT8(KErrorCodeInvalidAccessToken, "invalidAccessToken");
     _LIT8(KErrorCodeUnauthorized,       "notAuthorized");
-
     _LIT8(KUserInfoLocalName,"userInfo");
     _LIT8(KUserNameLocalName,"username");
-	
+		_LIT8( KMobileUsed1,             "Mobile number" );
+    _LIT8( KMobileUsed2,             "already used today" );
+		_LIT8(KEmailUsed, "You have already a Nokia account associated with this mobile number or email address.");	
 	}
 
 #endif // CONSPLUGIN_H
--- a/webservices/wsoviplugin/inc/wsoviservicesession.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/inc/wsoviservicesession.h	Sun May 30 23:54:06 2010 +0530
@@ -32,9 +32,9 @@
 #include "wsoviplugin.h"
 #include "senwebservicesession.h"
 #include "wsovisessionconsumer.h"
-#include <xmlengfilecontainer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengelement.h>
 
 class CWSOviCredentialObserver;
 class CSenHttpTransportProperties;
@@ -50,6 +50,9 @@
     _LIT8(KTokenCreationTimeTag,         "<TokenCreationTime>");
     _LIT8(KTokenCreationTimeEndTag,      "</TokenCreationTime>");
     _LIT8(KTokenCreationTimeLocalName,   "TokenCreationTime");
+    _LIT8(KTokenValidUntilTimeTag,         "<ValidUntil>");
+    _LIT8(KTokenValidUntilTimeEndTag,      "</ValidUntil>");
+    _LIT8(KTokenValidUntilTimeLocalName,   "ValidUntil");
     _LIT8(KTTLTag,                 		 "<TTL>");
     _LIT8(KTTLEndTag,                    "</TTL>");
     _LIT8(KTTLLocalName,                 "TTL");
--- a/webservices/wsoviplugin/inc/wsovitokencreationresponse.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/inc/wsovitokencreationresponse.h	Sun May 30 23:54:06 2010 +0530
@@ -74,6 +74,12 @@
 TPtrC8 TTL();
 
 /**
+* Getter for validUntil
+* @return validUntil
+*/
+TPtrC8 ValidUntil();
+
+/**
 * Getter for username
 * @return username
 */
@@ -104,7 +110,7 @@
 	HBufC8* iTTL;
 	HBufC8* iUsername;
 	TBool iIsTokenUpdate;
-
+	HBufC8* iValidUntil;
 };
 
 #endif /*WSOVITOKENCREATIONRESPONSE_H_*/
--- a/webservices/wsoviplugin/src/wsovihandlercontext.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsovihandlercontext.cpp	Sun May 30 23:54:06 2010 +0530
@@ -153,7 +153,10 @@
     {
     if (aKey == HandlerContextKey::KSIF())
         {
-        iWSOviPlugin = (CWSOviPlugin*)aValue;
+        if(aValue)
+        	{
+        	iWSOviPlugin = (CWSOviPlugin*)aValue;
+        	}
         return KErrNone;
         }
     else if (aKey == HandlerContextKey::KLogger())
--- a/webservices/wsoviplugin/src/wsovioauthclient.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsovioauthclient.cpp	Sun May 30 23:54:06 2010 +0530
@@ -40,6 +40,7 @@
 #include "wsovitokencreationresponse.h"
 #include "sencryptoutils.h"
 #include "wsoviutils.h"
+#include <SenDateUtils.h>
 
 namespace 
     {
@@ -100,7 +101,7 @@
 //
 CWSOviOAuthClient::~CWSOviOAuthClient()
     {
-    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviOAuthClient::~CWSOviTrustClient");
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviOAuthClient::~CWSOviOAuthClient");
     delete iAuthSession;
     delete iBody;
     }
@@ -530,7 +531,22 @@
 	    else
 	        {
 	        iWSOviServiceSession->SetTrustAnchorL(iIdentityProvider->ProviderID());
-	            TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response");
+	        TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response");
+	        
+		    TPtrC8 validUntil = responseFragment->ValidUntil();
+		    if (validUntil.Length())
+		        {
+		        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,validUntil);
+		        User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,validUntil));
+		        }
+			else
+				{
+				TTime tmpValidUntil = Time::MaxTTime();
+				TBuf8<SenDateUtils::KXmlDateTimeMaxLength> pValidUntil;
+				SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil);
+		        User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil));				
+				}	
+	        
 	        retVal = iWSOviServiceSession->SessionContext()->SetTokenKeysL(token);
 	        if (retVal)
 	            {
@@ -719,6 +735,10 @@
 
 void CWSOviOAuthClient::CreateBodyL(const TDesC8& aXmlNs, const TDesC8& aUsername, const TDesC8& aPassword, const TDesC8& aCreated)
     {
+    if(aPassword == KNullDesC8())
+    	{
+    	TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviOAuthClient::CreateBodyL() - aPassword == KNullDesC8")));
+    	}
     delete iBody;
     iBody = NULL;
     HBufC8* nonce = SenCryptoUtils::GetRandomNonceL();
--- a/webservices/wsoviplugin/src/wsoviplugin.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsoviplugin.cpp	Sun May 30 23:54:06 2010 +0530
@@ -76,12 +76,13 @@
 //
 CWSOviPlugin::~CWSOviPlugin()
     {
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()")));
     iMsgHandlers.ResetAndDestroy();
     iSessionHandlers.ResetAndDestroy();
     iHandlerContexts.ResetAndDestroy();
     iVersions.Reset();
     iIMSI.Close();
-    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()")));
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin() Completed")));
     }
 
 // ---------------------------------------------------------------------------
@@ -90,7 +91,7 @@
 //
 void CWSOviPlugin::ConstructL()
     {
-    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::ConstructL")));
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::ConstructL()")));
 
     BaseConstructL(KFrameworkXMLNS, KFrameworkLocalName);
     //load default setup of handlers
@@ -102,6 +103,7 @@
     AddHandlerL(KSecurityValue, KNullDesC8, SenHandler::EMessageHandler);
     AddHandlerL(KEncoderValue, KNullDesC8, SenHandler::EMessageHandler);
     AddHandlerL(KServiceUpdateValue, KNullDesC8, SenHandler::ESessionHandler);
+    TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviPlugin::ConstructL() Completed")));
     }
 
 //========================================================
--- a/webservices/wsoviplugin/src/wsoviregisterhandler.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsoviregisterhandler.cpp	Sun May 30 23:54:06 2010 +0530
@@ -51,15 +51,18 @@
 // Destructor
 CWSOviRegisterHandler::~CWSOviRegisterHandler()
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviRegisterHandler::~CWSOviRegisterHandler()");
     }
 
 // Second phase construction.
 void CWSOviRegisterHandler::ConstructL()
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviRegisterHandler::ConstructL()");
     }
     
 TInt CWSOviRegisterHandler::InvokeL(MSenSessionContext& aCtx)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviRegisterHandler::InvokeL()");
     MSenServiceDescription& pServiceDescription = *(MSenServiceDescription*)aCtx.GetSenWSDescriptionL(WSOviContextKeys::KServiceDescription());
     const TDesC8* action = aCtx.GetDesC8L(WSOviContextKeys::KRegisterAction());
     TInt result(KErrNone);
@@ -148,6 +151,7 @@
 TInt CWSOviRegisterHandler::UnregisterServiceDescriptionL(
     MSenServiceDescription& aServiceDescription)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviRegisterHandler::UnregisterServiceDescriptionL()");
     TInt retval(KErrNone);
     CWSOviServiceSession *pSession = NULL;
     TPtrC8 contract = aServiceDescription.Contract();
@@ -268,13 +272,13 @@
     if(aServiceDescription->DescriptionClassType() ==
                 MSenServiceDescription::EOviOAuthClient)
         {
-        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviRegisterHandler::CWSOviRegisterHandler - This ServiceDescription is already an NAUTH Client")));
+        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is already an NAUTH Client")));
         pAuthClient = (CWSOviOAuthClient*)aServiceDescription;
         retval = iHandlerContext.GetSenCoreServiceManager()->RemoveServiceDescriptionL(*pAuthClient);
         }
     else
         {
-        
+        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is not NAUTH Client")));
         pSession = CWSOviServiceSession::NewLC(*(CSIF*)iHandlerContext.GetAnyL(HandlerContextKey::KSIF()));
         retval = pSession->InitializeFromL(*aServiceDescription);
         if(retval != KErrNone)
--- a/webservices/wsoviplugin/src/wsoviservicesession.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsoviservicesession.cpp	Sun May 30 23:54:06 2010 +0530
@@ -30,7 +30,7 @@
 #include "sendebug.h"
 #include "senwspattern.h"
 #include "SenXmlUtils.h"
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 #include <SenHttpTransportProperties.h>
 #include <SenIdentityProvider.h>
 #include "wsovicredentialobserver.h"
@@ -63,6 +63,7 @@
 
 CWSOviServiceSession::~CWSOviServiceSession()
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::~CWSOviServiceSession()");
     delete iSessionContext;
     delete iProviderID;
     delete iTrustAnchor;
@@ -90,6 +91,7 @@
 
 void CWSOviServiceSession::ConstructL()
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::ConstructL()");             
     CSenWebServiceSession::ConstructL();
     iTokenObs = CWSOviCredentialObserver::NewL(this,iFramework.Manager().Log());
     }
@@ -263,8 +265,9 @@
         TPtrC8 thisProviderID = ProviderID();
         if(patternProviderID.Length()>0)
             {
-            if(!(thisProviderID.Length()>0 && patternProviderID == thisProviderID))
+            if( !(thisProviderID.Length()>0 && patternProviderID == thisProviderID) )
                 {
+                TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::Matches() - Provider Id not same returning EFalse");
                 return EFalse;
                 }
             }
@@ -550,12 +553,27 @@
         const TDesC8* message = iOutContext->GetDesC8L(WSOviContextKeys::KMessageBody);
         if (message)
             {
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request"));
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+	        TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMaxLogLevel , *message);
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+                    
             retVal = transport.SubmitL(Endpoint(), *message, *utfTP, aResponse, aConsumer);
             }
         else
             {
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request"));
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+	        TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMaxLogLevel , aMessage);
+	        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));            	
+            	
             retVal = transport.SubmitL(Endpoint(), aMessage, *utfTP, aResponse, aConsumer);
-            }   
+            }
+               
+        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Response"));
+        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
+        TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMaxLogLevel , *aResponse);
+        TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************"));
         
         MSenProperties& prop = transport.PropertiesL();
         ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, retVal, aResponse, &prop );
@@ -588,6 +606,7 @@
 
 void CWSOviServiceSession::AdaptEndpointL(TBool aToOrginal)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL");	
     TPtrC8 oldEndpoint = Endpoint();
     if (aToOrginal)
         {
@@ -633,11 +652,16 @@
                                   +oldEndpoint.Length());
             TPtr8 ptrNewEp = newEp->Des();
             ptrNewEp.Append(oldEndpoint);
-            ptrNewEp.Append(suffixEndpoint);
+            TInt retVal = oldEndpoint.Find(suffixEndpoint);
+            if(retVal == KErrNotFound)
+            	{
+            	ptrNewEp.Append(suffixEndpoint);
+            	}
             SetEndPointL(*newEp);
             CleanupStack::PopAndDestroy(newEp);
             }
         }
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL Completed");
     }
 CSenIdentityProvider* CWSOviServiceSession::IdentityProviderFromCoreL(
                                             const TDesC8& aProviderID)
@@ -695,11 +719,12 @@
                               MSenRemoteServiceConsumer& aConsumer,
                               MSenProperties* aResponseTransportProperties)
     {
+    TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMinLogLevel,"CWSOviServiceSession::SendToConsumerL()");
     ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, KErrNone, aMessage, aResponseTransportProperties);
-    TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMinLogLevel,"CWSOviServiceSession::ParseMessageL(CSenSoapMessage& )");
     iRenewCounter = 0;
     iRetryCounter = 0;
-    return aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties );
+    TInt retVal = aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties );
+    return retVal;
     }
     
 TInt CWSOviServiceSession::SendErrorToConsumerL( const TInt aErrorCode,
@@ -709,7 +734,7 @@
                                                      MSenProperties* aResponseTransportProperties )
     {
     TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId()  , KMinLogLevel,"CWSOviServiceSession::SendErrorToConsumerL");
-    TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KNormalLogLevel , _L8("- ErrorCode: %d"), aErrorCode ));
+    TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel , _L8("- ErrorCode: %d"), aErrorCode ));
     ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, aErrorCode, apError, aResponseTransportProperties);
     TInt answer = CanHandleErrorL();
     if (answer)
@@ -841,6 +866,11 @@
                     {
                     User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, pElement->Content()));    
                     }
+                pElement = xmlSdAsElement.Element(WSOviSession::KTokenValidUntilTimeLocalName);
+                if(pElement)
+                    {
+                    User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, pElement->Content()));    
+                    }                    
                 pElement = xmlSdAsElement.Element(WSOviSession::KTTLLocalName);
                 if(pElement)
                     {
@@ -877,6 +907,11 @@
                 {
                 User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, value));    
                 }
+            retVal = properties.PropertyL(WSOviSession::KTokenValidUntilTimeLocalName, value);
+            if ( retVal == KErrNone )
+                {
+                User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, value));    
+                }               
             retVal = properties.PropertyL(WSOviSession::KTTLLocalName, value);
             if ( retVal == KErrNone )
                 {
@@ -914,7 +949,12 @@
             if ( pValue )
                 {
                 properties.SetPropertyL(WSOviSession::KTokenCreationTimeLocalName(), *pValue);
-                }        
+                }
+            pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime);
+            if ( pValue )
+                {
+                properties.SetPropertyL(WSOviSession::KTokenValidUntilTimeLocalName(), *pValue);
+                }            
             pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL);
             if ( pValue )
                 {
@@ -961,6 +1001,13 @@
                 aWriteStream.WriteL(*value);
                 aWriteStream.WriteL(WSOviSession::KTokenCreationTimeEndTag);
                 }
+            value = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime);
+            if (value)
+                {
+                aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeTag);
+                aWriteStream.WriteL(*value);
+                aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeEndTag);
+                }                
             value = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL);
             if (value)
                 {
@@ -1157,6 +1204,7 @@
 
 TInt CWSOviServiceSession::ShareTokenWithL( CWSOviServiceSession* aWSOviSessionDst)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL()");
     TInt error(KErrNone);
     if ( !HasSecurity() )
         {
@@ -1176,22 +1224,27 @@
         }
     else
         {
+        TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL() returning KErrNotFound");
         return KErrNotFound;
         }
     }
     
 void CWSOviServiceSession::AddCredentialL( const TDesC8& aSecurity, TTime aValidUntil )
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil)");
     iValidUntil = aValidUntil;
     SetSecurityL(aSecurity);
     SetStatusL();
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil) Completed");
     }
     
 void CWSOviServiceSession::AddCredentialL(RSenCredentialPtr aCredentialPtr, TTime aValidUntil)
     {
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil)");
     iValidUntil = aValidUntil;
     SetCredentialPtrL(aCredentialPtr); // Share same Credential between multiple Sessions	//codescannerwarnings
     SetStatusL();
+    TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil) Completed");
     }
     
 TBool CWSOviServiceSession::AmIHostletSession()
@@ -1358,6 +1411,7 @@
         {
         iSessionContext->Remove(WSOviContextKeys::KToken);    
         iSessionContext->Remove(WSOviContextKeys::KTokenCreationTime);
+        iSessionContext->Remove(WSOviContextKeys::KTokenValidUntilTime);
         iSessionContext->Remove(WSOviContextKeys::KTTL);
         iSessionContext->Remove(WSOviContextKeys::KTokenSecret);
         }
--- a/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp	Sun May 30 23:54:06 2010 +0530
@@ -32,6 +32,8 @@
 #include <httpstd.h>
 #include <SenHttpTransportProperties.h>
 #include "senlayeredhttptransportproperties.h"
+#include <SenDateUtils.h>
+
 using namespace OAuth;
 
 
@@ -139,7 +141,17 @@
 						{
 						pCtx.Add(WSOviContextKeys::KServiceSession, *(MSenRemoteServiceSession*)remoteServiceSession);
 						}
-					pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue);
+					if( ! errFragment->Text().Compare(WSOviResponse::KEmailUsed()) ||
+					  (errFragment->Text().Compare(WSOviResponse::KMobileUsed1)!= KErrNotFound &&
+					   errFragment->Text().Compare(WSOviResponse::KMobileUsed2) != KErrNotFound )
+					  )
+					    {
+					    pCtx.Update(WSOviContextKeys::KRetryNeeded, EFalse);
+					    }
+					else
+					    {
+					    pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue);
+					    }
 					oviServiceSession->ClearCredentialL();
 					oviServiceSession->SetStatusL();//in order to compute state
 				}
@@ -206,6 +218,20 @@
                         }
                     else
                         {
+					    TPtrC8 validUntil = responseFragment->ValidUntil();
+					    if (validUntil.Length())
+					        {
+					        TLSLOG(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,validUntil);
+					        User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,validUntil));
+					        }
+						else
+							{
+							TTime tmpValidUntil = Time::MaxTTime();
+							TBuf8<SenDateUtils::KXmlDateTimeMaxLength> pValidUntil;
+							SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil);
+					        User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil));
+							}
+                       
                         pCtx.SetTokenKeysL(token);
                         }
                     }
--- a/webservices/wsoviplugin/src/wsovisessioncontext.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsovisessioncontext.cpp	Sun May 30 23:54:06 2010 +0530
@@ -379,6 +379,12 @@
         error = aWSOviSessionCtxDst->Update(KTokenCreationTime, *desc);
         if (error) return error;
         }
+    desc = GetDesC8L(KTokenValidUntilTime);
+    if (desc)
+        {
+        error = aWSOviSessionCtxDst->Update(KTokenValidUntilTime, *desc);
+        if (error) return error;
+        }
     desc = GetDesC8L(KTTL);
     if (desc)
         {
--- a/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp	Sun May 30 23:54:06 2010 +0530
@@ -45,8 +45,7 @@
 // Second phase construction.
 void CWSOviTokenCreationResponse::ConstructL()
     {
-        CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0),
-        		KTokenCreationResponseLocalName);
+    CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), KTokenCreationResponseLocalName);
     }
 
 void CWSOviTokenCreationResponse::StartElementL(const TDesC8& /*aNsUri*/,
@@ -78,14 +77,18 @@
         		{
         		iState = KStateSave;
         		}
-            else if (aLocalName == KTokenLocalName)
-                {
-                iState = KStateSave;
-                }
-        	else if (aLocalName == KTTLLocalName)
-        		{
-        		iState = KStateSave;
-        		}
+          else if (aLocalName == KTokenLocalName)
+              {
+              iState = KStateSave;
+              }
+          else if (aLocalName == KTTLLocalName)
+	          {
+	      	  iState = KStateSave;
+	          }
+          else if (aLocalName == KExpiresLocalName)
+              {
+              iState = KStateSave;
+              }        	
         	break;
         	}
         case KStateParsingUserInfo:
@@ -154,6 +157,21 @@
                 ResetContentL();
                 iState = KStateParsingTokenInfo;
                 }
+            else if (aLocalName == KExpiresLocalName)
+                {
+                if(iValidUntil)
+                	{
+                	delete iValidUntil;
+                	iValidUntil = NULL;
+                	}
+                TLSLOG_L(KSenCoreServiceManagerLogChannelBase  , KMinLogLevel,"WSOviTokenCreationResponse::expires parsing");
+                TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase  , KMinLogLevel, _L8("iValidUntil : %S"), &content));
+                
+                iValidUntil = content.AllocL();
+                
+                ResetContentL();
+                iState = KStateParsingTokenInfo;
+                }            
             else if ( aLocalName == KUserNameLocalName)
                 {
                 if (iUsername)
@@ -202,6 +220,7 @@
 	delete iTokenSecret;
 	delete iTTL;
 	delete iUsername;
+	delete iValidUntil;
 	}
 
 TPtrC8 CWSOviTokenCreationResponse::Token()
@@ -240,6 +259,18 @@
         }
     }
 
+TPtrC8 CWSOviTokenCreationResponse::ValidUntil()
+    {
+    if (iValidUntil)
+        {
+        return *iValidUntil;    
+        }
+    else 
+        {
+        return KNullDesC8();
+        }    	
+    }
+
 TPtrC8 CWSOviTokenCreationResponse::Username()
     {
     if (iUsername)
--- a/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp	Sun May 30 23:54:06 2010 +0530
@@ -25,7 +25,7 @@
 
 
 #include "wsstarmessageutils.h"
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 
 CSenElement* CWSStarMessageUtils::GetMarkedElementL(CSenElement& aParent, 
                                                     const TDesC8& aValue, TBool aAttribute)
--- a/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h	Sun May 30 23:54:06 2010 +0530
@@ -35,9 +35,9 @@
 #include "wsstarplugin.h"
 #include "senwebservicesession.h"
 #include "wsstarsessionconsumer.h"
-#include <xmlengfilecontainer.h>
-#include <xmlengchunkcontainer.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengelement.h>
 #include "sensoapmessagedom2.h"
 
 class CWSStarCredentialObserver;
--- a/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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/wsstar/wsstarplugin/src/wsstarservicesession.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp	Sun May 30 23:54:06 2010 +0530
@@ -33,7 +33,7 @@
 #include "sencryptoutils.h"
 #include "senwspattern.h"
 #include "SenXmlUtils.h"
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 
 #include <SenIdentityProvider.h>
 #include "wsstarcredentialobserver.h"
--- a/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp	Sun May 30 23:54:06 2010 +0530
@@ -40,7 +40,7 @@
     //#include "Attribute.h"
 #endif
 
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 using namespace Xml;
 using namespace SenWSInternalPolicy;
 namespace
--- a/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp	Sun May 30 23:54:06 2010 +0530
@@ -46,7 +46,7 @@
 
 
 #include <SenServiceConnection.h> 
-#include <xmlengnodelist.h> 
+#include <xml/dom/xmlengnodelist.h> 
 using namespace WSPolicy;
 using namespace SenWSInternalPolicy;
 namespace
--- a/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp	Sun May 30 23:54:06 2010 +0530
@@ -25,7 +25,7 @@
 // INCLUDE FILES
 #include "wspolicy.h"
 #include <f32file.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
 #include <SenXmlUtils.h>
 #include "senguidgen.h"
 #include "SenXmlElement.h"
--- a/webservices/wsutils/group/senutils.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsutils/group/senutils.mmp	Sun May 30 23:54:06 2010 +0530
@@ -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	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsutils/src/sencryptoutils.cpp	Sun May 30 23:54:06 2010 +0530
@@ -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;    
 }
 
--- a/webservices/wsutils/src/senxmlproperties.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/webservices/wsutils/src/senxmlproperties.cpp	Sun May 30 23:54:06 2010 +0530
@@ -339,8 +339,14 @@
 
 CSenXmlProperties::~CSenXmlProperties()
     {
-    delete ipReader;
-    delete ipFragment;
+    if(ipReader)
+    	{
+		delete ipReader;    	
+    	}
+    if(ipFragment)
+    	{
+    	delete ipFragment;
+    	}
     }
 
 void CSenXmlProperties::BaseConstructL(const TDesC8& aLocalname, 
@@ -348,7 +354,7 @@
                                        CSenXmlReader* aParser)
     {
     ipFragment = CSenPropertiesFragment::NewL(aLocalname);
-    if ( aParser && aXml != KNullDesC8 )
+    if ( aParser && &aXml && (aXml != KNullDesC8()) )
         {
         // Do parsing
         ipFragment->ParseWithL(*aParser);
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -2821,7 +2821,6 @@
     // is KSenConnectionStatusReady
     LOCAL_ASSERT( ipConsumer->iConnectionStatus == KSenConnectionStatusCreateFailed); 
     
-/*
     // Check that NO HandleErrorL callback was received:
     LOCAL_ASSERT( ipConsumer->iErrorCode == KErrNone );
     
--- a/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp	Sun May 30 23:54:06 2010 +0530
@@ -44,9 +44,9 @@
 #include <SenDateUtils.h>
 #include <SenTransportProperties.h>
 
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
 
 #include <e32base.h> // for CActive
 #include <aknnotewrappers.h> 
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp	Sun May 30 23:54:06 2010 +0530
@@ -70,7 +70,6 @@
 LIBRARY         eikctl.lib
 LIBRARY         egul.lib 
 LIBRARY         fbscli.lib 
-LIBRARY         PBKENG.LIB 
 LIBRARY         cntmodel.lib 
 LIBRARY         aknskins.lib //for skin sbackground
 LIBRARY         gdi.lib
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h	Sun May 30 23:54:06 2010 +0530
@@ -68,7 +68,7 @@
     		
     		
     	//MSENFRAGMENT
-         CSenElement& AsElement() ;
+//         CSenElement& AsElement() ;
          CSenElement* ExtractElement() ;
          void SetReader(CSenXmlReader& aReader) ;
          CSenXmlReader* Reader() ;
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp	Sun May 30 23:54:06 2010 +0530
@@ -176,7 +176,7 @@
 }
 MSenMessage* CTestConnection::Response() 
 {
-	TInt retval(0);
+	//TInt retval(0);
 //	TRAP(retval, iConn->Response());
 	return NULL;
 }
@@ -205,13 +205,12 @@
 
 //MSenFragment
 
-CSenElement& CTestConnection::AsElement() 
+/*CSenElement& CTestConnection::AsElement() 
 {
-	
-}
+}*/
 CSenElement* CTestConnection::ExtractElement() 
 {
-	
+	return NULL;
 }
 void CTestConnection::SetReader(CSenXmlReader& aReader) 
 {
@@ -219,7 +218,7 @@
 }
 CSenXmlReader* CTestConnection::Reader() 
 {
-	
+	return NULL;
 }
 void CTestConnection::ParseL(const TDesC8& aBuf) 
 {
@@ -227,7 +226,7 @@
 }
 TInt CTestConnection::BuildFrom(const TDesC8& aBuf) 
 {
-	
+	return NULL;
 }
 void CTestConnection::DelegateParsingL(MSenFragment& aDelegate) 
 {
@@ -277,17 +276,17 @@
 
 const TDesC8& CTestConnection::LocalName()  const
 {
-	
+	return KNullDesC8();
 }
 
 const TDesC8& CTestConnection::NsUri()  const
 {
-	
+	return KNullDesC8();
 }
 
 const TDesC8& CTestConnection::NsPrefix()  const
 {
-	
+	return KNullDesC8();
 }
 
 void CTestConnection::WriteAsXMLToL(RWriteStream& aWriteStream) 
@@ -297,16 +296,16 @@
 
 HBufC* CTestConnection::AsXmlUnicodeL() 
 {
-	
+	return NULL;
 }
 HBufC8* CTestConnection::AsXmlL() 
 {
-	
+	return NULL;
 }
 
 TBool CTestConnection::ConsistsOfL(MSenFragment& aCandidate) 
 {
-	
+	return NULL;
 }
 
 //CACTIVE
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -46,9 +46,9 @@
 
 //#include <SenVtcpTransportProperties.h>
 #include "testproperty.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-//#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+//#include <xml/dom/xmlengserializer.h>
 
 #include <e32base.h> // for CActive
 #include <aknnotewrappers.h> 
@@ -83,11 +83,11 @@
     _LIT8(KTestPassword,        "012345678901234");
 #elif VALIMO_ADDRESSBOOK_SERVICE
     // Addressbook service hosted inside Nokia intra by ASP / testing team
-    _LIT8(KWSPContract,         "urn:nokia:test:addrbook:2004-09");
+//    _LIT8(KWSPContract,         "urn:nokia:test:addrbook:2004-09");
     _LIT8(KAuthServEndpoint,    "http://10.21.32.110/tfs/IDPSSO_IDWSF10");
-    _LIT8(KASProviderID,        "provider01");
-    _LIT8(KTestAuthzID,         "john");
-    _LIT8(KTestPassword,        "password");
+//    _LIT8(KASProviderID,        "provider01");
+//    _LIT8(KTestAuthzID,         "john");
+//    _LIT8(KTestPassword,        "password");
 #elif SYSOPENDIGIA_ADDRESSBOOK_SERVICE
     _LIT8(KWSPContract,         "urn:nokia:test:addrbook:2004-09");
     _LIT8(KAuthServEndpoint,    "http://ys01liw022.partner.yomi.com:9080/tfs/IDPSSO_IDWSF");
@@ -104,8 +104,8 @@
 #endif // FN_ADDRESSBOOK_SERVICE
 
 
-    _LIT8(KASContract,              "urn:liberty:as:2004-04");
-    _LIT8(KHttpsEndPoint,           "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" );    
+//    _LIT8(KASContract,              "urn:liberty:as:2004-04");
+//    _LIT8(KHttpsEndPoint,           "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" );    
     
     _LIT8(KWSIFrameworkID,          "WS-I");
     _LIT8(KIDWSFFrameworkID,        "ID-WSF");
@@ -133,21 +133,21 @@
 // ARMv5
     _LIT(KIAPName,                  "Internet");
 #endif  
-    _LIT8(KLoggerFileNameProperty,  "HttpLoggerFileName");
-
-    _LIT(KFileToRead,               "c:\\Logs\\LoggingHttpFilter\\httptrace.xml");
-    _LIT8(KFileName,                "httptrace.xml");
-
-    _LIT8(KHTTPMethodGet,           "GET");
-    _LIT8(KHTTPMethodPost,          "POST");
+//    _LIT8(KLoggerFileNameProperty,  "HttpLoggerFileName");
+
+//    _LIT(KFileToRead,               "c:\\Logs\\LoggingHttpFilter\\httptrace.xml");
+//    _LIT8(KFileName,                "httptrace.xml");
+
+//    _LIT8(KHTTPMethodGet,           "GET");
+//    _LIT8(KHTTPMethodPost,          "POST");
     
 //    const TBool MultipleSimultanousRHttpSessionsSupported = EFalse;
     // If IAP changes all previously sent messages will be canceled.
     
     
     //_LIT8(KProxyHost,             "esprx00.nokia.com"); 
-    _LIT8(KProxyHost,               "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com
-    const TInt KProxyPort =         8080;
+//    _LIT8(KProxyHost,               "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com
+//    const TInt KProxyPort =         8080;
 
     //MSN Constants :
     //---------------
@@ -155,7 +155,7 @@
     _LIT8(KPassportPass,        "M1nkk1s");
 
     _LIT8(KStsEndpoint,         "https://login.live.com/rst2.srf");
-    _LIT8(KMSNProxy,            "tcp.mws.mobile.live.com");
+//    _LIT8(KMSNProxy,            "tcp.mws.mobile.live.com");
     //_LIT8(KMetadataEndpoint,    "http://10.132.11.31/WSStar/secpolicy/secpol.xml");
     _LIT8(KMetadataEndpoint, "https://http.mws.mobile.live.com/2006/10/MWP2007_02/SecurityPolicy/Default.aspx");   
 
@@ -597,6 +597,7 @@
 
     CleanupStack::PopAndDestroy(pattern);
     CleanupStack::PopAndDestroy(manager);
+    return error;
     }
 
 TInt CSenServiceConnectionBCTest::RegisterSTSInvalidPasswordL() 
@@ -630,6 +631,7 @@
 
     CleanupStack::PopAndDestroy(pattern);
     CleanupStack::PopAndDestroy(manager);
+    return error;
     }
 
 TInt CSenServiceConnectionBCTest::UnregisterSTSL() 
@@ -663,6 +665,7 @@
 
     CleanupStack::PopAndDestroy(pattern);
     CleanupStack::PopAndDestroy(manager);
+    return error;
     }
     
 TInt CSenServiceConnectionBCTest::SetPolicyL( CSenXmlServiceDescription* pServDesc,
@@ -677,11 +680,13 @@
 
     if(pValue==KNullDesC8())
         {
-        clientPolicy->AddElementL(pName);
+        TRAPD(err, clientPolicy->AddElementL(pName));
+        return err;
         }
         else
         {
-        clientPolicy->AddElementL(pName).SetContentL(pValue);
+        TRAPD(err1, clientPolicy->AddElementL(pName).SetContentL(pValue));
+        return err1;
         }
     }
     
@@ -701,6 +706,7 @@
     // create connection    
     iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc, *this);
     CleanupStack::PopAndDestroy(pServiceDesc);
+    return KErrNone;
     }
 
 TInt CSenServiceConnectionBCTest::CreateConnectionToMessengerServiceWithoutCallbackL()
@@ -720,6 +726,7 @@
     // create connection    
     iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc);
     CleanupStack::PopAndDestroy(pServiceDesc);
+    return KErrNone;
     }
 
 TInt CSenServiceConnectionBCTest::AddDeviceOptionsHeader2L(CSenSoapMessage2& aMessage)
@@ -748,6 +755,8 @@
 
     TXmlEngElement child1_3_2 = child1_3.AddNewElementSameNsL(_L8("Version"));
     child1_3_2.AddTextL(_L8("NO_Version"));
+    
+    return KErrNone;
     }
 
 TInt CSenServiceConnectionBCTest::AddApplicationHeader2L(CSenSoapMessage2& aMessage)
@@ -764,12 +773,15 @@
 
     TXmlEngElement child2 = application.AddNewElementSameNsL(_L8("Version"));
     child2.AddTextL(_L8("NO_VERSION"));
+    
+    return KErrNone;
     }
     
 TInt CSenServiceConnectionBCTest::StartActiveScheduler(TInt aNumberOfPendingOps)
     {
     iNumberOfPendingOps = aNumberOfPendingOps;
     CActiveScheduler::Start();
+    return KErrNone;
     }
        
 TInt CSenServiceConnectionBCTest::StopActiveScheduler()
@@ -779,6 +791,7 @@
       {
       CActiveScheduler::Stop();
       }	
+     return KErrNone;
     }
 
 const CSenIdentityProvider* CSenServiceConnectionBCTest::IdentityProviderL() const
@@ -824,8 +837,8 @@
         TSenDataTrafficDetails details;
         TSenDataTrafficOperations operations;
         iServiceConnection->DataTrafficDetails(details,operations);
-        TInt BytesSent = details.iTotalBytesSent;
-        TInt BytesRecieved = details.iTotalBytesRecieved;
+        //TInt BytesSent = details.iTotalBytesSent;
+        //TInt BytesRecieved = details.iTotalBytesRecieved;
         }
     
     StopActiveScheduler();
@@ -1672,7 +1685,10 @@
     User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
 
 	retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead);
-	
+	if(retVal != KErrNone)
+		{
+			return retVal;
+		}
 	CleanupClosePushL(iRFileHandle);
 	TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle);
 	//LOCAL_ASSERT(transactionIdOrError2 > KErrNone);
@@ -1710,7 +1726,11 @@
     User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
 
 	retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead);
-	
+	if(retVal != KErrNone)
+		{
+			return retVal;
+		}
+
 	CleanupClosePushL(iRFileHandle);
 	HBufC8 *pMsgBuf = NULL;// Buffer to get response
 	TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1752,7 +1772,11 @@
     User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
 
 	retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\testPic9.jpg"), EFileStream|EFileRead);
-	
+	if(retVal != KErrNone)
+		{
+			return retVal;
+		}
+
 	CleanupClosePushL(iRFileHandle);
 	HBufC8 *pMsgBuf = NULL;// Buffer to get response
 	TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1797,7 +1821,7 @@
 TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SubmitL_RFileL( TTestResult& aResult )
     {
 	SetupL() ;
-	TInt retVal(KErrNone);
+	//TInt retVal(KErrNone);
 	iSenXmlServiceDescription = CSenXmlServiceDescription::NewL();
 	iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID);    
 	iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId);
@@ -1812,6 +1836,11 @@
 	User::LeaveIfError(this->iFsSessionHandle.Connect());//anil
     User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
 	err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead);
+	if(err != KErrNone)
+		{
+			return err;
+		}
+
 	CleanupClosePushL(iRFileHandle);
 	HBufC8 *pMsgBuf = NULL;
 	TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf);
@@ -1844,7 +1873,7 @@
 TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SendL_RFileL( TTestResult& aResult )
     {
 	SetupL() ;
-	TInt retVal(KErrNone);
+	//TInt retVal(KErrNone);
 	iSenXmlServiceDescription = CSenXmlServiceDescription::NewL();
 	iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID);    
 	iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId);
@@ -1870,6 +1899,11 @@
  	User::LeaveIfError(this->iFsSessionHandle.Connect());//anil
     User::LeaveIfError(this->iFsSessionHandle.ShareProtected());
 	err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead);
+	if(err != KErrNone)
+		{
+			return err;
+		}
+
 	CleanupClosePushL(iRFileHandle);
 	TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle);
 	if (transactionIdOrError == KErrNone)
@@ -6546,7 +6580,7 @@
 TInt CSenServiceConnectionBCTest::Response( TTestResult& aResult )                  {
 	TInt res;
 	CTestConnection* pTest = CTestConnection::NewL();
-	MSenMessage* pMsg;
+	//MSenMessage* pMsg = NULL;
 	TRAP(res, pTest->Response());
 //	CleanupStack::Pop(pTest);
 	delete pTest;
@@ -6888,7 +6922,7 @@
     iLog->Log(_L("CoBrand->start"));
     SetupL();
     
-    TInt retVal(0);
+//    TInt retVal(0);
     iCoBrandingCallbackOption = ETrue;    
 
     _LIT8(KFramework, "WS-STAR");
@@ -6933,6 +6967,11 @@
     SetPolicyL(pSmSd, KPassportExtensions,  KNullDesC8);
 	iLog->Log(_L("CSenXmlServiceDescription* pSmSd = CSenXmlServiceDescription::NewLC()"));
     TInt error = manager->RegisterServiceDescriptionL( *pSmSd);
+	if(error != KErrNone)
+		{
+			return error;
+		}
+	
     iLog->Log(_L("manager->RegisterServiceDescriptionL( *pSmSd);"));
     
     CSenXmlServiceDescription* pScSd = CSenServicePattern::NewLC();
@@ -7000,7 +7039,7 @@
     
     iHostletConsumerOption = ETrue;
          
-    TInt retVal(KErrNone);
+    //TInt retVal(KErrNone);
     _LIT8(KReq,"<ab:Query xmlns:ab=\"urn:nokia:test:addrbook:2004-09\">Some Query</ab:Query>");
     _LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001");
     
@@ -7033,12 +7072,14 @@
     
     Teardown();
     iLog->Log(_L("HostletConsumer->End"));
+    return ret;
     }
 
 void CSenServiceConnectionBCTest::SetConnectionId( TInt aConnectionId )
     {
     TInt connectonId = 0;
     connectonId = aConnectionId;
+    iLog->Log(_L("Connection Id is %d"),connectonId);
     }
 
 TInt CSenServiceConnectionBCTest::DataTrafficDetailsL(TTestResult& aResult)
@@ -7048,7 +7089,7 @@
     
     iGetDataTrafficDetails = ETrue;
          
-    TInt retVal(KErrNone);
+    //TInt retVal(KErrNone);
     _LIT8(KReq,"<ab:Query xmlns:ab=\"urn:nokia:test:addrbook:2004-09\">Some Query</ab:Query>");
     _LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001");
     
@@ -7081,4 +7122,5 @@
     
     Teardown();
     iLog->Log(_L("HostletConsumer->End"));
+    return ret;
     }
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp	Sun May 30 23:54:06 2010 +0530
@@ -52,4 +52,6 @@
 	}
  	void CTestConsumer::SetStatus(const TInt aStatus)
  	{
- 	}
\ No newline at end of file
+	}
+
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp	Sun May 30 23:54:06 2010 +0530
@@ -46,4 +46,6 @@
  	void CTestFileObserver::TransferProgress(TInt aTxnId , TBool aIncoming , const TDesC8& aMessage,
             const TDesC8& aCid , TInt aProgress )
   	{
-  	}
\ No newline at end of file
+	}
+
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp	Sun May 30 23:54:06 2010 +0530
@@ -61,4 +61,4 @@
 	{
 		 return NULL;
 	}
-	
\ No newline at end of file
+
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -335,7 +335,7 @@
     _LIT8(KBody,"ComarchBody");
     TPtrC8 result = env->SetBodyL(KBody);
     
-    _LIT16(KRef2, "ComarchBody");
+//    _LIT16(KRef2, "ComarchBody");
     TPtrC16 result16(reinterpret_cast<const TUint16*>(result.Ptr()),(result.Size()/2));
     RDebug::Print( _L( "WSModTester: body [%S]"),&result16);
     /*EUNIT_ASSERT_EQUALS(result, KBody);*/
@@ -586,8 +586,8 @@
     {
     SetupL();
     
-    _LIT8(KHeaderElementName,   "HeaderElement");
-    _LIT8(KHeaderContent,       "HeaderContent");
+//    _LIT8(KHeaderElementName,   "HeaderElement");
+//    _LIT8(KHeaderContent,       "HeaderContent");
 
     CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL();
     
@@ -675,14 +675,14 @@
 <sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
 </S:Body>\
 </S:Envelope>");
-    _LIT8(KBodyAsString,     "\
+/*    _LIT8(KBodyAsString,     "\
 <S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sa=\"urn:liberty:sa:2004-04\">\
 <sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
-</S:Body>");
+</S:Body>");*/
 
-    _LIT8(KEmptyBodyAsString,       "<S:Body/>");
+    //_LIT8(KEmptyBodyAsString,       "<S:Body/>");
 
-    _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
+  //  _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
     CSenParser* pParser = CSenParser::NewLC();
     CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL();
 	pEnvelope->SetReader( *iXmlReader );
@@ -997,14 +997,14 @@
 <sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
 </S:Body>\
 </S:Envelope>");
-    _LIT8(KBodyAsString,     "\
+/*    _LIT8(KBodyAsString,     "\
 <S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sa=\"urn:liberty:sa:2004-04\">\
 <sa:SASLRequest xmlns:sa=\"urn:liberty:sa:2004-04\" mechanism=\"ANONYMOUS PLAIN CRAM-MD5\" authzID=\"testuser1\"/>\
 </S:Body>");
+*/
+  //  _LIT8(KEmptyBodyAsString,       "<S:Body/>");
 
-    _LIT8(KEmptyBodyAsString,       "<S:Body/>");
-
-    _LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
+    //_LIT8(KEmptyBodyWithNsAsString, "<S:Body xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"/>");
     CSenParser* pParser = CSenParser::NewLC();
 	CSenSoapMessage* pMessage = CSenSoapMessage::NewL();
 	pMessage->SetReader( *iXmlReader );	
@@ -1615,7 +1615,7 @@
     if(err != KErrUnderflow) return err;
 
     //garbage year
-    _LIT8(KIn15, "xxxx-02-28T13:20:65Z");
+//    _LIT8(KIn15, "xxxx-02-28T13:20:65Z");
     //EUNIT_ASSERT_LEAVE
     //ASSERT(SenDateUtils::FromXmlDateTimeL(KIn15));
 
@@ -1980,12 +1980,17 @@
 		Flag=1;
 	else
 		Flag=0;
-	if(!( Flag )) KErrArgument;
-	CleanupStack::PopAndDestroy(pXmlElement);
+	if(!( Flag )) 
+		{
+	  CleanupStack::PopAndDestroy(pXmlElement);
+	  CleanupStack::PopAndDestroy(pElement);
+	  return KErrArgument;
+		}
+  CleanupStack::PopAndDestroy(pXmlElement);
 	CleanupStack::PopAndDestroy(pElement);
-    Teardown();
-    return KErrNone;
-	}
+  Teardown();
+  return KErrNone;
+}
 	
 
 TInt CSenUtilsBCTest::SenTransportProperties_AsUtf8LL(TTestResult& aResult )
@@ -2021,7 +2026,7 @@
 TInt CSenUtilsBCTest::SenTransportProperties_PropertyLL(TTestResult& aResult )
 {
     SetupL();
-	_LIT8(KValue,"Value");
+	//_LIT8(KValue,"Value");
 	TPtrC8 ValuePtr;
 	TPtrC8 ValuePtr1;
 	CSenTransportProperties* pElement= CSenTransportProperties::NewL();
@@ -2617,7 +2622,7 @@
 TInt CSenUtilsBCTest::SenTransportProperties_MaxTimeToLiveLL(TTestResult& aResult )
 {
 	TTestResult Result;
-	SenTransportProperties_SetMaxTimeToLiveLL( Result);
+	return SenTransportProperties_SetMaxTimeToLiveLL( Result);
 }
 
 TInt CSenUtilsBCTest::SenTransportProperties_SetMinTimeToLiveLL(TTestResult& aResult )
@@ -2706,7 +2711,7 @@
 TInt CSenUtilsBCTest::SenTransportProperties_CloneL(TTestResult& aResult )
 {
 	SetupL();
-	TBool Flag;
+	TBool Flag = 0;
 	TInt var;
 	CSenTransportProperties* pElement= CSenTransportProperties::NewL();
 	CleanupStack::PushL(pElement);
@@ -2714,9 +2719,13 @@
     pClone = (CSenTransportProperties*)pElement->Clone(var); 
     if(pClone != NULL)
     	Flag = 1;
-    if(!(Flag)) return KErrArgument;
-   
-	delete pClone;
+    if(!(Flag)) 
+    	{
+  		delete pClone;
+    	CleanupStack::PopAndDestroy(pElement);
+     	return KErrArgument;
+    	}
+    delete pClone;
     CleanupStack::PopAndDestroy(pElement);
     
     Teardown();
@@ -2744,8 +2753,12 @@
     if(retVal != EFalse)
     	Flag = 1;
     else 
+    	{
+    		CleanupStack::PopAndDestroy(pElement);
    	    return KErrArgument; 
-    
+			}
+    //TO resolve RVCT4.0 warning
+    if (Flag);
     CleanupStack::PopAndDestroy(pElement);
     
     Teardown();
@@ -2757,20 +2770,24 @@
 TInt CSenUtilsBCTest::SenTransportProperties_CloneLL(TTestResult& aResult )
 {
 	SetupL();
-	TBool Flag;
+	TBool Flag = 0;
 	CSenTransportProperties* pElement= CSenTransportProperties::NewL();
 	CleanupStack::PushL(pElement);
 	CSenTransportProperties* pClone = NULL;
-    pClone = (CSenTransportProperties*)pElement->CloneL(); 
-    if(pClone != NULL)
-    	Flag = 1;
-    if(!(Flag)) return KErrArgument;
-   
+  pClone = (CSenTransportProperties*)pElement->CloneL(); 
+  if(pClone != NULL)
+  	Flag = 1;
+  if(!(Flag)) 
+  	{
+  	delete pClone;
+    CleanupStack::PopAndDestroy(pElement);
+  	return KErrArgument;
+    } 
 	delete pClone;
-    CleanupStack::PopAndDestroy(pElement);
+  CleanupStack::PopAndDestroy(pElement);
     
-    Teardown();
-    return KErrNone;    
+  Teardown();
+  return KErrNone;    
     
 }
 
@@ -2792,7 +2809,7 @@
 TInt CSenUtilsBCTest::SenTransportProperties_MinTimeToLiveLL(TTestResult& aResult )
 {
 	TTestResult Result;
-	SenTransportProperties_SetMinTimeToLiveLL(Result);
+	return SenTransportProperties_SetMinTimeToLiveLL(Result);
 }
 
 TInt CSenUtilsBCTest::SenHttpTransportProperties_NewLL(TTestResult& aResult)
--- a/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -46,9 +46,9 @@
 
 //#include <SenVtcpTransportProperties.h>
 #include "testproperty.h"
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-//#include <XmlEngSerializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+//#include <xml/dom/XmlEngSerializer.h>
 
 #include <e32base.h> // for CActive
 #include <aknnotewrappers.h> 
--- a/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp	Sun May 30 23:54:06 2010 +0530
@@ -47,9 +47,9 @@
 
 #include <senvtcptransportproperties.h>
 
-#include <xmlengchunkcontainer.h>
-#include <xmlengfilecontainer.h>
-#include <xmlengserializer.h>
+#include <xml/dom/xmlengchunkcontainer.h>
+#include <xml/dom/xmlengfilecontainer.h>
+#include <xml/dom/xmlengserializer.h>
 
 #include <e32base.h> // for CActive
 #include <aknnotewrappers.h> 
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -1190,7 +1190,7 @@
     idProvider->SetUserInfoL(KText, KNullDesC8, KNullDesC8);
     
     //checking xml
-    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AuthzID>text</AuthzID></IdentityProvider>");
+//    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AuthzID>text</AuthzID></IdentityProvider>");
 
     TPtr16 ptr = ConvertToPtr16LC(*idProvider);
 	TInt posId(-1);
@@ -1221,7 +1221,7 @@
     idProvider->SetUserInfoL(KNullDesC8, KText, KNullDesC8);
     
     //checking xml
-    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AdvisoryAuthnID>text</AdvisoryAuthnID></IdentityProvider>");
+//    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><AdvisoryAuthnID>text</AdvisoryAuthnID></IdentityProvider>");
 
    // TL(ConvertToPtr16LC(*idProvider) == KRef);
 
@@ -1269,7 +1269,7 @@
     idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText2);
     idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText);
     //checking xml
-    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><Password>text</Password></IdentityProvider>");
+//	    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><Password>text</Password></IdentityProvider>");
     //TL(ConvertToPtr16LC(*idProvider) == KRef);
 
    //CleanupStack::PopAndDestroy();//Ptr
@@ -1334,7 +1334,7 @@
     __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText2)); 
     __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText)); 
     //checking xml
-    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ProviderID>text</ProviderID></IdentityProvider>");
+//    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ProviderID>text</ProviderID></IdentityProvider>");
     //TL(ConvertToPtr16LC(*idProvider) == KRef);
 	TPtr16 ptr = ConvertToPtr16LC(*idProvider);
 	TInt posId(-1);
@@ -1357,7 +1357,7 @@
     __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText2)); 
     __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText)); 
     //checking xml
-    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ServiceID>text</ServiceID></IdentityProvider>");
+//    _LIT16(KRef, "<IdentityProvider framework=\"ID-WSF\"><Endpoint>text</Endpoint><Contract>urn:liberty:as:2004-04</Contract><ProviderPolicy/><ServicePolicy/><ServiceID>text</ServiceID></IdentityProvider>");
     //TL(ConvertToPtr16LC(*idProvider) == KRef);
 
 	TPtr16 ptr = ConvertToPtr16LC(*idProvider);
@@ -1791,7 +1791,7 @@
 
     if(!(pattern->AddConsumerIdentityProviderIdL(KText2) == KErrNone))return KErrArgument;
 
-    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
+//    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
     //TL(ConvertToPtr16LC(*pattern) == KRef);
 
     //CleanupStack::PopAndDestroy();//Ptr
@@ -2177,7 +2177,7 @@
     if(!(xmlService->AddIdentityProviderIdL(ptr) == KErrNone))return KErrArgument;
 
 
-    _LIT16(KRef, "<ServiceDescription><ProviderPolicy><IdentityProviderIDs><IdentityProviderID>text</IdentityProviderID><IdentityProviderID>text2</IdentityProviderID></IdentityProviderIDs></ProviderPolicy><ServicePolicy/></ServiceDescription>");
+    //_LIT16(KRef, "<ServiceDescription><ProviderPolicy><IdentityProviderIDs><IdentityProviderID>text</IdentityProviderID><IdentityProviderID>text2</IdentityProviderID></IdentityProviderIDs></ProviderPolicy><ServicePolicy/></ServiceDescription>");
     //TL(ConvertToPtr16LC(*xmlService) == KRef);
 
     //CleanupStack::PopAndDestroy();//Ptr
@@ -2356,7 +2356,7 @@
     CSenXmlServiceDescription* xmlService = CSenXmlServiceDescription::NewL();
     xmlService ->SetContractL(KText);
      //checking xml
-    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text</Contract></ServiceDescription>");
+//    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text</Contract></ServiceDescription>");
     
     //TL(ConvertToPtr16LC(*xmlService) == KRef);
 	TPtr16 ptr = ConvertToPtr16LC(*xmlService);
@@ -2386,7 +2386,7 @@
    
     xmlService ->SetContractL(KText2);
      //checking xml
-    _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text2</Contract></ServiceDescription>");
+//    _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Contract>text2</Contract></ServiceDescription>");
     //TL(ConvertToPtr16LC(*xmlService) == KRef2);
 
     TL(xmlService->Contract() == KText2);
@@ -2511,7 +2511,7 @@
     senFacet->SetValueL(KText2);
     if(!(xmlService->SetFacetL(*senFacet) == KErrNone))return KErrArgument;
 
-    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Facet name=\"text\">text2</Facet></ServiceDescription>");
+//    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Facet name=\"text\">text2</Facet></ServiceDescription>");
     //TPtrC16 ptrRef = KRef();
     //TL(ConvertToPtr16LC(*xmlService) == ptrRef);
     
@@ -2621,7 +2621,7 @@
         RDebug::Print( _L( "WSModTester: xmlBuffer [%S]"),&ptr);
     else
         RDebug::Print( _L( "WSModTester: xmlBuffer empty"));
-    _LIT8(KRef, "<ServiceDescription><Endpoint>text</Endpoint><Contract>text</Contract><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
+//    _LIT8(KRef, "<ServiceDescription><Endpoint>text</Endpoint><Contract>text</Contract><ProviderPolicy/><ServicePolicy/></ServiceDescription>");
     /*EUNIT_ASSERT_EQUALS(ptr, KRef);*/
     //TL(ptr == KRef);
     TInt posId(-1);
@@ -2950,7 +2950,7 @@
     
     xmlService ->SetEndPointL(KText);
      //checking xml
-    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text</Endpoint></ServiceDescription>");
+//    _LIT16(KRef, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text</Endpoint></ServiceDescription>");
     //TL(ConvertToPtr16LC(*xmlService) == KRef);
 
     TL(xmlService->Endpoint() == KText);
@@ -2978,7 +2978,7 @@
 
     xmlService ->SetEndPointL(KText2);
      //checking xml
-    _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text2</Endpoint></ServiceDescription>");
+//    _LIT16(KRef2, "<ServiceDescription><ProviderPolicy/><ServicePolicy/><Endpoint>text2</Endpoint></ServiceDescription>");
     //TL(ConvertToPtr16LC(*xmlService) == KRef2);
 
     TL(xmlService->Endpoint() == KText2);
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -914,7 +914,7 @@
     LOCAL_ASSERT((iServiceManager->AssociateServiceL(KText, KNullDesC8)) == KErrArgument);
     LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KText)) == KErrArgument);
     LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KNullDesC8)) == KErrArgument);
-    _LIT8(KPattern, "&<>");
+    //_LIT8(KPattern, "&<>");
     iProvider->SetProviderID(KText);
     LOCAL_ASSERT((iServiceManager->RegisterIdentityProviderL(*iProvider)) == KErrNone); 
 
@@ -989,9 +989,8 @@
     if(err != KErrNone)return err;
 
     LOCAL_ASSERT((iServiceManager->DissociateServiceL(KText, KText)) == KErrNotFound);
-    _LIT8(KPattern, "&<>");
-
-    Teardown();
+//    _LIT8(KPattern, "&<>");
+	  Teardown();
     return KErrNone;
     }
 
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp	Sun May 30 23:54:06 2010 +0530
@@ -376,15 +376,15 @@
     HBufC8* pAsXml = pEnvelope->AsXmlL();
     CleanupStack::PushL(pAsXml);
     
-    if(!( *pAsXml == KEnvelopeString )) return KErrArgument;
-    
-    CleanupStack::PopAndDestroy(pAsXml);
-    
+    if(!( *pAsXml == KEnvelopeString ))
+    	{
+    	CleanupStack::PopAndDestroy(pAsXml);
+    	return KErrArgument;
+    	}
+    CleanupStack::PopAndDestroy(pAsXml);    	
     TInt var = pEnvelope->TxnId();
-    TBool Flag;
-    
     if(var >= 0)
-    if(!(Flag)) return KErrArgument;
+     return KErrArgument;
     
     __ASSERT_ALWAYS_NO_LEAVE(delete pEnvelope);
     pEnvelope = NULL;
@@ -397,18 +397,21 @@
 TInt CNewSoapClassesBCTest::MT_CSenSoapEnvelope2_CloneL( TTestResult& aResult )
 	{
 	SetupL();
-	TBool Flag;
+	TBool Flag = 0;
 	CSenSoapEnvelope2* pEnvelope = CSenSoapEnvelope2::NewL();
 	CleanupStack::PushL(pEnvelope);
 	CSenSoapEnvelope2* pClone = NULL;
     pClone = (CSenSoapEnvelope2*)pEnvelope->CloneL(); 
     if(pClone != NULL)
     	Flag = 1;
-    if(!(Flag)) return KErrArgument;
-   
-	delete pClone;
+    if(!(Flag)) 
+    {   	
+	  delete pClone;
     CleanupStack::PopAndDestroy(pEnvelope);
-    
+    return KErrArgument;
+    }
+    delete pClone;
+    CleanupStack::PopAndDestroy(pEnvelope);
     Teardown();
     return KErrNone;    
 	}
@@ -574,9 +577,12 @@
 
     HBufC8* pAsXml = pEnvelope->AsXmlL();
     CleanupStack::PushL(pAsXml);
-    if(!( *pAsXml == KEnvelopeString )) KErrArgument;
-    CleanupStack::PopAndDestroy(pAsXml);
-
+    if(!( *pAsXml == KEnvelopeString )) 
+    	{
+    	CleanupStack::PopAndDestroy(pAsXml);
+    	return KErrArgument;
+			}
+		CleanupStack::PopAndDestroy(pAsXml);
     TXmlEngElement bodyElement2 = document.CreateDocumentElementL(KBodyElementName2());
     bodyElement2.AddTextL(KBodyContent2());
     pEnvelope->SetBodyL(bodyElement2);
@@ -2304,7 +2310,7 @@
 TInt CNewSoapClassesBCTest::MT_CSenSoapMessage2_CloneL( TTestResult& aResult )
 	{
 	SetupL();
-	TBool Flag;
+	TBool Flag = 0;
 	CSenSoapMessage2* pSoapMessage = CSenSoapMessage2::NewL();
     CleanupStack::PushL(pSoapMessage);
 
@@ -2312,9 +2318,14 @@
     pClone = 	(CSenSoapMessage2*)pSoapMessage->CloneL(); 
     if(pClone != NULL)
     	Flag = 1;
-    if(!(Flag)) return KErrArgument;
+    if(!(Flag)) 
+    	{
+    	delete pClone;
+      CleanupStack::PopAndDestroy(pSoapMessage);
+    	return KErrArgument;
+    	}
     delete pClone;
-    CleanupStack::PopAndDestroy(pSoapMessage);
+    CleanupStack::PopAndDestroy(pSoapMessage);    	
     Teardown();
     return KErrNone;    
 	}
@@ -3420,7 +3431,7 @@
 
 	filetext.Write(_L("CleanupStack::PopAndDestroy(1); "));
 
-   /* // 2) Fault code in Soap 1.2
+    // 2) Fault code in Soap 1.2
     //    Note: SOAP 1.2 faults are structured differently to SOAP 1.1.
     //          In particular all fault elements are now namespace _qualified_,
     //          many have been renamed and fault codes are now hierarchical
@@ -3441,13 +3452,9 @@
 
     CleanupStack::PopAndDestroy(pSoapFault2);
     CleanupStack::PopAndDestroy(1); // document2
-    *//*
+
     Teardown();
     filetext.Write(_L("Teardown"));
     return KErrNone;    
 	*/
 	
-	
-	
-	
-	//  End of File
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp	Sun May 30 23:54:06 2010 +0530
@@ -47,11 +47,11 @@
  	}
   	MSenMessage::TClass CTestMSenMessage::Type() 
   	{
-  		EMessageBase;
+  		return EMessageBase;
   	}
   	MSenMessage::TDirection CTestMSenMessage::Direction() 
   	{
-  		EOutbound;
+  		return EOutbound;
   	}
 	TInt CTestMSenMessage::SetContext(MSenMessageContext* apNotOwnedContext) 
 	{
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp	Sun May 30 23:54:06 2010 +0530
@@ -811,6 +811,13 @@
 					iStringPool.OpenStringL(KAttribute()),
 					iStringPool.OpenStringL(KAttributeValue())));
 
+		if (err != KErrNone) 
+			{
+			iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err );
+			CleanupStack::PopAndDestroy();
+			return err;
+	    }
+
 			// make a new array for all attributes including namespace (to be added)
 			RAttributeArray justAttributes;
 
@@ -837,6 +844,13 @@
 					iStringPool.OpenStringL(KAttribute()),
 					iStringPool.OpenStringL(KAttributeValue())));
 
+		if (err != KErrNone) 
+			{
+			iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err );
+			CleanupStack::PopAndDestroy();
+			return err;
+	    }
+
 			RAttributeArray justAttributes;
 			justAttributes.Append(justAttribute);
 
@@ -2105,7 +2119,7 @@
 
 	HBufC8* pTestXml = HBufC8::NewLC( xmlDoc.Length() );
 	pTestXml->Des().Append(xmlDoc);
-	CSenElement* newElement;
+	CSenElement* newElement = NULL;
 
 	//adding parsed document to SenElement and copy it to iElement
 
@@ -2255,20 +2269,20 @@
 	TBuf8<128> name;
 	name.Append(arg);
 
-	RAttributeArray apAttrs;
+	/*RAttributeArray apAttrs;
 
 	HBufC8* newAttr;
 
-	/*TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) );
+	TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) );
 	if (r != KErrNone) {
 		iLog->Log(_L("AllocAttrValueL failed. Error: %d"), r );
 		return r;
-	}*/
+	}
 
 	if ( newAttr!= NULL ){
         delete newAttr;
 	    newAttr = NULL;
-    }
+    }*/
 
 	iLog->Log(_L("******* _C_AllocAttrValue -> Ended! ********"));
 	return error;
@@ -3005,7 +3019,7 @@
 		return error;
 	}
 //AsXML "UTF8"
-	HBufC8* pBuf;
+	HBufC8* pBuf = NULL;
 
 	TRAPD(rAsXml, pBuf = pDom->AsXmlL());
 	if (rAsXml != KErrNone)
@@ -3017,7 +3031,7 @@
 	iLog->Log(*pBuf);
 	LogResultL( *pBuf );
 //AsXMLUnicode
-    HBufC16* pBuf2;
+    HBufC16* pBuf2 = NULL;
 
 	TRAPD(rAsXmlUnicode, pBuf2 = pDom->AsXmlUnicodeL());
 	if (rAsXmlUnicode != KErrNone)
@@ -3083,7 +3097,7 @@
 	// close fsSession
 	CleanupStack::PopAndDestroy();
 	// Store parsed documed in file
-	HBufC8* pBuf;
+	HBufC8* pBuf = NULL;
 	// Convert document
 	TRAPD(rAsXml, pBuf = pDom->AsXmlL());
 	if (rAsXml != KErrNone)
--- a/websrv_pub/xml_fragment_api/inc/RSenDocument.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/xml_fragment_api/inc/RSenDocument.h	Sun May 30 23:54:06 2010 +0530
@@ -26,8 +26,8 @@
 #ifndef R_SEN_DOCUMENT
 #define R_SEN_DOCUMENT
 
-#include <xmlengdocument.h>
-#include <xmlengdomimplementation.h>
+#include <xml/dom/xmlengdocument.h>
+#include <xml/dom/xmlengdomimplementation.h>
 
 typedef struct
     {
--- a/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h	Sun May 30 23:54:06 2010 +0530
@@ -32,7 +32,7 @@
 #include <xml/contenthandler.h>
 #include <RSenDocument.h>
 #include <SenParser.h>
-#include <xmlengelement.h>
+#include <xml/dom/xmlengelement.h>
 
 using namespace Xml;
 
--- a/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp	Tue Jan 26 13:03:48 2010 +0200
+++ b/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp	Sun May 30 23:54:06 2010 +0530
@@ -26,17 +26,17 @@
 #include <SenFragmentBase.h>
 #include <SenParser.h>
 #include <RSenDocument.h>
-#include <xmlengdomutils.h>
+#include <xml/dom/xmlengdomutils.h>
 
 #if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
     #include <xml/matchdata.h>
 #endif    
 
 #include <xml/parserfeature.h>           // for TParserFeature enumeration
-#include <xmlengserializationoptions.h> // needed for TSerializationOptions
-#include <xmlengbinarycontainer.h>
+#include <xml/dom/xmlengserializationoptions.h> // needed for TSerializationOptions
+#include <xml/dom/xmlengbinarycontainer.h>
 #include <s32mem.h>
-#include <xmlengdom.h>
+#include <xml/dom/xmlengdom.h>
 
 //  INTERNAL INCLUDES
 #include "maindomfragment.h"