201025 PDK_4.0.a
authorhgs
Thu, 08 Jul 2010 14:00:07 +0530
changeset 29 5743aa3a72c3
parent 28 0802db42e4e9
201025
package_definition.xml
webservices/wsconnection/src/senserviceconnectionimpl.cpp
webservices/wsdescription/src/servicepolicy.cpp
webservices/wsfragment/src/rsendocument.cpp
webservices/wsframework/inc/senwebservicesession.h
webservices/wsframework/src/sencontextitem.cpp
webservices/wsframework/src/senmessagecontext.cpp
webservices/wsframework/src/senwebservicesession.cpp
webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp
webservices/wsmessages/src/senatomfeed.cpp
webservices/wsmessages/src/sensoapenvelope2.cpp
webservices/wsutils/src/senpropertieselement.cpp
webservices/wsxml/src/senxmlelement.cpp
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_c.bat
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_z.bat
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.pkg
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.sis
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.pkg
websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.sis
websrv_pub/hostlet_connection_api/tsrc/hostconnTester/group/hostconnTester.mmp
websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_c.bat
websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_z.bat
websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.pkg
websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.sis
websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.pkg
websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.sis
websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_c.bat
websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_z.bat
websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.pkg
websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.sis
websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.pkg
websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.sis
websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/group/senutilsTestCases.mmp
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.SIS
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.pkg
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.pkg
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.sis
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_c.bat
websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_z.bat
websrv_pub/web_service_description_api/tsrc/senservdescTester/group/senservdescTester.mmp
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.SIS
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.pkg
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.pkg
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.sis
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_c.bat
websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_z.bat
websrv_pub/web_service_manager_api/tsrc/senservicemanager/bmarm/senservicemanagerbctestu.def
websrv_pub/web_service_manager_api/tsrc/senservicemanagerTester/group/senservicemanagerTester.mmp
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_c.bat
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_z.bat
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.pkg
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.sis
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.pkg
websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.sis
websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/group/newsoapclassesTester.mmp
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/group/WSTester.mmp
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/WSTester.h
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.pkg
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.sis
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.pkg
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.sis
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTester.cpp
websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp
websrv_pub/xml_extensions_api/tsrc/senxmlTester/group/senxmlTester.mmp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/bwins/senfragmentbctestu.def
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/eabi/SenFragmentBCTestu.def
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/bld.inf
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/senfragment.mmp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testframework.ini
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_c.bat
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_z.bat
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/TestFragment.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatedomfragment.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatefragment.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/maindomfragment.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/mainfragment.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/senfragmentbctest.h
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.pkg
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.sis
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/TestFragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatedomfragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatefragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/maindomfragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/mainfragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragment.cpp
websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragmentcases.cpp
--- a/package_definition.xml	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
-  <package id="websrv" name="Web Services" levels="plugin framework server generic specific">
-    <collection id="webservices" name="Web Services Framework" level="generic">
-    	<!-- consider breaking this collection into more meaningful subsets -->
-      <component id="wsnotifierplugins" filter="s60" name="WS Notifier Plugins" class="plugin">
-        <unit bldFile="webservices/wsnotifierplugins/group"/>
-      </component>
-      <component id="wslogger" filter="s60" name="WS Logger">
-        <unit bldFile="webservices/wslogger/group"/>
-      </component>
-      <component id="wsxml" filter="s60" name="WS XML Extensions">
-        <unit bldFile="webservices/wsxml/group"/>
-      </component>
-      <component id="wsutils" filter="s60" name="WS Utils">
-        <unit bldFile="webservices/wsutils/group"/>
-      </component>
-      <component id="wsfragment" filter="s60" name="WS Fragment">
-        <unit bldFile="webservices/wsfragment/group"/>
-      </component>
-      <component id="wsdescription" filter="s60" name="WS Service Description">
-        <unit bldFile="webservices/wsdescription/group"/>
-      </component>
-      <component id="wshttpchanneltransportplugin" filter="s60" name="WS HTTP Channel Transport Plugin" class="plugin">
-        <unit bldFile="webservices/wshttpchanneltransportplugin/group"/>
-      </component>
-      <component id="wsconnection" filter="s60" name="WS Service Connection">
-        <unit bldFile="webservices/wsconnection/group"/>
-      </component>
-      <component id="wshostletconnection" filter="s60" name="WS Hostlet Connection">
-        <unit bldFile="webservices/wshostletconnection/group"/>
-      </component>
-      <component id="wscredentialmanager" filter="s60" name="WS Credential Manager">
-        <unit bldFile="webservices/wscredentialmanager/group"/>
-      </component>
-      <component id="wsmanager" filter="s60" name="WS Service Manager">
-        <unit bldFile="webservices/wsmanager/group"/>
-      </component>
-      <component id="wsidentitymanager" filter="s60" name="WS Identity Manager">
-        <unit bldFile="webservices/wsidentitymanager/group"/>
-      </component>
-      <component id="wsframework" filter="s60" name="WS Framework">
-        <unit bldFile="webservices/wsframework/group"/>
-      </component>
-      <component id="wsmessages" filter="s60" name="WS Messages">
-        <unit bldFile="webservices/wsmessages/group"/>
-      </component>
-      <component id="wsconnectionagent" filter="s60" name="WS Connection Agent">
-        <unit bldFile="webservices/wsconnectionagent/group"/>
-      </component>
-      <component id="idwsfplugin" filter="s60" name="ID-WSF Plugin" class="plugin">
-        <unit bldFile="webservices/idwsfplugin/group"/>
-      </component>
-      <component id="wsibasicplugin" filter="s60" name="WS-I Basic Plugin" class="plugin">
-        <unit bldFile="webservices/wsibasicplugin/group"/>
-      </component>
-      <component id="wsrestplugin" filter="s60" name="WS REST Plugin" class="plugin">
-        <unit bldFile="webservices/wsrestplugin/group"/>
-      </component>
-      <component id="idwsfsecuritymechanism" filter="s60" name="ID-WSF Security Mechanism">
-        <unit bldFile="webservices/idwsfsecuritymechanism/group"/>
-      </component>
-      <component id="wspasswordtransforms" filter="s60" name="WS Password Transforms">
-        <unit bldFile="webservices/wspasswordtransforms/group"/>
-      </component>
-      <component id="wscore" filter="s60" name="WS Core Service Manager">
-        <unit bldFile="webservices/wscore/group"/>
-      </component>
-      <component id="wsprovider" filter="s60" name="WS Provider">
-        <unit bldFile="webservices/wsprovider/group"/>
-      </component>
-      <component id="wslocaltransportplugin" filter="s60" name="WS Local Transport Plugin" class="plugin">
-        <unit bldFile="webservices/wslocaltransportplugin/group"/>
-      </component>
-      <component id="wshostlettransportplugin" filter="s60" name="WS Hostlet Transport Plugin" class="plugin">
-        <unit bldFile="webservices/wshostlettransportplugin/group"/>
-      </component>
-      <component id="wsstar" filter="s60" name="WS Star">
-        <!-- <unit bldFile="webservices/wsstar/group"/> -->
-      </component>
-      <component id="wsoviplugin" filter="s60" name="WS Ovi Plugin">
-        <unit bldFile="webservices/wsoviplugin/group"/>
-      </component>
-      <component id="webservices_build" filter="s60" name="Web Services Build">
-        <unit bldFile="webservices/group"/>
-      </component>
-    </collection>
-    <collection id="websrv_info" name="Web Services Info" level="specific">
-      <component id="websrv_pub" filter="s60" name="Web Services Public Interfaces" class="api">
-        <unit bldFile="websrv_pub/group"/>
-        	<!-- should these be #included? -->
-        <!-- <unit bldFile="websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group"/> -->
-        <!-- <unit bldFile="websrv_pub/hostlet_connection_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/hostlet_connection_api/tsrc/hostconn/group"/> -->
-        <!-- <unit bldFile="websrv_pub/hostlet_connection_api/tsrc/hostconntester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/bc/connection/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/bc/senutils/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/connection/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/senconnectiontester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/senconnectiontimeoutstester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/senlayeredpropertiestester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/senutils/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/senutilstestcases/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/wspolicytester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_connection_api/tsrc/wsstarmessagehandlertester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_description_api/tsrc/bc/senservdesc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_description_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_description_api/tsrc/senservdesc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_description_api/tsrc/senservdesctester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_manager_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_manager_api/tsrc/senservicemanager/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_manager_api/tsrc/senservicemanagertester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_messaging_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_messaging_api/tsrc/newsoapclasses/group"/> -->
-        <!-- <unit bldFile="websrv_pub/web_service_messaging_api/tsrc/newsoapclassestester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/xml_extensions_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/xml_extensions_api/tsrc/senxml/group"/> -->
-        <!-- <unit bldFile="websrv_pub/xml_extensions_api/tsrc/senxmltester/group"/> -->
-        <!-- <unit bldFile="websrv_pub/xml_fragment_api/tsrc/group"/> -->
-        <!-- <unit bldFile="websrv_pub/xml_fragment_api/tsrc/senfragmenttester/group"/> -->
-      </component>
-    </collection>
-  </package>
-</SystemDefinition>
--- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -621,6 +621,7 @@
             TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - ESenInternalError");
             retVal = KErrSenInternal;
             }
+            break;
         default:
             {
             TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"SubmitL - default");
@@ -2511,16 +2512,19 @@
     		}
     	else
         	{
-    	TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
-    	CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
-    	if (pAsyncOp)
-    	    {
-            TInt idx = AsyncOpsArrayL().Find(pAsyncOp);    
-            if (idx >= 0)
-                {
-                AsyncOpsArrayL().Remove(idx);
-                }
-    	    pAsyncOp->iActive = NULL;
+	    	TMessage message = ipSenServiceDispatcher->GetMessageFromQueue(aTransactionID);
+	    	CSenAsyncOperation* pAsyncOp = message.iSenAsyncOperation;
+	    	if (pAsyncOp)
+	    	    {
+	            TInt idx(-1);
+	            TRAP( retVal,
+					idx = AsyncOpsArrayL().Find(pAsyncOp);
+		            if (idx >= 0)
+		                {
+		                AsyncOpsArrayL().Remove(idx);
+		                }
+				  );
+	    	    pAsyncOp->iActive = NULL;
     	    
     	    pAsyncOp->Cancel();
             delete pAsyncOp;
--- a/webservices/wsdescription/src/servicepolicy.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsdescription/src/servicepolicy.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -787,8 +787,6 @@
             return EFalse;
     }                    
 
-    return EFalse;
-    
 }
 HBufC8* CServicePolicy::ClientPolicyValue(const TDesC8& aKey)
     {
--- a/webservices/wsfragment/src/rsendocument.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsfragment/src/rsendocument.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -59,12 +59,17 @@
     RXmlEngDocument doc;
     doc.OpenL(domImpl);
     RSenDocument document;
+    CleanupClosePushL(document);
+	document.ipData =  NULL;
+	document.iInternal = NULL;
     document.ipData = new (ELeave) TSenDocumentData;
     document.iInternal =
         (reinterpret_cast<RSenDocument*>(const_cast<RXmlEngDocument*>(&doc)))->iInternal;
     document.ipData->iInternal = document.iInternal;
+	document.ipData->ipOpenDocuments = NULL;
     document.ipData->ipOpenDocuments = new (ELeave) TInt(1);
     document.ipData->iDomImpl = domImpl;
+    CleanupStack::Pop();
     TCleanupItem cleanup(CleanupRSenDocument, document.ipData);
     CleanupStack::PushL(cleanup);
     return document;
@@ -89,12 +94,17 @@
     RXmlEngDocument doc;
     doc.OpenL(domImpl, aInternal);
     RSenDocument document;
+    CleanupClosePushL(document);
+	document.ipData =  NULL;
+	document.iInternal = NULL;	 
     document.ipData = new (ELeave) TSenDocumentData;
     document.iInternal =
         (reinterpret_cast<RSenDocument*>(const_cast<RXmlEngDocument*>(&doc)))->iInternal;
     document.ipData->iInternal = document.iInternal;
+	document.ipData->ipOpenDocuments = NULL;	
     document.ipData->ipOpenDocuments = new (ELeave) TInt(1);
     document.ipData->iDomImpl = domImpl;
+     CleanupStack::Pop();
     TCleanupItem cleanup(CleanupRSenDocument, document.ipData);
     CleanupStack::PushL(cleanup);
     return document;
@@ -108,26 +118,28 @@
 
 EXPORT_C void RSenDocument::Close()
     {
-    *ipData->ipOpenDocuments = *ipData->ipOpenDocuments - 1;
-    if ( !*ipData->ipOpenDocuments )
-        {
-        RXmlEngDOMImplementation domImpl = ipData->iDomImpl;
-        iInternal = ipData->iInternal;
-        delete ipData->ipOpenDocuments;
-        delete ipData;
-        RXmlEngDocument::Close();
-        domImpl.Close();
-    	TBool* pDisabled = (TBool*)Dll::Tls();
-    	if ( !pDisabled )
-    	    {
-            XmlEngineCleanup();
-    	    }
-        }
-    else
-        {
-        iInternal = NULL;
-        }
-       
+	if(ipData && ipData->ipOpenDocuments)
+		{
+	    *ipData->ipOpenDocuments = *ipData->ipOpenDocuments - 1;
+	    if ( !*ipData->ipOpenDocuments )
+	        {
+	        RXmlEngDOMImplementation domImpl = ipData->iDomImpl;
+	        iInternal = ipData->iInternal;
+	        delete ipData->ipOpenDocuments;
+	        delete ipData;
+	        RXmlEngDocument::Close();
+	        domImpl.Close();
+	    	TBool* pDisabled = (TBool*)Dll::Tls();
+	    	if ( !pDisabled )
+	    	    {
+	            XmlEngineCleanup();
+	    	    }
+	        }
+	    else
+	        {
+	        iInternal = NULL;
+	        }
+       }
     }
 
 EXPORT_C void RSenDocument::Destroy()
--- a/webservices/wsframework/inc/senwebservicesession.h	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsframework/inc/senwebservicesession.h	Thu Jul 08 14:00:07 2010 +0530
@@ -293,6 +293,7 @@
 
          // Data, which also subclasses can access
         TTime iValidUntil;
+        TTime iMaxTime;
         
         RSenCredentialPtr  iCredentialPtr;
         HBufC8* iTransportCue; 
--- a/webservices/wsframework/src/sencontextitem.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsframework/src/sencontextitem.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -107,6 +107,7 @@
                     ipData = NULL;
                     }
                 }
+                break;
             case ECSenWSDescription:
                 {
                 CSenWSDescription* p = (CSenWSDescription*) ipData;
--- a/webservices/wsframework/src/senmessagecontext.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsframework/src/senmessagecontext.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -397,6 +397,7 @@
     CSenContextItem* pItem = MessageToItem( apMessage, aOwned, leaveCode );
     if( leaveCode != KErrNone ) 
         {
+         delete pItem;	
         return leaveCode;
         }
 
@@ -415,6 +416,7 @@
     CSenContextItem* pItem = MessageToItem( apMessage, aOwned, leaveCode );
     if( leaveCode != KErrNone ) 
         {
+        	delete pItem;
         return leaveCode;
         }
 
--- a/webservices/wsframework/src/senwebservicesession.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsframework/src/senwebservicesession.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -98,6 +98,7 @@
     // Init member variables
     iClientServerInterval = 0;
     iValidUntil = Time::NullTTime();
+    iMaxTime = Time::NullTTime();;
     iFrameworkId = iFramework.Id().AllocL();
     }
 
@@ -1553,9 +1554,12 @@
         }
     else
         {
-        const TTime& MAX_TIME = Time::MaxTTime();
-        return MAX_TIME; // if no expiration was set, the session is
+        //const TTime& MAX_TIME = Time::MaxTTime();
+        //return MAX_TIME; // if no expiration was set, the session is
                          // valid forever(!)
+         iMaxTime = Time::MaxTTime();
+         return iMaxTime;             
+                         
         }
     }
 
--- a/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -482,10 +482,7 @@
     	{
     	iHttpChannel->SetExplicitIapDefined(ETrue);
     	}	
-    if(iHttpChannel)
-    	{
     	iHttpChannel->DisableTimeOutL(aRequestId);
-    	}
 #ifdef _SENDEBUG    
     TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- Request's txnID: %d"), aRequestId));
     if ( apErrorBody )
--- a/webservices/wsmessages/src/senatomfeed.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsmessages/src/senatomfeed.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -113,7 +113,7 @@
     //from table
     for (TInt aIndex = 0; aIndex < iEntries.Count(); aIndex++ )
         {
-        const TDesC8& tmp = iEntries[aIndex]->IdTag();//delete this
+       // const TDesC8& tmp = iEntries[aIndex]->IdTag();//delete this
         if(aEntryId.Compare(iEntries[aIndex]->IdTag())==0)
             {
             delete iEntries[aIndex];
--- a/webservices/wsmessages/src/sensoapenvelope2.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsmessages/src/sensoapenvelope2.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -188,7 +188,8 @@
 :   ipBodyFragment(NULL),
     ipHeaderFragment(NULL),
     ipSoapAction(NULL),
-    iFault(EFalse)
+    iFault(EFalse),
+    iTransactionId(KErrNotFound)
     {
     }
 
--- a/webservices/wsutils/src/senpropertieselement.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsutils/src/senpropertieselement.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -332,9 +332,10 @@
             {
             CSenNamespace* pNamespace = sourceNamespaces[i];
             CSenNamespace* pNewNamespace =
-                CSenNamespace::NewL(pNamespace->Prefix(),pNamespace->URI());
-
+            CSenNamespace::NewL(pNamespace->Prefix(),pNamespace->URI());
+			CleanupStack::PushL(pNewNamespace);
             CSenXmlElement::AddNamespaceL(*pNewNamespace, EFalse);
+            CleanupStack::Pop(); 	
             }
         }
 
--- a/webservices/wsxml/src/senxmlelement.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/webservices/wsxml/src/senxmlelement.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -1232,13 +1232,14 @@
     if (pNamespace == NULL) // does not exist
         {
         CSenNamespace* pNewNamespace =
-            CSenNamespace::NewL(aNewNamespace.Prefix(), aNewNamespace.URI());
-
+        CSenNamespace::NewL(aNewNamespace.Prefix(), aNewNamespace.URI());
+		CleanupStack::PushL(pNewNamespace); 
         // allocate array if not already reserved
         if(!ipNamespaces)
             {
             ipNamespaces = new (ELeave) RPointerArray<CSenNamespace>;
             }
+        CleanupStack::Pop();			
         ipNamespaces->Append(pNewNamespace);
         pNamespace = pNewNamespace;
         }
@@ -1254,12 +1255,14 @@
 		{
 		if ( aUri.Length() > 0)
 			{
-				pNamespace = CSenNamespace::NewL(aPrefix, aUri);
+			pNamespace = CSenNamespace::NewL(aPrefix, aUri);
+			CleanupStack::PushL(pNamespace); 
 			// allocate array if not already reserved
 			if(!ipNamespaces)
 				{
 				ipNamespaces = new (ELeave) RPointerArray<CSenNamespace>;
 				}
+			 CleanupStack::Pop();				
 			ipNamespaces->Append(pNamespace);
 			}
 		}
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -20,4 +20,4 @@
 
 ATSINTERFACE.EXE -testmodule HostletConnectionBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_HostConn.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_HostConn.txt
\ No newline at end of file
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/group/testhc_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -21,4 +21,4 @@
 
 ATSINTERFACE.EXE -testmodule HostletConnectionBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_HostConn.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_HostConn.txt
\ No newline at end of file
--- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices hostlet"},(0x20015A25),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\HostletConnectionBCTest.dll"-"!:\sys\bin\HostletConnectionBCTest.dll"
-"\Epoc32\winscw\c\testhc_c.bat"-"!:\testHC.bat"
-"\Epoc32\winscw\c\testframework\testframework_hostlet.ini"-"!:\testframework\testframework_hostlet.ini"
\ No newline at end of file
Binary file websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/50_asp_hostconn.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices hostlet"},(0x20015A25),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\HostletConnectionBCTest.dll"-"!:\sys\bin\HostletConnectionBCTest.dll"
+"\Epoc32\winscw\c\testhc_c.bat"-"!:\testHC.bat"
+"\Epoc32\winscw\c\testframework\testframework_hostlet.ini"-"!:\testframework\testframework_hostlet.ini"
\ No newline at end of file
Binary file websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/sis/52_websrv_hostconn.sis has changed
--- a/websrv_pub/hostlet_connection_api/tsrc/hostconnTester/group/hostconnTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/hostlet_connection_api/tsrc/hostconnTester/group/hostconnTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -33,7 +33,6 @@
 
 //USERINCLUDE             ../inc
 
-//SYSTEMINCLUDE           /epoc32/include
 SYSTEMINCLUDE       	/Epoc32/include/libc
 MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
 
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -20,4 +20,4 @@
 
 ATSINTERFACE.EXE -testmodule CSenServiceConnectionBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_ServiceConnection.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_ServiceConnection.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/testsc_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -21,4 +21,4 @@
 
 ATSINTERFACE.EXE -testmodule CSenServiceConnectionBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_ServiceConnection.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_ServiceConnection.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Connection"},(0x20016BAA),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\CSenServiceConnectionBCTest.dll"-"!:\sys\bin\CSenServiceConnectionBCTest.dll"
-"\Epoc32\winscw\c\testSC_c.bat"-"!:\testSC.bat"
-"\Epoc32\winscw\c\testframework\testframework_connection.ini"-"!:\testframework\testframework_connection.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/50_asp_connection.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,37 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Connection"},(0x20016BAA),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\CSenServiceConnectionBCTest.dll"-"!:\sys\bin\CSenServiceConnectionBCTest.dll"
+"\Epoc32\winscw\c\testSC_c.bat"-"!:\testSC.bat"
+"\Epoc32\winscw\c\testframework\testframework_connection.ini"-"!:\testframework\testframework_connection.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/connection/sis/52_websrv_connection.sis has changed
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -20,4 +20,4 @@
 
 ATSINTERFACE.EXE -testmodule SenUtilsBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_SenUtils.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenUtils.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/group/testsu_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -21,4 +21,4 @@
 
 ATSINTERFACE.EXE -testmodule SenUtilsBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_SenUtils.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenUtils.txt
\ No newline at end of file
--- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Utils"},(0x20016BAB),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenUtilsBCTest.dll"-"!:\sys\bin\SenUtilsBCTest.dll"
-"\Epoc32\winscw\c\testSU_c.bat"-"!:\testSU.bat"
-"\Epoc32\winscw\c\testframework\testframework_senutils.ini"-"!:\testframework\testframework_senutils.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/50_asp_senutils.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Utils"},(0x20016BAB),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenUtilsBCTest.dll"-"!:\sys\bin\SenUtilsBCTest.dll"
+"\Epoc32\winscw\c\testSU_c.bat"-"!:\testSU.bat"
+"\Epoc32\winscw\c\testframework\testframework_senutils.ini"-"!:\testframework\testframework_senutils.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_connection_api/tsrc/bc/senutils/sis/52_websrv_senutils.sis has changed
--- a/websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/group/senutilsTestCases.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_connection_api/tsrc/senutilsTestCases/group/senutilsTestCases.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -55,7 +55,6 @@
 //RESOURCE        resource_file2
 
 MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
-SYSTEMINCLUDE   /epoc32/include 
 SYSTEMINCLUDE   /epoc32/include/xml
 SYSTEMINCLUDE   /epoc32/include/libc
 
Binary file websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.SIS has changed
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/50_ASP_WSDescription.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Description"},(0x10282CAB),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenServDescBCTest.dll"-"!:\sys\bin\SenServDescBCTest.dll"
-"\Epoc32\winscw\c\testSD_c.bat"-"!:\testSD.bat"
-"\Epoc32\winscw\c\testframework\testframework_senservdesc.ini"-"!:\testframework\testframework_senservdesc.ini"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Description"},(0x10282CAB),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenServDescBCTest.dll"-"!:\sys\bin\SenServDescBCTest.dll"
+"\Epoc32\winscw\c\testSD_c.bat"-"!:\testSD.bat"
+"\Epoc32\winscw\c\testframework\testframework_senservdesc.ini"-"!:\testframework\testframework_senservdesc.ini"
Binary file websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/52_websrv_wsdescription.sis has changed
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -19,5 +19,5 @@
 md e:\BCTest\Results
 
 ATSINTERFACE.EXE -testmodule SenServDescBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSDescription.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSDescription.txt
 
--- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/sis/TestSD_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -19,5 +19,5 @@
 md e:\BCTest\Results
 
 ATSINTERFACE.EXE -testmodule SenServDescBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSDescription.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSDescription.txt
 
--- a/websrv_pub/web_service_description_api/tsrc/senservdescTester/group/senservdescTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_description_api/tsrc/senservdescTester/group/senservdescTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -37,7 +37,6 @@
 //TARGETPATH      ?target_path
 DEFFILE         senservdescTester.def
 
-SYSTEMINCLUDE   /epoc32/include 
 MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
 #ifdef SBSV2
 	USERINCLUDE     ../inc 
Binary file websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.SIS has changed
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/50_ASP_WSManager.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices Manager"},(0x10282CAC),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\SenServiceManagerBCTest.dll"-"!:\sys\bin\SenServiceManagerBCTest.dll"
-"\Epoc32\winscw\c\testSM_c.bat"-"!:\testSM.bat"
-"\Epoc32\winscw\c\testframework\testframework_senservicemanager.ini"-"!:\testframework\testframework_senservicemanager.ini"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Manager"},(0x10282CAC),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenServiceManagerBCTest.dll"-"!:\sys\bin\SenServiceManagerBCTest.dll"
+"\Epoc32\winscw\c\testSM_c.bat"-"!:\testSM.bat"
+"\Epoc32\winscw\c\testframework\testframework_senservicemanager.ini"-"!:\testframework\testframework_senservicemanager.ini"
Binary file websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/52_websrv_wsmanager.sis has changed
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -19,4 +19,4 @@
 md e:\BCTest\Results
 
 ATSINTERFACE.EXE -testmodule SenServiceManagerBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSManager.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSManager.txt
--- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/sis/TestSM_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -20,4 +20,4 @@
 md e:\BCTest\Results
 
 ATSINTERFACE.EXE -testmodule SenServiceManagerBCTest
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_WSManager.txt
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_WSManager.txt
--- a/websrv_pub/web_service_manager_api/tsrc/senservicemanager/bmarm/senservicemanagerbctestu.def	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_manager_api/tsrc/senservicemanager/bmarm/senservicemanagerbctestu.def	Thu Jul 08 14:00:07 2010 +0530
@@ -1,3 +1,3 @@
-EXPORTS
-	LibEntryL__Fv @ 1 NONAME R3UNUSED ; LibEntryL(void)	SetRequirements__FRP16CTestModuleParamRUl @ 2 NONAME R3UNUSED ; SetRequirements(CTestModuleParam *&, unsigned long &)
-
+EXPORTS
+	LibEntryL__Fv @ 1 NONAME R3UNUSED ; LibEntryL(void)
	SetRequirements__FRP16CTestModuleParamRUl @ 2 NONAME R3UNUSED ; SetRequirements(CTestModuleParam *&, unsigned long &)
+
--- a/websrv_pub/web_service_manager_api/tsrc/senservicemanagerTester/group/senservicemanagerTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_manager_api/tsrc/senservicemanagerTester/group/senservicemanagerTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -56,7 +56,6 @@
 
 	SOURCEPATH      ../src
 #endif // SBSV2
-SYSTEMINCLUDE   /epoc32/include 
 MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
 SYSTEMINCLUDE   /epoc32/include/libc
 
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_c.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -20,4 +20,4 @@
 
 ATSINTERFACE.EXE -testmodule NewSoapClassesBCTest
 
-copy C:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_NewSoapClasses.txt
\ No newline at end of file
+copy C:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_NewSoapClasses.txt
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_z.bat	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/group/testnsc_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -21,4 +21,4 @@
 
 ATSINTERFACE.EXE -testmodule NewSoapClassesBCTest
 
-copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\ASP_NewSoapClasses.txt
\ No newline at end of file
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_NewSoapClasses.txt
\ No newline at end of file
--- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:        
-;
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices SoapClasses"},(0x20015A26),3,0,0,TYPE=SA
-[0x101F7961],0,0,0,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\NewSoapClassesBCTest.dll"-"!:\sys\bin\NewSoapClassesBCTest.dll"
-"\Epoc32\winscw\c\testNSC_c.bat"-"!:\testNSC.bat"
-"\Epoc32\winscw\c\testframework\testframework_newsoapclasses.ini"-"!:\testframework\testframework_newsoapclasses.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/50_asp_newsoapclasses.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices SoapClasses"},(0x20015A26),3,0,0,TYPE=SA
+[0x101F7961],0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\NewSoapClassesBCTest.dll"-"!:\sys\bin\NewSoapClassesBCTest.dll"
+"\Epoc32\winscw\c\testNSC_c.bat"-"!:\testNSC.bat"
+"\Epoc32\winscw\c\testframework\testframework_newsoapclasses.ini"-"!:\testframework\testframework_newsoapclasses.ini"
\ No newline at end of file
Binary file websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/sis/52_websrv_newsoapclasses.sis has changed
--- a/websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/group/newsoapclassesTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/web_service_messaging_api/tsrc/newsoapclassesTester/group/newsoapclassesTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -35,7 +35,6 @@
 //TARGETPATH      ?target_path
 DEFFILE         newsoapclassesTester.def
 
-SYSTEMINCLUDE           /epoc32/include
 SYSTEMINCLUDE           /epoc32/include/xml
 SYSTEMINCLUDE           /epoc32/include/libc
 APP_LAYER_SYSTEMINCLUDE  //SYSTEMINCLUDE
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/group/WSTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/group/WSTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  ?Description
+* Description:    Project specification file for wstester
 *
 */
 
@@ -27,7 +27,7 @@
 #if defined(EKA2)
 CAPABILITY	ALL -TCB
 /* Remove comments and replace 0x00000000 with correct vendor id */
-// VENDORID 	0x00000000
+VENDORID VID_DEFAULT
 #endif
 
 //TARGETPATH      ?target_path
@@ -56,7 +56,7 @@
 LIBRARY		SenUtils.lib
 
 LIBRARY		efsrv.lib
-LIBRARY		imut.lib // base64 enc/dec
+LIBRARY 	inetprotutil.lib // for base64 encoding
 LIBRARY		estor.lib
 LIBRARY		XMLFRAMEWORK.lib
 LIBRARY 	bafl.lib
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/WSTester.h	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/inc/WSTester.h	Thu Jul 08 14:00:07 2010 +0530
@@ -24,8 +24,8 @@
 #include <StifLogger.h>
 #include <TestScripterInternal.h>
 #include <StifTestModule.h>
-#include <f32file.h>
-#include <imcvcodc.h> // for base64 codec
+#include <s32file.H>
+#include <tconvbase64.h>
 #include <s32strm.h>
 
 //Sen
@@ -484,7 +484,7 @@
         //logging
         CStifLogger* iLog;
         //For decrypting data....
-		TImCodecB64 iBase64Codec;
+				TBase64 iBase64Codec;
         RFs	iFsSession;
         TInt iRunCase;
         TInt iStarted;
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.pkg	Sun May 30 23:54:06 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; Languages
-; none -  English only by default
-&EN
-
-; Installation header
-; Only one component name as we only support English
-; UID is the main app's UID
-
-#{"WebServices XMLExtensions"},(0x10282C8A),1,0,0,TYPE=SA
-[0x101F7961],3,*,*,{"Series60ProductID"}
-
-; Non-localised vendor name
-:"Nokia Corporation"
-
-; Localised vendor names
-%{"Nokia Corporation"}
-
-; Files to install and to where
-"\Epoc32\Release\armv5\urel\wstester.dll"-"!:\sys\bin\wstester.dll"
-"\Epoc32\winscw\c\TestInit.bat"-"!:\TestInit.bat"
Binary file websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/51_WebSrv_WSXML.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,35 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices XMLExtensions"},(0x10282C8A),1,0,0,TYPE=SA
+[0x101F7961],3,*,*,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\wstester.dll"-"!:\sys\bin\wstester.dll"
+"\Epoc32\winscw\c\TestInit.bat"-"!:\TestInit.bat"
Binary file websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/sis/52_websrv_wsxml.sis has changed
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTester.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTester.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -92,7 +92,8 @@
 //
 void CWSTester::ConstructL()
     {
-    //__UHEAP_MARK;
+ //   __UHEAP_MARK;
+    TestModuleIf().SetBehavior(CTestModuleIf::ETestLeaksHandles);
     iLog = CStifLogger::NewL( KWSTesterLogPath, 
                           KWSTesterLogFile,
                           CStifLogger::ETxt,
--- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -248,6 +248,11 @@
 		{
 			// Test case not passed
 			iLog->Log(_L("Registering identity provider 1 failed. Error: %d"), error );
+			if(error == -30321)
+			{
+				iWriter.WriteL(_L8("Registering identity provider 1 failed. End-user denies permission."));
+				iWriter.CommitL();
+			}
 			return error;
 		}
         return KErrNone;
@@ -279,6 +284,11 @@
 	if (error != KErrNone )
 	{
 		iLog->Log(_L("Registering Service Description failed. Error: %d"), error );
+		if(error == -30321)
+		{
+			iWriter.WriteL(_L8("Registering Service Description failed.End-user denies permission"));
+			iWriter.CommitL();
+		}
 		return error;
 	}
     return KErrNone;
@@ -464,7 +474,7 @@
 
 	TInt retVal = iSenServiceConnection->StartTransaction();
 	
-	iLog->Log(_L("### _S_StartTransaction -> ended###"));
+	iLog->Log(_L("### _S_StartTransaction -> ended: %d"), retVal);
 	return retVal;
 }
 
@@ -474,7 +484,7 @@
 
 	TInt retVal = iSenServiceConnection->TransactionCompleted();
 	
-	iLog->Log(_L("### _S_TransactionCompleted -> ended###"));
+	iLog->Log(_L("### _S_TransactionCompleted -> ended: %d"), retVal);
 	return retVal;
 }
 
@@ -2733,6 +2743,7 @@
 	{
 
 		iLog->Log(_L("******* SetStatus -> Started! ********"));
+		iLog->Log(_L("Status: %d"), aStatus);
 
 	switch( aStatus )
 		{
@@ -3267,7 +3278,6 @@
 
 	HBufC8* pResult8 = HBufC8::NewLC( source8.Length() );
 	TPtr8 result8 = pResult8->Des();
-	iBase64Codec.Initialise();
 	iBase64Codec.Decode(source8	, result8);
 	aMessage = result8;
 	CleanupStack::Pop(); // pResult8
--- a/websrv_pub/xml_extensions_api/tsrc/senxmlTester/group/senxmlTester.mmp	Sun May 30 23:54:06 2010 +0530
+++ b/websrv_pub/xml_extensions_api/tsrc/senxmlTester/group/senxmlTester.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -61,7 +61,6 @@
 //RESOURCE        resource_file
 //RESOURCE        resource_file2
 
-SYSTEMINCLUDE   /epoc32/include 
 SYSTEMINCLUDE   /epoc32/include/libc
 MW_LAYER_SYSTEMINCLUDE //SYSTEMINCLUDE
 LIBRARY         bafl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/bwins/senfragmentbctestu.def	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,8 @@
+EXPORTS
+	?LibEntryL@@YAPAVCTestModuleBase@@XZ @ 1 NONAME ; class CTestModuleBase * LibEntryL(void)
+	?SetRequirements@@YAHAAPAVCTestModuleParam@@AAK@Z @ 2 NONAME ; int SetRequirements(class CTestModuleParam * &, unsigned long &)
+	?ContentOf@CTestDomFragmentBase@@QAE?AVTPtrC8@@ABVTDesC8@@@Z @ 3 NONAME ; class TPtrC8 CTestDomFragmentBase::ContentOf(class TDesC8 const &)
+	?SetContentOfL@CTestDomFragmentBase@@QAE?AVTXmlEngElement@@ABVTDesC8@@0@Z @ 4 NONAME ; class TXmlEngElement CTestDomFragmentBase::SetContentOfL(class TDesC8 const &, class TDesC8 const &)
+	?SetContentL@CTestFragmentBase@@UAEXABVTDesC8@@@Z @ 5 NONAME ; void CTestFragmentBase::SetContentL(class TDesC8 const &)
+	?AddContentL@CTestFragmentBase@@UAEXABVTDesC8@@@Z @ 6 NONAME ; void CTestFragmentBase::AddContentL(class TDesC8 const &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/eabi/SenFragmentBCTestu.def	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,18 @@
+EXPORTS
+	_Z9LibEntryLv @ 1 NONAME
+	_Z15SetRequirementsRP16CTestModuleParamRm @ 2 NONAME
+	_ZN17CTestFragmentBase11AddContentLERK6TDesC8 @ 3 NONAME
+	_ZN17CTestFragmentBase11SetContentLERK6TDesC8 @ 4 NONAME
+	_ZN20CTestDomFragmentBase13SetContentOfLERK6TDesC8S2_ @ 5 NONAME
+	_ZN20CTestDomFragmentBase9ContentOfERK6TDesC8 @ 6 NONAME
+	_ZTI13CMainFragment @ 7 NONAME ; #<TI>#
+	_ZTI16CMainDomFragment @ 8 NONAME ; #<TI>#
+	_ZTI17CDelegateFragment @ 9 NONAME ; #<TI>#
+	_ZTI17CTestFragmentBase @ 10 NONAME ; #<TI>#
+	_ZTI20CDelegateDomFragment @ 11 NONAME ; #<TI>#
+	_ZTV13CMainFragment @ 12 NONAME ; #<VT>#
+	_ZTV16CMainDomFragment @ 13 NONAME ; #<VT>#
+	_ZTV17CDelegateFragment @ 14 NONAME ; #<VT>#
+	_ZTV17CTestFragmentBase @ 15 NONAME ; #<VT>#
+	_ZTV20CDelegateDomFragment @ 16 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/bld.inf	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Build information file for senfragment
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+// Specify the source file followed by its destination here
+// copy will be used to copy the source file to its destination
+// If there's no destination then the source file will be copied
+// to the same name in /epoc32/include
+
+testsf_c.bat		/epoc32/winscw/c/TestSF_c.bat
+testsf_z.bat		/epoc32/winscw/c/TestSF_z.bat
+testframework.ini		/epoc32/winscw/c/testframework/testframework_senfragment.ini
+
+/*
+/agnmodel/inc/AGMCOMON.H
+*/
+
+PRJ_TESTMMPFILES
+// NOTE: If using ARS requirements .mmp file operation should be done under this.
+// 'abld test build'
+
+PRJ_MMPFILES
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+senfragment.mmp
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/senfragment.mmp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Project specification file for senfragment
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET          SenFragmentBCTest.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E7
+
+#if defined(EKA2)
+CAPABILITY      ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+VENDORID        VID_DEFAULT
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID     0x00000000
+#endif
+
+//TARGETPATH      ?target_path
+DEFFILE         senfragmentbctest.def
+
+SOURCEPATH      ../src
+SOURCE          senfragment.cpp
+SOURCE          senfragmentcases.cpp
+SOURCE          mainfragment.cpp
+SOURCE          delegatefragment.cpp
+SOURCE          maindomfragment.cpp
+SOURCE          delegatedomfragment.cpp
+SOURCE 					TestFragment.cpp
+
+
+//RESOURCE        resource_file
+//RESOURCE        resource_file2
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../../../../../webservices/wsfragment/inc
+
+SYSTEMINCLUDE   /epoc32/include/libc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY         bafl.lib
+LIBRARY         charconv.lib
+LIBRARY         euser.lib
+LIBRARY         estor.lib
+LIBRARY         efsrv.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         SenFragment.lib
+LIBRARY         SenXml.lib
+LIBRARY		    	SenServDesc.lib
+LIBRARY         XMLFRAMEWORK.lib
+
+#if !defined( RD_SEN_BACKPORT_CHANGE_FOR_LIBXML2_UIDS_AND_WSSTAR_IMAGE_NAME_PREFIXES )
+    //LIBRARY                 XmlEngine.lib
+    LIBRARY                 XmlEngineDOM.lib
+    //LIBRARY                 XmlEngineUtils.lib
+#else
+    LIBRARY         WsStarXmlEngine.lib
+    LIBRARY         WsStarXmlEngineDOM.lib
+    LIBRARY         WsStarXmlEngineUtils.lib
+#endif
+
+LANG            SC
+
+// AIF ?filename// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testframework.ini	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,178 @@
+#
+# This is STIFTestFramework initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if 
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module. 
+
+[Engine_Defaults]
+
+TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
+                                                               'TestCases' or 'FullReport'
+
+CreateTestReport= YES			# Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT			# Possible values: TXT or HTML
+TestReportOutput= FILE			# Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= SenFragmentBCTest
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIFTestFramework logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number 
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
+
+#CreateLogDirectories= YES		# Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML			# Possible values: TXT or HTML
+#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML			# Possible values: TXT or HTML
+#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES			# Possible values: YES or NO
+#WithTimeStamp= YES			# Possible values: YES or NO
+#WithLineBreak= YES			# Possible values: YES or NO
+#WithEventRanking= YES			# Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_c.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,23 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:        
+rem
+
+copy c:\TestFramework\TestFramework_senfragment.ini c:\TestFramework\TestFramework.ini
+md e:\BCTest
+md e:\BCTest\results
+
+ATSINTERFACE.EXE -testmodule SenFragmentBCTest
+
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenFragment.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/group/testsf_z.bat	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,24 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:        
+rem
+
+copy z:\TestFramework\TestFramework_senfragment.ini c:\TestFramework\TestFramework.ini
+
+md e:\BCTest
+md e:\BCTest\results
+
+ATSINTERFACE.EXE -testmodule SenFragmentBCTest
+
+copy c:\Logs\TestFramework\TestReport.txt e:\BCTest\results\WebSrv_SenFragment.txt
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/TestFragment.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  senfragment header declaration      
+*
+*/
+
+
+
+
+
+
+
+
+
+#ifndef TESTFRAGMENT_H
+#define TESTFRAGMENT_H
+
+#include <e32std.h>
+#include <f32file.h>
+#include "SenFragmentBase.h"
+#include "SenDomFragmentBase.h"
+
+
+
+class CTestFragmentBase :public CSenFragmentBase
+{
+public:    
+    static CTestFragmentBase* NewL(const TDesC8& aLocalName);
+    IMPORT_C void SetContentL(const TDesC8& aContent);
+	IMPORT_C void AddContentL(const TDesC8& aContent);    
+};
+
+
+
+class CTestDomFragmentBase :public CSenDomFragmentBase
+{
+public:    
+    static CTestDomFragmentBase* NewL(const TDesC8& aLocalName);
+    IMPORT_C TXmlEngElement SetContentOfL(const TDesC8& aLocalName,
+                                        const TDesC8& aContent);
+	IMPORT_C TPtrC8 ContentOf(const TDesC8& aLocalName);                                        
+
+};
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatedomfragment.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  domfragment header declaration      
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef DELEGATE_DOM_FRAGMENT_H
+#define DELEGATE_DOM_FRAGMENT_H
+
+//  INCLUDES
+#include "SenDomFragmentBase.h"
+
+class CDelegateDomFragment : public CSenDomFragmentBase
+    {
+    public:  // Constructors and destructor
+
+        static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+                                          const TDesC8& aLocalName,
+                                          const TDesC8& aQName,
+                                          const RAttributeArray& aAttributes);
+
+        static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+                                           const TDesC8& aLocalName,
+                                           const TDesC8& aQName,
+                                           const RAttributeArray& aAttributes);
+
+        static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+                                          const TDesC8& aLocalName,
+                                          const TDesC8& aQName,
+                                          const RAttributeArray& aAttributes,
+                                          TXmlEngElement& aParent);
+
+        static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+                                           const TDesC8& aLocalName,
+                                           const TDesC8& aQName,
+                                           const RAttributeArray& aAttributes,
+                                           TXmlEngElement& aParent);
+
+        static CDelegateDomFragment* NewL(const TDesC8& aNsUri,
+                                          const TDesC8& aLocalName,
+                                          const TDesC8& aQName,
+                                          const RAttributeArray& aAttrs,
+                                          TXmlEngElement& aParent,
+                                          RSenDocument& aOwnerDocument);                                         
+
+        static CDelegateDomFragment* NewLC(const TDesC8& aNsUri,
+                                           const TDesC8& aLocalName,
+                                           const TDesC8& aQName,
+                                           const RAttributeArray& aAttrs,
+                                           TXmlEngElement& aParent,
+                                           RSenDocument& aOwnerDocument);                                         
+        /**
+        * Destructor.
+        */
+        virtual ~CDelegateDomFragment();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CDelegateDomFragment();
+    };
+
+#endif // DELEGATE_DOM_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/delegatefragment.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   senfragment header declaration
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef DELEGATE_FRAGMENT_H
+#define DELEGATE_FRAGMENT_H
+
+//  INCLUDES
+#include "SenFragmentBase.h"
+
+class CDelegateFragment : public CSenFragmentBase
+    {
+    public:  // Constructors and destructor
+
+        static CDelegateFragment* NewL(const TDesC8& aNsUri,
+                                         const TDesC8& aLocalName,
+                                         const TDesC8& aQName,
+                                         const RAttributeArray& aAttributes);
+
+        static CDelegateFragment* NewLC(const TDesC8& aNsUri,
+                                         const TDesC8& aLocalName,
+                                         const TDesC8& aQName,
+                                         const RAttributeArray& aAttributes);
+
+        static CDelegateFragment* NewL(const TDesC8& aNsUri,
+                                         const TDesC8& aLocalName,
+                                         const TDesC8& aQName,
+                                         const RAttributeArray& aAttributes,
+                                         TXmlEngElement& aParent);
+
+        static CDelegateFragment* NewLC(const TDesC8& aNsUri,
+                                         const TDesC8& aLocalName,
+                                         const TDesC8& aQName,
+                                         const RAttributeArray& aAttributes,
+                                         TXmlEngElement& aParent);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CDelegateFragment();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CDelegateFragment();
+    };
+
+#endif // DELEGATE_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/maindomfragment.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  senfragment header declaration      
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MAIN_DOM_FRAGMENT_H
+#define MAIN_DOM_FRAGMENT_H
+
+// INCLUDES
+#include "SenDomFragmentBase.h"
+#include "delegatedomfragment.h"
+
+// CLASS DECLARATIONS
+class CMainDomFragment :  public CSenDomFragmentBase
+    {
+    public: // Constructors and destructor
+
+        static CMainDomFragment* NewL();
+        static CMainDomFragment* NewLC();
+        static CMainDomFragment* NewL(const TDesC8& aNsUri,
+                                           const TDesC8& aLocalName,
+                                           const TDesC8& aQName);
+        static CMainDomFragment* NewLC(const TDesC8& aNsUri,
+                                            const TDesC8& aLocalName,
+                                            const TDesC8& aQName);
+        virtual ~CMainDomFragment();
+
+        CDelegateDomFragment& DelegateFragment();        
+
+    protected:
+
+        /**
+        * C++ default constructor.
+        */
+        CMainDomFragment();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+        void BaseConstructL(const TDesC8& aNsUri,
+                            const TDesC8& aLocalName,
+                            const TDesC8& aQName);
+
+        virtual void OnStartElementL(const RTagInfo& aElement,
+        							 const RAttributeArray& aAttributes,
+        						 	 TInt aErrorCode);
+
+        virtual void OnEndElementL(const RTagInfo& aElement,
+        						   TInt aErrorCode);
+
+        virtual void OnResumeParsingFromL(const RTagInfo& aElement, TInt aErrorCode);
+    private: // Data
+        CDelegateDomFragment* ipDelegateFragment;  // Owned
+    };
+
+#endif // MAIN_DOM_FRAGMENT_H
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/mainfragment.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  senfragment header declaration      
+*
+*/
+
+
+
+
+
+
+
+
+#ifndef MAIN_FRAGMENT_H
+#define MAIN_FRAGMENT_H
+
+// INCLUDES
+#include "SenFragmentBase.h"
+#include "delegatefragment.h"
+
+// CLASS DECLARATIONS
+class CMainFragment :  public CSenFragmentBase
+    {
+    public: // Constructors and destructor
+
+        static CMainFragment* NewL();
+        static CMainFragment* NewLC();
+        static CMainFragment* NewL(const TDesC8& aNsUri,
+                                           const TDesC8& aLocalName,
+                                           const TDesC8& aQName);
+        static CMainFragment* NewLC(const TDesC8& aNsUri,
+                                            const TDesC8& aLocalName,
+                                            const TDesC8& aQName);
+        virtual ~CMainFragment();
+        
+        CDelegateFragment& DelegateFragment(); 
+
+    protected:
+
+        /**
+        * C++ default constructor.
+        */
+        CMainFragment();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void BaseConstructL();
+        void BaseConstructL(const TDesC8& aNsUri,
+                            const TDesC8& aLocalName,
+                            const TDesC8& aQName);
+
+        // Functions from base classes
+
+        // From CSenBaseFragment
+        virtual void OnStartElementL(const RTagInfo& aElement,
+        							 const RAttributeArray& aAttributes,
+        						 	 TInt aErrorCode);
+
+        virtual void OnEndElementL(const RTagInfo& aElement,
+        						   TInt aErrorCode);
+
+    private: // Data
+        CDelegateFragment* ipDelegateFragment;  // Owned
+    };
+
+#endif // MAIN_FRAGMENT_H
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/inc/senfragmentbctest.h	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,612 @@
+/*
+* Copyright  (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:          SenFragment test module.
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+#ifndef SENFRAGMENT_H
+#define SENFRAGMENT_H
+
+// INCLUDES
+#include <StifTestModule.h>
+#include <StifLogger.h>
+#include "TestFragment.h"
+
+#include <SenDomFragmentBase.h>
+#include <SenFragmentBase.h>
+#include <SenParser.h>
+#include <RSenDocument.h>
+//#include <XmlEngDomUtils.h>
+#include <SenBaseAttribute.h>
+#include <SenBaseElement.h>
+#include <SenBaseFragment.h>
+#include <SenDomFragment.h>
+#include <SenIdentityProvider.h>
+#include <SenNameSpace.h>
+#include <SenSoapEnvelope.h>
+#include <SenSoapFault.h>
+#include <SenSoapMessage.h>
+#include <SenWsSecurityHeader.h>
+#include <SenXmlReader.h>
+#include <SenXmlServiceDescription.h>
+//#include <SenDateFragment.h>
+//#include <SenXmlFragment.h>
+#include <SenXmlConstants.h>
+#include <f32file.h>
+//#include <S32FILE.H>
+//#include <e32std.h>
+
+#include <xml/parserfeature.h>           // for TParserFeature enumeration
+//#include <XmlEngDSerializationOptions.h> // needed for TSerializationOptions
+//#include <XmlEngDBinaryContainer.h>
+#include <s32mem.h>
+
+// INCLUDES
+#include "SenFragmentBase.h"
+#include "delegatefragment.h"
+
+
+
+//  FORWARD DECLARATIONS
+class CSenBaseAttribute;
+class CSenBaseFragment;
+class CSenSoapMessage;
+class CSenIdentityProvider;
+class CSenGuidGen;
+class CSenDomFragment;
+class CSenSoapFault;
+class CSenXmlServiceDescription;
+class CSenSoapEnvelope;
+class CSenWsSecurityHeader;
+class SenXmlFragment;
+class CSenBaseElement;
+class MSenElement;
+class CSenXmlReader;
+class SenDateFragment;
+class CSenNamespace;
+class CSenParser;
+class CSenDomFragmentBase;
+class RSenDocument;
+class CSenFragmentBase;
+class CTestFragmentBase;
+class CTestDomFragmentBase;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_MODULE_VERSION_MAJOR 50
+#define TEST_MODULE_VERSION_MINOR 8
+#define TEST_MODULE_VERSION_BUILD 48
+
+// Logging path
+_LIT( KSenFragmentLogPath, "\\logs\\testframework\\SenFragmentBCTest\\" ); 
+// Log file
+_LIT( KSenFragmentLogFile, "SenFragmentBCTest.txt" ); 
+
+// Function pointer related internal definitions
+// Visual studio 6.0 (__VC32__) needs different type of handling 
+#ifdef __VC32__
+#define GETPTR
+#else
+#define GETPTR &
+#endif  
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+#define OOM_ENTRY(str,func,a,b,c) {_S(str), GETPTR func,a,b,c}
+#define OOM_FUNCENTRY(func,a,b,c) {_S(#func), GETPTR func,a,b,c}
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CSenFragmentBCTest;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+// A typedef for function that does the actual testing,
+// function is a type 
+// TInt CSenFragmentBCTest::<NameOfFunction> ( TTestResult& aResult )
+typedef TInt (CSenFragmentBCTest::* TestFunction)(TTestResult&);
+
+// CLASS DECLARATION
+
+/**
+*  An internal structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfoInternal
+    {
+    public:
+        const TText*    iCaseName;
+        TestFunction    iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+    };
+
+// CLASS DECLARATION
+
+/**
+*  A structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfo
+    {
+    public:
+        TPtrC iCaseName;
+        TestFunction iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+
+    TCaseInfo( const TText* a ) : iCaseName( (TText*) a )
+        {
+        };
+
+    };
+
+
+// CLASS DECLARATION
+
+/**
+*  This a SenFragment class.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CSenFragmentBCTest) : public CTestModuleBase
+    {
+    public:  // Constructors and destructor
+
+
+        /**
+        * Two-phased constructor.
+        */
+        static CSenFragmentBCTest* NewL();
+
+        /**
+        * Destructor.
+        */
+        virtual ~CSenFragmentBCTest();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CTestModuleBase InitL is used to initialize the 
+        *       SenFragment. It is called once for every instance of 
+        *       TestModuleSenFragment after its creation.
+        * @since ?Series60_version
+        * @param aIniFile Initialization file for the test module (optional)
+        * @param aFirstTime Flag is true when InitL is executed for first 
+        *               created instance of SenFragment.
+        * @return Symbian OS error code
+        */
+        TInt InitL( TFileName& aIniFile, TBool aFirstTime );
+
+        /**
+        * From CTestModuleBase GetTestCasesL is used to inquiry test cases 
+        *   from SenFragment. 
+        * @since ?Series60_version
+        * @param aTestCaseFile Test case file (optional)
+        * @param aTestCases  Array of TestCases returned to test framework
+        * @return Symbian OS error code
+        */
+        TInt GetTestCasesL( const TFileName& aTestCaseFile, 
+                            RPointerArray<TTestCaseInfo>& aTestCases );
+
+        /**
+        * From CTestModuleBase RunTestCaseL is used to run an individual 
+        *   test case. 
+        * @since ?Series60_version
+        * @param aCaseNumber Test case number
+        * @param aTestCaseFile Test case file (optional)
+        * @param aResult Test case result returned to test framework (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error, which is 
+        *           not reported in aResult parameter as test case failure).
+        */   
+        TInt RunTestCaseL( const TInt aCaseNumber, 
+                           const TFileName& aTestCaseFile,
+                           TTestResult& aResult );
+
+        /**
+        * From CTestModuleBase; OOMTestQueryL is used to specify is particular
+        * test case going to be executed using OOM conditions
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailureType OOM failure type (optional)
+        * @param aFirstMemFailure The first heap memory allocation failure value (optional)
+        * @param aLastMemFailure The last heap memory allocation failure value (optional)
+        * @return TBool
+        */
+        virtual TBool OOMTestQueryL( const TFileName& /* aTestCaseFile */, 
+                                     const TInt /* aCaseNumber */, 
+                                     TOOMFailureType& aFailureType, 
+                                     TInt& /* aFirstMemFailure */, 
+                                     TInt& /* aLastMemFailure */ );
+
+        /**
+        * From CTestModuleBase; OOMTestInitializeL may be used to initialize OOM
+        * test environment
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        */
+        virtual void OOMTestInitializeL( const TFileName& /* aTestCaseFile */, 
+                                    const TInt /* aCaseNumber */ ); 
+
+        /**
+        * From CTestModuleBase; OOMHandleWarningL
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailNextValue FailNextValue for OOM test execution (optional)
+        * @return None
+        *
+        * User may add implementation for OOM test warning handling. Usually no
+        * implementation is required.           
+        */
+        virtual void OOMHandleWarningL( const TFileName& /* aTestCaseFile */,
+                                        const TInt /* aCaseNumber */, 
+                                        TInt& /* aFailNextValue */); 
+
+        /**
+        * From CTestModuleBase; OOMTestFinalizeL may be used to finalize OOM
+        * test environment
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        *
+        */
+        virtual void OOMTestFinalizeL( const TFileName& /* aTestCaseFile */, 
+                                       const TInt /* aCaseNumber */ );
+ 				/**
+         * Method used to log version of test module
+         */
+        void SendTestModuleVersion();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CSenFragmentBCTest();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        // Prohibit copy constructor if not deriving from CBase.
+        // ?classname( const ?classname& );
+        // Prohibit assigment operator if not deriving from CBase.
+        // ?classname& operator=( const ?classname& );
+
+        /**
+        * Function returning test case name and pointer to test case function.
+        * @since ?Series60_version
+        * @param aCaseNumber test case number
+        * @return TCaseInfo 
+        */
+        const TCaseInfo Case ( const TInt aCaseNumber ) const;
+        
+        void SetupL();
+        void Teardown();
+
+
+        /**
+        * Actual Hardcoded test case functions are listed below.
+        */
+		TInt MT_CSenDomFragmentBase_NewLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_1L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_2L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_3L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_4L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_5L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_6L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NewL_7L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_AddAttributesLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_AsXmlLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_ContentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NamespaceL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_ResetContentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_LocalNameL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NsUriL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_NsPrefixL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_AsElementLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_AsDocumentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_ExtractElementL(TTestResult& aResult);
+        
+         TInt MT_CSenDomFragmentBase_AsXmlUnicodeLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_WriteAsXMLToLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_ConsistsOfLL(TTestResult& aResult);
+        
+        
+         
+        
+        
+         TInt MT_CSenDomFragmentBase_Parsing1L(TTestResult& aResult);
+
+
+         TInt MT_CSenDomFragmentBase_Parsing2L(TTestResult& aResult);
+         
+         
+         TInt MT_CSenDomFragmentBase_Parsing3L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_Parsing4L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_Parsing5L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_Parsing6L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenDomFragmentBase_Parsing7L(TTestResult& aResult);
+         
+         
+         TInt MT_CSenDomFragmentBase_Parsing8L(TTestResult& aResult);
+         
+         TInt MT_CSenDomFragmentBase_OnWriteStartElementLL(TTestResult& aResult);
+         
+         TInt MT_CSenDomFragmentBase_OnWriteEndElementLL(TTestResult& aResult);
+
+         TInt MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL(TTestResult& aResult);
+         
+         TInt MT_CSenDomFragmentBase_OnSkippedEntityLL(TTestResult& aResult);
+
+         TInt MT_CSenDomFragmentBase_OnProcessingInstructionLL(TTestResult& aResult);
+
+         TInt MT_CSenDomFragmentBase_OnErrorL(TTestResult& aResult);
+
+         TInt MT_CSenDomFragmentBase_GetExtendedInterfaceL(TTestResult& aResult);
+         
+        
+         TInt MT_CSenFragmentBase_NewLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_1L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_2L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_3L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_4L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_5L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_6L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NewL_7L(TTestResult& aResult);
+         
+         TInt MT_CSenFragmentBase_SetDocumentL(TTestResult& aResult);
+         
+   
+        
+         TInt MT_CSenFragmentBase_ContentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NamespaceL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_ResetContentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_LocalNameL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NsUriL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_NsPrefixL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_AsElementLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_AsDocumentLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_ExtractElementL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_AsXmlUnicodeLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_AsXmlLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_WriteAsXMLToLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_ConsistsOfLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenFragmentBase_Parsing1L(TTestResult& aResult);
+
+
+         TInt MT_CSenFragmentBase_Parsing2L(TTestResult& aResult);
+         
+         
+         TInt MT_CSenFragmentBase_Parsing3L(TTestResult& aResult);
+
+
+         TInt MT_CSenFragmentBase_Parsing4L(TTestResult& aResult);
+
+
+         TInt MT_CSenFragmentBase_Parsing5L(TTestResult& aResult);
+
+
+         TInt MT_CSenParser_NewLL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenParser_NewLCL(TTestResult& aResult);
+        
+        
+         TInt MT_CSenParser_NewL_1L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenParser_NewLC_1L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenParser_NewL_2L(TTestResult& aResult);
+        
+        
+         TInt MT_CSenParser_NewLC_2L(TTestResult& aResult);
+/*        
+#if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
+
+         TInt MT_CSenParser_NewL_3L(TTestResult& aResult);
+         TInt MT_CSenParser_NewLC_3L(TTestResult& aResult);
+
+#endif 
+*/        
+        
+         TInt MT_RSenDocument_NewLL(TTestResult& aResult);
+        
+        
+         TInt MT_RSenDocument_NewLCL(TTestResult& aResult);
+         
+         TInt MT_RSenDocument_NewL_1L(TTestResult& aResult);
+         
+         TInt MT_RSenDocument_NewLC_1L(TTestResult& aResult);
+        
+         TInt MT_RSenDocument_CopyL(TTestResult& aResult);
+                
+         TInt MT_RSenDocument_CloseL(TTestResult& aResult);
+                
+         TInt MT_RSenDocument_DestroyL(TTestResult& aResult);
+         
+         TInt MT_RSenDocument_ManualXmlEngineTlsAttachLL(TTestResult& aResult);
+         
+         TInt MT_RSenDocument_ManualXmlEngineTlsCleanupL(TTestResult& aResult);
+         
+         TInt MT_TestFragmentBase_SetContentLL(TTestResult& aResult);
+
+         TInt MT_TestFragmentBase_AddContentLL(TTestResult& aResult);
+         
+         TInt MT_TestDomFragmentBase_SetContentOfLL(TTestResult& aResult);
+
+         TInt MT_TestDomFragmentBase_ContentOfL(TTestResult& aResult);
+         
+         
+
+     public:     // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    protected:  // Data
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+    private:    // Data
+        // Pointer to test (function) to be executed
+        TestFunction iMethod;
+
+        // Pointer to logger
+        CStifLogger * iLog; 
+
+		CSenXmlReader* iXmlReader;
+        // ?one_line_short_description_of_data
+        //?data_declaration;
+
+        // Reserved pointer for future extension
+        //TAny* iReserved;
+
+    public:     // Friend classes
+        //?friend_class_declaration;
+    protected:  // Friend classes
+        //?friend_class_declaration;
+    private:    // Friend classes
+        //?friend_class_declaration;
+
+    };
+
+#endif      // SENFragment_H
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.pkg	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,36 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:        
+;
+; Languages
+; none -  English only by default
+&EN
+
+; Installation header
+; Only one component name as we only support English
+; UID is the main app's UID
+
+#{"WebServices Fragment"},(0x20015A27),3,0,0,TYPE=SA
+(0x101F7961),0,0,0,{"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Files to install and to where
+"\Epoc32\Release\armv5\urel\SenFragmentBCTest.dll"-"!:\sys\bin\SenFragmentBCTest.dll"
+"\Epoc32\winscw\c\testSF_c.bat"-"!:\testSF.bat"
+"\Epoc32\winscw\c\testframework\testframework_senfragment.ini"-"!:\testframework\testframework_senfragment.ini"
\ No newline at end of file
Binary file websrv_pub/xml_fragment_api/tsrc/bc/senfragment/sis/52_websrv_senfragment.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/TestFragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:        
+*
+*/
+
+
+
+
+
+
+
+
+
+#include <e32std.h>
+#include <f32file.h>
+#include "TestFragment.h"
+
+
+//CSenFragmentBase//
+
+CTestFragmentBase* CTestFragmentBase::NewL(const TDesC8& aLocalName)
+{	
+    return((CTestFragmentBase*)CSenFragmentBase::NewL(aLocalName));
+}
+
+EXPORT_C void CTestFragmentBase::SetContentL(const TDesC8& aContent)
+{
+	return(CSenFragmentBase::SetContentL(aContent));
+}
+
+EXPORT_C void CTestFragmentBase::AddContentL(const TDesC8& aContent)
+{
+	return(CSenFragmentBase::AddContentL(aContent));
+}
+
+
+///CSenDomFragmentBase///
+
+CTestDomFragmentBase* CTestDomFragmentBase::NewL(const TDesC8& aLocalName)
+{
+    return((CTestDomFragmentBase*)CSenDomFragmentBase::NewL(aLocalName));
+}
+
+EXPORT_C TXmlEngElement CTestDomFragmentBase::SetContentOfL(const TDesC8& aLocalName,
+                                        const TDesC8& aContent)
+{
+	return(CSenDomFragmentBase::SetContentOfL(aLocalName, aContent));
+}
+
+
+EXPORT_C TPtrC8 CTestDomFragmentBase::ContentOf(const TDesC8& aLocalName)
+{
+	return(CSenDomFragmentBase::ContentOf(aLocalName));
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatedomfragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:        
+*
+*/
+
+
+
+
+
+
+
+
+#include "delegatedomfragment.h"
+
+using namespace Xml;
+
+namespace
+    {
+    }
+
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes
+    )
+    {
+    CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName, aQName, aAttributes);
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes
+    )
+    {
+    CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes);
+    return pNew;
+    }
+
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent
+    )
+    {
+    CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName,
+                                aQName, aAttributes, aParent);
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent
+    )
+    {
+    CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent);
+    return pNew;
+    }
+    
+CDelegateDomFragment* CDelegateDomFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent,
+    RSenDocument& aOwnerDocument
+    )
+    {
+    CDelegateDomFragment* pNew = NewLC(aNsUri, aLocalName,
+                                       aQName, aAttributes,
+                                       aParent, aOwnerDocument);
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CDelegateDomFragment* CDelegateDomFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent,
+    RSenDocument& aOwnerDocument
+    )
+    {
+    CDelegateDomFragment* pNew = new (ELeave) CDelegateDomFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent,
+                         aOwnerDocument);
+    return pNew;
+    }
+    
+
+CDelegateDomFragment::CDelegateDomFragment()
+    {
+    }
+
+CDelegateDomFragment::~CDelegateDomFragment()
+    {
+    }
+
+// END OF FILE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/delegatefragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:        
+*
+*/
+
+
+
+
+
+
+
+
+#include "delegatefragment.h"
+
+using namespace Xml;
+
+namespace
+    {
+    }
+
+CDelegateFragment* CDelegateFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes
+    )
+    {
+    CDelegateFragment* pNew = NewLC(aNsUri, aLocalName, aQName, aAttributes);
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CDelegateFragment* CDelegateFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes
+    )
+    {
+    CDelegateFragment* pNew = new (ELeave) CDelegateFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes);
+    return pNew;
+    }
+
+CDelegateFragment* CDelegateFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent
+    )
+    {
+    CDelegateFragment* pNew = NewLC(aNsUri, aLocalName,
+                                aQName, aAttributes, aParent);
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CDelegateFragment* CDelegateFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName,
+    const RAttributeArray& aAttributes,
+    TXmlEngElement& aParent
+    )
+    {
+    CDelegateFragment* pNew = new (ELeave) CDelegateFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName, aAttributes, aParent);
+    return pNew;
+    }
+
+CDelegateFragment::CDelegateFragment()
+    {
+    }
+
+CDelegateFragment::~CDelegateFragment()
+    {
+    }
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/maindomfragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,191 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:        
+*
+*/
+
+
+
+
+
+
+
+
+#include "maindomfragment.h"
+#include "SenFragmentBase.h"
+
+namespace
+    {
+	const TInt KStateParsingDelegate    = 100;
+    _LIT8(KMainFragmentXmlns,   "urn:main:fragment");
+    _LIT8(KMainFragmentName,    "MainFragment");
+    _LIT8(KMainFragmentQName,   "mn:MainFragment");	
+    _LIT8(KDelegateName,        "DelegateFragment");
+    }
+
+CMainDomFragment* CMainDomFragment::NewL()
+    {
+    CMainDomFragment* pNew = NewLC();
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CMainDomFragment* CMainDomFragment::NewLC()
+    {
+    CMainDomFragment* pNew = new (ELeave) CMainDomFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL();
+    return pNew;
+    }
+
+
+CMainDomFragment* CMainDomFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CMainDomFragment* pNew = NewLC( aNsUri, aLocalName, aQName );
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CMainDomFragment* CMainDomFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CMainDomFragment* pNew = new (ELeave) CMainDomFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName);
+    return pNew;
+    }
+
+
+CMainDomFragment::CMainDomFragment()
+: ipDelegateFragment(NULL)
+    {
+    }
+
+void CMainDomFragment::BaseConstructL()
+    {
+    CSenDomFragmentBase::BaseConstructL(
+        KMainFragmentXmlns,
+        KMainFragmentName,
+        KMainFragmentQName
+        );
+    }
+
+void CMainDomFragment::BaseConstructL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CSenDomFragmentBase::BaseConstructL(aNsUri, aLocalName, aQName);
+    }
+
+CMainDomFragment::~CMainDomFragment()
+    {
+    delete ipDelegateFragment;
+    }
+
+void CMainDomFragment::OnStartElementL(const RTagInfo& aElement,
+                                    const RAttributeArray& aAttributes,
+                                    TInt aErrorCode)
+    {
+    switch (iState)
+        {
+        case KSenStateSave:
+            {
+            const TPtrC8 saxLocalName   = aElement.LocalName().DesC();
+            
+            if (saxLocalName == KDelegateName)
+                {
+                const TPtrC8 saxNsUri       = aElement.Uri().DesC();
+                const TPtrC8 saxPrefix      = aElement.Prefix().DesC();
+                
+                TXmlEngElement element = AsElementL();
+                RSenDocument& document = AsDocumentL();
+
+				ipDelegateFragment = CDelegateDomFragment::NewL(
+					                         saxNsUri, saxLocalName,
+					                         saxPrefix, aAttributes,
+					                         element, document
+					                         );
+                
+                iState = KStateParsingDelegate;
+                
+                OnDelegateParsingL(*ipDelegateFragment);
+                }
+            else
+                {
+                CSenDomFragmentBase::OnStartElementL(aElement, aAttributes,
+                                                  aErrorCode);
+                }
+            break;
+            }
+        default:
+            {
+            CSenDomFragmentBase::OnStartElementL(aElement, aAttributes,
+                                            aErrorCode);
+            break;
+            }
+        }
+    }
+
+void CMainDomFragment::OnEndElementL(const RTagInfo& aElement,
+        						          TInt aErrorCode)
+
+    {
+    switch(iState)
+        {
+        case KStateParsingDelegate:
+            {
+            iState = KSenStateSave;
+            break;
+            }
+
+        default:
+            {
+            CSenDomFragmentBase::OnEndElementL(aElement, aErrorCode);
+            break;
+            }
+        }
+    }
+    
+void CMainDomFragment::OnResumeParsingFromL(const RTagInfo& aElement,
+                                                TInt aErrorCode)
+    {
+    SetContentHandler(*this);
+
+    switch (iState)
+        {
+        // no other states may be resumed(!)
+        case KStateParsingDelegate:
+            {
+            OnEndElementL(aElement, aErrorCode);
+            }
+            break;
+        }    
+    }
+    
+CDelegateDomFragment& CMainDomFragment::DelegateFragment()
+    {
+    return *ipDelegateFragment;
+    }
+
+// END OF FILE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/mainfragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,173 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:        
+*
+*/
+
+
+
+
+
+
+
+
+#include "mainfragment.h"
+#include "SenFragmentBase.h"
+
+namespace
+    {
+	const TInt KStateParsingDelegate    = 100;
+    _LIT8(KMainFragmentXmlns,   "urn:main:fragment");
+    _LIT8(KMainFragmentName,    "MainFragment");
+    _LIT8(KMainFragmentQName,   "mn:MainFragment");
+    _LIT8(KDelegateName,        "DelegateFragment");
+    }
+
+CMainFragment* CMainFragment::NewL()
+    {
+    CMainFragment* pNew = NewLC();
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CMainFragment* CMainFragment::NewLC()
+    {
+    CMainFragment* pNew = new (ELeave) CMainFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL();
+    return pNew;
+    }
+
+
+CMainFragment* CMainFragment::NewL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CMainFragment* pNew = NewLC( aNsUri, aLocalName, aQName );
+    CleanupStack::Pop(); // pNew;
+    return pNew;
+    }
+
+CMainFragment* CMainFragment::NewLC(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CMainFragment* pNew = new (ELeave) CMainFragment;
+    CleanupStack::PushL(pNew);
+    pNew->BaseConstructL(aNsUri, aLocalName, aQName);
+    return pNew;
+    }
+
+
+CMainFragment::CMainFragment()
+: ipDelegateFragment(NULL)
+    {
+    }
+
+void CMainFragment::BaseConstructL()
+    {
+    CSenFragmentBase::BaseConstructL(
+        KMainFragmentXmlns,
+        KMainFragmentName,
+        KMainFragmentQName
+        );
+    }
+
+void CMainFragment::BaseConstructL(
+    const TDesC8& aNsUri,
+    const TDesC8& aLocalName,
+    const TDesC8& aQName
+    )
+    {
+    CSenFragmentBase::BaseConstructL(aNsUri, aLocalName, aQName);
+    }
+
+CMainFragment::~CMainFragment()
+    {
+    delete ipDelegateFragment;
+    }
+
+void CMainFragment::OnStartElementL(const RTagInfo& aElement,
+                                    const RAttributeArray& aAttributes,
+                                    TInt aErrorCode)
+    {
+    switch (iState)
+        {
+        case KSenStateSave:
+            {
+            const TPtrC8 saxLocalName   = aElement.LocalName().DesC();
+
+            if (saxLocalName == KDelegateName)
+                {
+                const TPtrC8 saxNsUri       = aElement.Uri().DesC();
+                const TPtrC8 saxPrefix      = aElement.Prefix().DesC();
+
+                TXmlEngElement element = AsElementL();
+
+				ipDelegateFragment = CDelegateFragment::NewL(
+					                         saxNsUri, saxLocalName,
+					                         saxPrefix, aAttributes
+					                         );
+
+                iState = KStateParsingDelegate;
+
+                OnDelegateParsingL(*ipDelegateFragment);
+                }
+            else
+                {
+                CSenFragmentBase::OnStartElementL(aElement, aAttributes,
+                                                  aErrorCode);
+                }
+            break;
+            }
+        default:
+            {
+            CSenFragmentBase::OnStartElementL(aElement, aAttributes,
+                                            aErrorCode);
+            break;
+            }
+        }
+    }
+
+void CMainFragment::OnEndElementL(const RTagInfo& aElement,
+        						          TInt aErrorCode)
+
+    {
+    switch(iState)
+        {
+        case KStateParsingDelegate:
+            {
+            iState = KSenStateSave;
+            break;
+            }
+
+        default:
+            {
+            CSenFragmentBase::OnEndElementL(aElement, aErrorCode);
+            break;
+            }
+        }
+    }
+    
+CDelegateFragment& CMainFragment::DelegateFragment()
+    {
+    return *ipDelegateFragment;
+    }
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragment.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,414 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:          SenFragment class member functions
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "senfragmentbctest.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern  ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES  
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+//          ?value_n: ?description_line1
+//                    ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+    ?arg_type arg,  // ?description
+    ?arg_type arg)  // ?description
+    {
+
+    ?code  // ?comment
+
+    // ?comment
+    ?code
+    }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::CSenFragmentBCTest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CSenFragmentBCTest::CSenFragmentBCTest()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::ConstructL
+// Symbian 2nd phase constructor can leave.
+//
+// Note: If OOM test case uses STIF Logger, then STIF Logger must be created
+// with static buffer size parameter (aStaticBufferSize). Otherwise Logger 
+// allocates memory from heap and therefore causes error situations with OOM 
+// testing. For more information about STIF Logger construction, see STIF Users 
+// Guide.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::ConstructL()
+    {
+    iLog = CStifLogger::NewL( KSenFragmentLogPath, 
+                          KSenFragmentLogFile);
+
+    // Sample how to use logging
+    _LIT( KLogStart, "SenFragment logging starts!" );
+    iLog->Log( KLogStart );
+    
+   // if ( iXmlReader ){
+    //    delete iXmlReader;
+    //}
+    //iXmlReader = CSenXmlReader::NewL();
+
+    }
+//-----------------------------------------------------------------------------
+// CSenFragmentBCTest::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::SendTestModuleVersion()
+	{
+	TVersion moduleVersion;
+	moduleVersion.iMajor = TEST_MODULE_VERSION_MAJOR;
+	moduleVersion.iMinor = TEST_MODULE_VERSION_MINOR;
+	moduleVersion.iBuild = TEST_MODULE_VERSION_BUILD;
+	
+	TFileName moduleName;
+	moduleName = _L("SenFragmentBCTest.dll");
+	
+
+	TBool newVersionOfMethod = ETrue;
+	CTestModuleIf &test=TestModuleIf();
+	test.SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+	test.SetBehavior(CTestModuleIf::ETestLeaksHandles);
+	}
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSenFragmentBCTest* CSenFragmentBCTest::NewL()
+    {
+    CSenFragmentBCTest* self = new (ELeave) CSenFragmentBCTest;
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+CSenFragmentBCTest::~CSenFragmentBCTest()
+    {
+    if (iLog)  delete iLog;
+    //if ( iXmlReader)
+    	//{
+        //delete iXmlReader;
+      //  iXmlReader = NULL;
+    //  }
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::InitL
+// InitL is used to initialize the Test Module.
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::InitL( 
+    TFileName& /*aIniFile*/, 
+    TBool /*aFirstTime*/ )
+    {
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be 
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation. 
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::GetTestCasesL( 
+    const TFileName& /*aConfig*/, 
+    RPointerArray<TTestCaseInfo>& aTestCases )
+    {
+
+    // Loop through all test cases and create new
+    // TTestCaseInfo items and append items to aTestCase array    
+    for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+        {
+
+        // Allocate new TTestCaseInfo from heap for a testcase definition.
+        TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo();
+
+        // PushL TTestCaseInfo to CleanupStack.    
+        CleanupStack::PushL( newCase );
+
+        // Set number for the testcase.
+        // When the testcase is run, this comes as a parameter to RunTestCaseL.
+        newCase->iCaseNumber = i;
+
+        // Set title for the test case. This is shown in UI to user.
+        newCase->iTitle.Copy( Case(i).iCaseName );
+
+        // Append TTestCaseInfo to the testcase array. After appended 
+        // successfully the TTestCaseInfo object is owned (and freed) 
+        // by the TestServer. 
+        User::LeaveIfError(aTestCases.Append ( newCase ) );
+
+        // Pop TTestCaseInfo from the CleanupStack.
+        CleanupStack::Pop( newCase );
+
+        }
+
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified 
+// by aTestCase. Test cases that can be run may be requested from 
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt CSenFragmentBCTest::RunTestCaseL( 
+    const TInt aCaseNumber,   
+    const TFileName& /*aConfig*/,
+    TTestResult& aResult )
+    {
+		SendTestModuleVersion();
+    // Return value
+    TInt execStatus = KErrNone;
+
+    // Get the pointer to test case function
+    TCaseInfo tmp = Case ( aCaseNumber );
+		iLog->Log( _L("-------------------------------------------------------------"));
+    _LIT( KLogStartTC, "Starting testcase [%S]" );
+    iLog->Log( KLogStartTC, &tmp.iCaseName);
+
+    // Check that case number was valid
+    if ( tmp.iMethod != NULL )
+        {
+        // Valid case was found, call it via function pointer
+        iMethod = tmp.iMethod;        
+        execStatus  = ( this->*iMethod )( aResult );
+        }
+    else
+        {
+        // Valid case was not found, return error.
+        execStatus = KErrNotFound;
+        }
+
+    // Return case execution status (not the result of the case execution)
+    return execStatus;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestQueryL
+// Used to check if a particular test case should be run in OOM conditions and 
+// which memory allocations should fail.    
+// -----------------------------------------------------------------------------
+//
+TBool CSenFragmentBCTest::OOMTestQueryL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt aCaseNumber, 
+                                TOOMFailureType& /* aFailureType */, 
+                                TInt& aFirstMemFailure, 
+                                TInt& aLastMemFailure ) 
+    {
+    _LIT( KLogOOMTestQueryL, "CSenFragmentBCTest::OOMTestQueryL" );
+    iLog->Log( KLogOOMTestQueryL );     
+
+    aFirstMemFailure = Case( aCaseNumber ).iFirstMemoryAllocation;
+    aLastMemFailure = Case( aCaseNumber ).iLastMemoryAllocation;
+
+    return Case( aCaseNumber ).iIsOOMTest;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestInitializeL
+// Used to perform the test environment setup for a particular OOM test case. 
+// Test Modules may use the initialization file to read parameters for Test 
+// Module initialization but they can also have their own configure file or 
+// some other routine to initialize themselves.  
+//
+// NOTE: User may add implementation for OOM test environment initialization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMTestInitializeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMHandleWarningL
+// In some cases the heap memory allocation should be skipped, either due to
+// problems in the OS code or components used by the code being tested, or even 
+// inside the tested components which are implemented this way on purpose (by 
+// design), so it is important to give the tester a way to bypass allocation 
+// failures.
+//
+// NOTE: User may add implementation for OOM test warning handling. Usually no
+// implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMHandleWarningL( 
+                                const TFileName& /* aTestCaseFile */,
+                                const TInt /* aCaseNumber */, 
+                                TInt& /* aFailNextValue */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::OOMTestFinalizeL
+// Used to perform the test environment cleanup for a particular OOM test case.
+//
+// NOTE: User may add implementation for OOM test environment finalization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void CSenFragmentBCTest::OOMTestFinalizeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point
+// Returns: CTestModuleBase*: Pointer to Test Module object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CTestModuleBase* LibEntryL()
+    {
+    return CSenFragmentBCTest::NewL();
+
+    }
+
+// -----------------------------------------------------------------------------
+// SetRequirements handles test module parameters(implements evolution
+// version 1 for test module's heap and stack sizes configuring).
+// Returns: TInt: Symbian error code.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SetRequirements( CTestModuleParam*& /*aTestModuleParam*/, 
+                                TUint32& /*aParameterValid*/ )
+    {
+
+    /* --------------------------------- NOTE ---------------------------------
+    USER PANICS occurs in test thread creation when:
+    1) "The panic occurs when the value of the stack size is negative."
+    2) "The panic occurs if the minimum heap size specified is less
+       than KMinHeapSize".
+       KMinHeapSize: "Functions that require a new heap to be allocated will
+       either panic, or will reset the required heap size to this value if
+       a smaller heap size is specified".
+    3) "The panic occurs if the minimum heap size specified is greater than
+       the maximum size to which the heap can grow".
+    Other:
+    1) Make sure that your hardware or Symbian OS is supporting given sizes.
+       e.g. Hardware might support only sizes that are divisible by four.
+    ------------------------------- NOTE end ------------------------------- */
+
+    // Normally STIF uses default heap and stack sizes for test thread, see:
+    // KTestThreadMinHeap, KTestThreadMinHeap and KStackSize.
+    // If needed heap and stack sizes can be configured here by user. Remove
+    // comments and define sizes.
+
+/*
+    aParameterValid = KStifTestModuleParameterChanged;
+
+    CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
+    // Stack size
+    param->iTestThreadStackSize= 16384; // 16K stack
+    // Heap sizes
+    param->iTestThreadMinHeap = 4096;   // 4K heap min
+    param->iTestThreadMaxHeap = 1048576;// 1M heap max
+
+    aTestModuleParam = param;
+*/
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// E32Dll is a DLL entry point function
+// Returns: KErrNone: No error
+// -----------------------------------------------------------------------------
+//
+#ifndef EKA2 // Hide Dll entry point to EKA2
+GLDEF_C TInt E32Dll(
+    TDllReason /*aReason*/) // Reason
+    {
+    return(KErrNone);
+
+    }
+#endif // EKA2
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/websrv_pub/xml_fragment_api/tsrc/bc/senfragment/src/senfragmentcases.cpp	Thu Jul 08 14:00:07 2010 +0530
@@ -0,0 +1,2932 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:          ?Description
+*
+*/
+
+// INCLUDE FILES
+#include <StifTestModule.h>
+#include <e32math.h>
+#include <libc/assert.h>
+#include <e32panic.h>
+#include "senfragmentbctest.h"
+#include "maindomfragment.h"
+#include "mainfragment.h"
+#include "TestFragment.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CSenFragmentBCTest::Case
+// Returns a test case by number.
+//
+// This function contains an array of all available test cases 
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+// 
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// -----------------------------------------------------------------------------
+//
+const TCaseInfo CSenFragmentBCTest::Case ( 
+    const TInt aCaseNumber ) const 
+     {
+
+    /**
+    * To add new test cases, implement new test case function and add new 
+    * line to KCases array specify the name of the case and the function 
+    * doing the test case
+    * In practice, do following
+    * 1) Make copy of existing test case function and change its name
+    *    and functionality. Note that the function must be added to 
+    *    SenFragment.cpp file and to SenFragment.h 
+    *    header file.
+    *
+    * 2) Add entry to following KCases array either by using:
+    *
+    * 2.1: FUNCENTRY or ENTRY macro
+    * ENTRY macro takes two parameters: test case name and test case 
+    * function name.
+    *
+    * FUNCENTRY macro takes only test case function name as a parameter and
+    * uses that as a test case name and test case function name.
+    *
+    * Or
+    *
+    * 2.2: OOM_FUNCENTRY or OOM_ENTRY macro. Note that these macros are used
+    * only with OOM (Out-Of-Memory) testing!
+    *
+    * OOM_ENTRY macro takes five parameters: test case name, test case 
+    * function name, TBool which specifies is method supposed to be run using
+    * OOM conditions, TInt value for first heap memory allocation failure and 
+    * TInt value for last heap memory allocation failure.
+    * 
+    * OOM_FUNCENTRY macro takes test case function name as a parameter and uses
+    * that as a test case name, TBool which specifies is method supposed to be
+    * run using OOM conditions, TInt value for first heap memory allocation 
+    * failure and TInt value for last heap memory allocation failure. 
+    */ 
+
+    static TCaseInfoInternal const KCases[] =
+        {
+        
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewLL ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_1L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_2L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_3L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_4L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_5L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_6L ),
+        ENTRY( "NewL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_7L ),
+        ENTRY( "AddAttributesL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AddAttributesLL ),
+        ENTRY( "AsXmlL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlLL ),
+        ENTRY( "ContentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentLL ),
+        ENTRY( "Namespace - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NamespaceL ),
+        ENTRY( "ResetContentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ResetContentLL ),
+        ENTRY( "LocalName - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_LocalNameL ),
+        ENTRY( "NsUri - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NsUriL ),
+        ENTRY( "NsPrefix - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_NsPrefixL ),
+        ENTRY( "AsElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsElementLL ),
+        ENTRY( "AsDocumentL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsDocumentLL ),
+        ENTRY( "ExtractElement - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ExtractElementL ),
+        ENTRY( "AsXmlUnicodeL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlUnicodeLL ),
+        ENTRY( "WriteAsXMLToL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_WriteAsXMLToLL ),
+        ENTRY( "ConsistsOfL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ConsistsOfLL ),
+        ENTRY( "Parsing1 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing1L ),
+        ENTRY( "Parsing2 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing2L ),
+        ENTRY( "Parsing3 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing3L ),
+        ENTRY( "Parsing4 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing4L ),
+        ENTRY( "Parsing5 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing5L ),
+        ENTRY( "Parsing6 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing6L ),
+        ENTRY( "Parsing7 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing7L ),
+        ENTRY( "Parsing8 - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing8L ),
+        //ENTRY( "SetContentOfL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_SetContentOfLL ),
+        //ENTRY( "ContentOf - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentOfL ),
+        ENTRY( "OnWriteStartElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteStartElementLL ),
+        ENTRY( "OnWriteEndElementL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteEndElementLL ),
+        ENTRY( "OnIgnorableWhiteSpaceL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL ),
+        ENTRY( "OnSkippedEntityL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnSkippedEntityLL ),
+        ENTRY( "OnProcessingInstructionL - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnProcessingInstructionLL ),
+        ENTRY( "OnError - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_OnErrorL ),
+        ENTRY( "GetExtendedInterface - CSenDomFragmentBase", CSenFragmentBCTest::MT_CSenDomFragmentBase_GetExtendedInterfaceL ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewLL ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_2L ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_3L ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_4L ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_5L ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_6L ),
+        ENTRY( "NewL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NewL_7L ),
+        ENTRY( "SetDocument - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_SetDocumentL ),
+        
+        ENTRY( "ContentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ContentLL ),
+        ENTRY( "Namespace - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NamespaceL ),
+        ENTRY( "ResetContentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ResetContentLL ),
+        ENTRY( "LocalName - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_LocalNameL ),
+        ENTRY( "NsUri - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NsUriL ),
+        ENTRY( "NsPrefix - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_NsPrefixL ),
+        ENTRY( "AsElementL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsElementLL ),
+        ENTRY( "AsDocumentL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsDocumentLL ),
+        ENTRY( "ExtractElement - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ExtractElementL ),
+        ENTRY( "AsXmlUnicodeL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlUnicodeLL ),
+        ENTRY( "AsXmlL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlLL ),
+        ENTRY( "WriteAsXMLToL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_WriteAsXMLToLL ),
+        ENTRY( "ConsistsOfL - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_ConsistsOfLL ),
+        ENTRY( "Parsing1 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing1L ),
+        ENTRY( "Parsing2 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing2L ),
+        ENTRY( "Parsing3 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing3L ),
+        ENTRY( "Parsing4 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing4L ),
+        ENTRY( "Parsing5 - CSenFragmentBase", CSenFragmentBCTest::MT_CSenFragmentBase_Parsing5L ),
+        ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLL ),
+        ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLCL ),
+        ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_1L ),
+        ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_1L ),
+        ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_2L ),
+        ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_2L ),
+//        ENTRY( "NewL - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewL_3L ),
+//        ENTRY( "NewLC - CSenParser", CSenFragmentBCTest::MT_CSenParser_NewLC_3L ),
+        ENTRY( "NewL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLL ),
+        ENTRY( "NewLC - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLCL ),
+        ENTRY( "NewL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewL_1L ),
+        ENTRY( "NewLC - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_NewLC_1L ),
+        ENTRY( "Copy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_CopyL ),
+        ENTRY( "Close - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_CloseL ),
+        ENTRY( "Destroy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_DestroyL ),
+        ENTRY( "Destroy - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_DestroyL ),
+        
+        ENTRY( "ManualXmlEngineTlsAttachL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsAttachLL ),
+        ENTRY( "ManualXmlEngineTlsAttachL - RSenDocument", CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsCleanupL ),
+        ENTRY( "SetContentL - TestFragmentBase", CSenFragmentBCTest::MT_TestFragmentBase_SetContentLL ),
+        ENTRY( "AddContentL - TestFragmentBase", CSenFragmentBCTest::MT_TestFragmentBase_AddContentLL ),
+        ENTRY( "SetContentOfL - TestDomFragmentBase", CSenFragmentBCTest::MT_TestDomFragmentBase_SetContentOfLL ),
+        //ENTRY( "ContentOf - TestDomFragmentBase", CSenFragmentBCTest::MT_TestDomFragmentBase_ContentOfL ),
+        
+        // Example how to use OOM functionality
+        //OOM_ENTRY( "Loop test with OOM", CSenFragmentBCTest::LoopTest, ETrue, 2, 3),
+        //OOM_FUNCENTRY( CSenFragmentBCTest::PrintTest, ETrue, 1, 3 ),
+        };
+
+    // Verify that case number is valid
+    if( (TUint) aCaseNumber >= sizeof( KCases ) / 
+                               sizeof( TCaseInfoInternal ) )
+        {
+        // Invalid case, construct empty object
+        TCaseInfo null( (const TText*) L"" );
+        null.iMethod = NULL;
+        null.iIsOOMTest = EFalse;
+        null.iFirstMemoryAllocation = 0;
+        null.iLastMemoryAllocation = 0;
+        return null;
+        } 
+
+    // Construct TCaseInfo object and return it
+    TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
+    tmp.iMethod = KCases[ aCaseNumber ].iMethod;
+    tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+    tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+    tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+    return tmp;
+
+    }
+
+void CSenFragmentBCTest::SetupL(  ){
+    if ( iXmlReader ){
+        delete iXmlReader;
+        iXmlReader = NULL;
+    }
+    iXmlReader = CSenXmlReader::NewL();
+} 
+
+void CSenFragmentBCTest::Teardown(  ){
+    if ( iXmlReader){
+        delete iXmlReader;
+        iXmlReader = NULL;
+    }
+}
+    
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewLL(TTestResult& aResult)
+	{
+    SetupL();
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL();
+    TL(pFragment != (CSenDomFragmentBase*)NULL);
+    __ASSERT_ALWAYS_NO_LEAVE(delete pFragment);
+    pFragment = NULL;
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_1L(TTestResult& aResult)
+	{
+    SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    element.SetEscapedTextL(_L8("<Element/>"));
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    // Test that when CSenDomFragmentBase is serialized '<' and '>' characters
+    // are encoded (as all basic entities in content should be).
+    if(!( *pAsXml == _L8("<Test>&lt;Element/&gt;</Test>") ))return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::Pop(1);
+    //CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_2L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_3L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_4L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_5L(TTestResult& aResult)
+	{
+    SetupL();	
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open( nsUriRString, nsPrefixRString, localNameRString,
+                    valueRString );
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"),
+                                                               attrArray);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_6L(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+    
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+    
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+        
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"),
+                                                               attrArray,
+                                                               parentElement);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+    RBuf8 buffer;
+    parentElement.OuterXmlL(buffer);
+    
+    if(!( buffer == _L8("<Parent><t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+    buffer.Close();
+    
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NewL_7L(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+    
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+        
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8(""),
+                                                               attrArray,
+                                                               parentElement,
+                                                               document);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+    RBuf8 buffer;
+    parentElement.OuterXmlL(buffer);
+    
+    if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+    buffer.Close();
+    
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AddAttributesLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(4); // nsUriRString, nsPrefixRString, localNameRString,
+                          // valueRString
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);    
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    
+    pFragment->AddAttributesL(attrArray);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+
+    CleanupStack::PopAndDestroy(pFragment);
+    
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlLL(TTestResult& aResult)
+	{
+    SetupL();	
+    // Test serialization of Dom tree which has two child elements
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") ) ) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    element.SetEscapedTextL(_L8("<Element/>"));
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    
+    TPtrC8 content = pFragment->ContentL();
+    if(!( content == _L8("<Element/>") ) ) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NamespaceL(TTestResult& aResult)
+	{
+    SetupL();	
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(stringPool.OpenStringL(_L8("nsuri")), 
+                   stringPool.OpenStringL(_L8("pr")),
+                   stringPool.OpenStringL(_L8("LocalName")),
+                   stringPool.OpenStringL(_L8("Value")) );
+    // attribute took copies of all RStrings
+    // => All RStrings can be destroyed
+    CleanupStack::PopAndDestroy(4); // nsUriRString, nsPrefixRString, localNameRString,
+                                    // valueRString
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"),
+                                                               attrArray);
+    CleanupStack::PushL(pFragment);
+    
+    TXmlEngNamespace ns = pFragment->Namespace(_L8("pr"));
+    if(!( ns.Uri() == _L8("nsuri") ) ) return KErrArgument;
+
+    TXmlEngNamespace ns2 = pFragment->Namespace(_L8("x"));
+    if(!( ns2.IsNull() ) ) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(); // attribute
+    CleanupStack::PopAndDestroy(); // attrArray
+    CleanupStack::PopAndDestroy(); // stringPool   
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ResetContentLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    element.SetEscapedTextL(_L8("Content"));
+    
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    
+    // Test that CSenFragmentBase has content before reset
+    TPtrC8 content = pFragment->ContentL();
+    if(!( content == _L8("Content") )) return KErrArgument;
+    
+    pFragment->ResetContentL();
+    
+    // Test that CSenFragmentBase has no content after reset
+    TPtrC8 content2 = pFragment->ContentL();
+    if(!( content2 == KNullDesC8 )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_LocalNameL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->LocalName();
+    if(!( localName == _L8("Test") ) ) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NsUriL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->NsUri();
+    if(!( localName == _L8("NsUri") ) ) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_NsPrefixL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->NsPrefix();
+    if(!( localName == _L8("t") ) ) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsElementLL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    RBuf8 buffer;
+    CleanupClosePushL(buffer);
+    element.OuterXmlL(buffer);
+    // Serialized element should contain all the Fragment data as XML.
+    if(!( buffer == _L8("<t:Test xmlns:t=\"NsUri\"/>") ) ) return KErrArgument;
+    CleanupStack::PopAndDestroy(&buffer);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsDocumentLL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    RSenDocument document = pFragment->AsDocumentL();
+    TXmlEngElement element = document.DocumentElement();
+    
+    TXmlEngSerializationOptions options;
+    // Omit following declarations from the beginning of XML Document:
+    // <?xml version=\"1.0\...
+    //   encoding="..."
+    //   standalone="..."
+    // ?>
+    options.iOptions = options.iOptions |
+                       TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+    RBuf8 asXml;
+    document.SaveL(asXml, element, options);
+    CleanupClosePushL(asXml);
+    
+    // Serialized document should contain all the Fragment data as XML.
+    if(!( asXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") ) ) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(&asXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ExtractElementL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->ExtractElement();
+    if(!( element.Name() == _L8("Test") )) return KErrArgument;
+    element.Remove();
+    CleanupStack::PopAndDestroy(pFragment);   
+    Teardown();
+    return KErrNone;
+	}
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_AsXmlUnicodeLL(TTestResult& aResult)
+	{
+    SetupL();	
+    // Test serialization of Dom tree which has two child elements
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    HBufC* pAsXml = pFragment->AsXmlUnicodeL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_WriteAsXMLToLL(TTestResult& aResult)
+	{
+    SetupL();	
+    // Test serialization of Dom tree which has two child elements
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    CBufFlat* pBuf = CBufFlat::NewL(200);
+    CleanupStack::PushL(pBuf);
+    RBufWriteStream bufWs(*pBuf);
+    CleanupClosePushL(bufWs);
+    pFragment->WriteAsXMLToL(bufWs);
+
+
+    if(!( pBuf->Ptr(0) == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(&bufWs);
+    CleanupStack::PopAndDestroy(pBuf);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ConsistsOfLL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement elementchild1 = element.AddNewElementL(_L8("DirectChild"));
+    elementchild1.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+   
+    //TDomUtils domUtils1;
+    //domUtils1.XmlEngRenameElementL(elementchild1, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+
+    TXmlEngElement elementchild2 = element.AddNewElementL(_L8("DirectChild"));
+    elementchild2.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils2;
+    //domUtils2.XmlEngRenameElementL(elementchild2, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild2.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+    CSenDomFragmentBase* pFragment2 = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment2);
+    TXmlEngElement element2 = pFragment2->AsElementL();
+    
+    TXmlEngElement elementchild22 = element2.AddNewElementL(_L8("DirectChild"));
+    elementchild22.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils22;
+    //domUtils22.XmlEngRenameElementL(elementchild22, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild22.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+    // ConsistOfL should return ETrue because
+    // root elements of both fragments match and the only element
+    // of pFragment2 = elementchild22 is exactly the same element as
+    // elementchild2.
+    if(!( pFragment->ConsistsOfL(*pFragment2) )) return KErrArgument;
+
+    // ConsistOfL should return EFalse because
+    // Even though root elements of both fragments match
+    // there is extra element (= elementchild1) in pFragment.
+    //
+    // elementchild1 (of pFragment) can not be found from pFragment2
+    // and because of that pFragment2 does not consist of pFragment.
+    if(!( !pFragment2->ConsistsOfL(*pFragment) )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CSenDomFragmentBase* pFragment3 = CSenDomFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment3);
+    TXmlEngElement element3 = pFragment3->AsElementL();
+    
+    TXmlEngElement elementchild32 = element3.AddNewElementL(_L8("DirectChild"));
+    elementchild32.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils32;
+    //domUtils32.XmlEngRenameElementL(elementchild32, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild32.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+    elementchild32.SetEscapedTextL(_L8("Text"));
+    
+    // ConsistOfL should return EFalse because
+    // elementchild32 has content ("Text") which doesn't match
+    // to any child element of pFragment.
+    if(!( !pFragment->ConsistsOfL(*pFragment3) )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment3);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing1L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+    // will be moved to all child elements (Element1, Element2, Element3 and
+    // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+    // the way CParser works <=> Namespaces are reported when namespaces are used
+    // for the first time.
+    _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\" z=\"value4\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+    // When EReportNamespaceMapping is enabled all the namespace declarations
+    // are reported in exactly the same element as they are defined in parsed
+    // XML document.
+    // Note: The Order of namespace declarations in root element tag may change.
+    // Namespace declaration for root tag is created when fragment is created
+    // and because of that namespace declaration for root tag will be the first.
+    // In this particular case namespace declaration for prefix "a" will be
+    // the first namespace declaration because it is declared when
+    // CSenDomFragmentBase is created.
+    _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>"); 
+    
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+/*
+	pParser->EnableFeature(EReportNamespaceMapping);
+	//tma
+	pParser->DisableFeature(EReportNamespaceMapping);
+	TBool fEneabled(EFalse);
+	fEneabled = pParser->IsFeatureEnabled(EReportNamespaceMapping);
+	EUNIT_ASSERT( fEneabled == EFalse);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	//tma
+*/	
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+    CSenDomFragmentBase* pFragment2 = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment2);
+
+	pParser->ParseL(KInputString, *pFragment2);
+	
+	HBufC8* pAsXml2 = pFragment2->AsXmlL();
+	CleanupStack::PushL(pAsXml2);
+	                   
+    if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pAsXml2);
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing2L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase which uses
+    // delegation.
+    _LIT8(KInputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+    // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+    // will be moved to all child elements (Element1, Element2, Element3 and
+    // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+    // the way CParser works <=> Namespaces are reported when namespaces are used
+    // for the first time.
+    _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>\
+<Element1 xmlns=\"nsuri\" x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2></a:Test>");
+
+    // When EReportNamespaceMapping is enabled all the namespace declarations
+    // are reported in exactly the same element as they are defined in parsed
+    // XML document.
+    // Note: The Order of namespace declarations in root element tag may change.
+    // Namespace declaration for root tag is created when fragment is created
+    // and because of that namespace declaration for root tag will be the first.
+    _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+     
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CMainDomFragment* pFragment = CMainDomFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    
+    CDelegateDomFragment& delegate = pFragment->DelegateFragment();
+    HBufC8* pDelegateAsXml = delegate.AsXmlL();
+    CleanupStack::PushL(pDelegateAsXml);
+    // Note: When EReportNamespaceMapping is _NOT_ enabled namespace declaration
+    //       is added to delegate even though that namespace declaration was
+    //       originally declared (but not used) in root element of parsed document. 
+    if(!( *pDelegateAsXml ==
+                 _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pDelegateAsXml);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+    CMainDomFragment* pFragment2 = CMainDomFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment2);
+
+	pParser->ParseL(KInputString, *pFragment2);
+	
+	HBufC8* pAsXml2 = pFragment2->AsXmlL();
+	CleanupStack::PushL(pAsXml2);
+    if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml2);
+    
+    CDelegateDomFragment& delegate2 = pFragment2->DelegateFragment();
+    HBufC8* pDelegateAsXml2 = delegate2.AsXmlL();
+    CleanupStack::PushL(pDelegateAsXml2);
+    if(!( *pDelegateAsXml2 ==
+                 _L8("<DelegateFragment>DelegateContent</DelegateFragment>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pDelegateAsXml2);
+    
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+         
+         
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing3L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // In this test same namespaceuri is defined as default namespace in
+    // root element and 'c' prefixed namespace in Element2.
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    // Namespace declaration for prefix 'x' (and namespaceuri "nsuri")
+    // disappears from Element2 after parsing because default namespace
+    // declaration already declares namespace for uri "nsuri".
+    // => Double declaration for namespaceuri "nsuri" is not needed.
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+    
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing4L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // In this test nested elements (which have same name) are tested.
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    _LIT8(KInputString2, "<Nested xmlns=\"nsuri\">\
+<Nested attr=\"attrvalue\"><Nested><Nested>Content</Nested></Nested></Nested>\
+</Nested>");
+
+    // Only namespace declaration order changes for output.
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+    pFragment = CSenDomFragmentBase::NewL(_L8("nsuri"),_L8("Nested"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString2, *pFragment);
+	
+	pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KInputString2 )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing5L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // In this test nulling of default namespace is tested.
+/*    
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns="" xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1 >Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+*/
+
+/*
+    // Only namespace declaration order changes for output.
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+*/
+
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    /*CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    EUNIT_ASSERT( *pAsXml == KOutputString );
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);*/
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing6L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // when constructor CSenDomFragmentBase::NewL() is used.
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 z=\"value4\">Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+    // will be moved to all child elements (Element1, Element2, Element3 and
+    // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+    // the way CParser works <=> Namespaces are reported when namespaces are used
+    // for the first time.
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value3\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\" z=\"value4\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL();
+    CleanupStack::PushL(pFragment);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing7L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // when constructor CSenDomFragmentBase::NewL() is used.
+    _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+    // Note: If EReportNamespaceMapping is not enabled output will be following:
+    //       (Namespace declaration for prefix "wsa" jumps from root element to
+    //        elements (MessageID, To, Action and EndpointReference) which actually
+    //        use above mentioned prefix. <=> Root element Envelope does not use
+    //        "wsa" prefix.)
+    _LIT8(KOutputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<S:Header>\
+<wsa:MessageID xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+    CSenParser* parser = CSenParser::NewLC();
+    //create a CSenDomFragment
+	CSenFragmentBase* pBase = CSenDomFragmentBase::NewL();
+	CleanupStack::PushL(pBase);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    HBufC8* pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pBase);
+
+    pBase = CSenDomFragmentBase::NewL();
+    CleanupStack::PushL(pBase);
+    //Enable NamespaceMapping to ensure that namespace declarations will
+    //remain in exactly the same place as in original XML document
+    parser->EnableFeature(EReportNamespaceMapping);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KInputString )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    
+    CleanupStack::PopAndDestroy(pBase);
+    CleanupStack::PopAndDestroy(parser);
+    Teardown();
+    return KErrNone;
+	}
+         
+         
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_Parsing8L(TTestResult& aResult)
+	{
+    SetupL();	
+    // Parsing of XML document to CSenDomFragmentBase
+    // when constructor CSenDomFragmentBase::NewL() is used.
+    _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+    // Note: If EReportNamespaceMapping is not enabled output will be following:
+    //       (Namespace declaration for prefix "wsa" jumps from root element to
+    //        elements (MessageID, To, Action and EndpointReference) which actually
+    //        use above mentioned prefix. <=> Root element Envelope does not use
+    //        "wsa" prefix.)
+    _LIT8(KOutputString1, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+    _LIT8(KOutputString2, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+    CSenParser* parser = CSenParser::NewLC();
+    //create a CSenDomFragment
+	CSenFragmentBase* pBase = CSenDomFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+	                                                    _L8("Body"),
+	                                                    _L8("S"));
+	CleanupStack::PushL(pBase);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    HBufC8* pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pBase);
+
+    pBase = CSenDomFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+	                                  _L8("Body"),
+	                                  _L8("S"));
+    CleanupStack::PushL(pBase);
+    //Enable NamespaceMapping to ensure that namespace declarations will
+    //remain in exactly the same place as in original XML document
+    parser->EnableFeature(EReportNamespaceMapping);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString2 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    
+    CleanupStack::PopAndDestroy(pBase);
+    CleanupStack::PopAndDestroy(parser);
+    Teardown();
+    return KErrNone;
+	}
+/*	
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_SetContentOfLL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->SetContentOfL(_L8("name"), _L8("content"));
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_ContentOfL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->ContentOf(_L8("name"));
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+*/	
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteStartElementLL(TTestResult& aResult)
+	{
+    SetupL();
+    RTagInfo info;
+    RAttributeArray array;	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnWriteStartElementL(info, array);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnWriteEndElementLL(TTestResult& aResult)
+	{
+    SetupL();
+    RTagInfo info;
+    	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnWriteEndElementL(info);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnIgnorableWhiteSpaceLL(TTestResult& aResult)
+	{
+    SetupL();
+    TInt var = 0;	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnIgnorableWhiteSpaceL(_L8("test"), var);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnSkippedEntityLL(TTestResult& aResult)
+	{
+    SetupL();
+	RString str;
+    TInt var = 0;	
+	   	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnSkippedEntityL(str, var);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnProcessingInstructionLL(TTestResult& aResult)
+	{
+    SetupL();
+    TInt var = 0;	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnProcessingInstructionL(_L8("test"), _L8("test"), var);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_OnErrorL(TTestResult& aResult)
+	{
+    SetupL();
+    TInt var = 0;
+    	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->OnError(var);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+
+TInt CSenFragmentBCTest::MT_CSenDomFragmentBase_GetExtendedInterfaceL(TTestResult& aResult)
+	{
+    SetupL();
+    const TInt32 var = 0;
+    	
+    CSenDomFragmentBase* pFragment = CSenDomFragmentBase::NewL(_L8("NsUri"),
+                                                               _L8("Test"),
+                                                               _L8("t"));
+    CleanupStack::PushL(pFragment);
+    pFragment->GetExtendedInterface(var);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    _LIT8(KElement, "<Element/>");
+    element.SetTextNoEncL(KElement);
+   
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    // Test that when CSenFragmentBase is serialized '<' and '>' characters
+    // are NOT encoded => The content of CSenFragmentBase can include
+    // XML elements
+    if(!( *pAsXml == _L8("<Test><Element/></Test>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_1L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_2L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_3L(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_4L(TTestResult& aResult)
+	{
+    SetupL();	
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString,
+                   valueRString );
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+    
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+    
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"),
+                                                         attrArray);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool); 
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_5L(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+    
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+        
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"),
+                                                         attrArray,
+                                                         parentElement);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+    RBuf8 buffer;
+    parentElement.OuterXmlL(buffer);
+    
+    if(!( buffer == _L8("<Parent><t:Test xmlns:t=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+    buffer.Close();
+    
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool); 
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_6L(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+    
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+        
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8(""),
+                                                         attrArray,
+                                                         parentElement,
+                                                         document);
+    CleanupStack::PushL(pFragment);
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+    RBuf8 buffer;
+    parentElement.OuterXmlL(buffer);
+    
+    if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+    buffer.Close();
+    
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool); 
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NewL_7L(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement parentElement = document.CreateDocumentElementL(_L8("Parent"));
+    
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(nsUriRString, nsPrefixRString, localNameRString, 
+                   valueRString);
+    // attribute took ownership of all RStrings
+    // => All RStrings can be pop from CleanupStack
+    CleanupStack::Pop(&valueRString);
+    CleanupStack::Pop(&localNameRString);
+    CleanupStack::Pop(&nsPrefixRString);
+    CleanupStack::Pop(&nsUriRString);
+
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+        
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8(""),
+                                                         attrArray,
+                                                         parentElement,
+                                                         document);
+    CleanupStack::PushL(pFragment);
+    
+    RSenDocument doc = pFragment->AsDocumentL();
+    TXmlEngElement el = pFragment->AsElementL();
+    CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(el, doc);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PushL(pFragment2);
+        
+    HBufC8* pAsXml = pFragment2->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/>") )) return KErrArgument;
+
+    RBuf8 buffer;
+    parentElement.OuterXmlL(buffer);
+    
+    if(!( buffer == _L8("<Parent><Test xmlns=\"NsUri\" xmlns:pr=\"nsuri\" pr:LocalName=\"Value\"/></Parent>") )) return KErrArgument;
+    buffer.Close();
+    
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment2);
+    CleanupStack::PopAndDestroy(&attrArray);
+    CleanupStack::PopAndDestroy(&attribute);
+    CleanupStack::PopAndDestroy(&stringPool); 
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+    
+	}
+	
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_SetDocumentL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document ;
+    document = RSenDocument::NewL();
+    
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    
+    pFragment->SetDocument(document);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+	
+   
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ContentLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    element.SetEscapedTextL(_L8("<Element/>"));
+    
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    
+    TPtrC8 content = pFragment->ContentL();
+    if(!( content == _L8("<Element/>") )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NamespaceL(TTestResult& aResult)
+	{
+    SetupL();	
+    RStringPool stringPool;
+    stringPool.OpenL();
+    CleanupClosePushL(stringPool);
+    
+    RString nsUriRString        = stringPool.OpenStringL(_L8("nsuri"));
+    CleanupClosePushL(nsUriRString);
+    RString nsPrefixRString     = stringPool.OpenStringL(_L8("pr"));
+    CleanupClosePushL(nsPrefixRString);
+    RString localNameRString    = stringPool.OpenStringL(_L8("LocalName"));
+    CleanupClosePushL(localNameRString);
+    RString valueRString        = stringPool.OpenStringL(_L8("Value"));
+    CleanupClosePushL(valueRString);
+    
+    RAttribute attribute;
+    attribute.Open(stringPool.OpenStringL(_L8("nsuri")), 
+                   stringPool.OpenStringL(_L8("pr")),
+                   stringPool.OpenStringL(_L8("LocalName")),
+                   stringPool.OpenStringL(_L8("Value")) );
+    // attribute took copies of all RStrings
+    // => All RStrings can be destroyed
+    CleanupStack::PopAndDestroy(4); // nsUriRString, nsPrefixRString, localNameRString,
+                                    // valueRString
+    CleanupClosePushL(attribute);
+
+    RAttributeArray attrArray;
+    // append the namespace attribute (declaration)
+    attrArray.AppendL(attribute);
+    CleanupClosePushL(attrArray);
+    
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"),
+                                                         attrArray);
+    CleanupStack::PushL(pFragment);
+    
+    TXmlEngNamespace ns = pFragment->Namespace(_L8("pr"));
+    if(!( ns.Uri() == _L8("nsuri") )) return KErrArgument;
+
+    TXmlEngNamespace ns2 = pFragment->Namespace(_L8("x"));
+    if(!( ns2.IsUndefined() )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(); // attribute
+    CleanupStack::PopAndDestroy(); // attrArray
+    CleanupStack::PopAndDestroy(); // stringPool  
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ResetContentLL(TTestResult& aResult)
+	{
+    SetupL();	
+    RSenDocument document = RSenDocument::NewL();
+    CleanupClosePushL(document);
+    TXmlEngElement element = document.CreateDocumentElementL(_L8("Test"));
+    element.SetEscapedTextL(_L8("Content"));
+    
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(element);
+    CleanupStack::PushL(pFragment);
+    
+    // Test that CSenFragmentBase has content before reset
+    TPtrC8 content = pFragment->ContentL();
+    if(!( content == _L8("Content") )) return KErrArgument;
+    
+    pFragment->ResetContentL();
+    
+    // Test that CSenFragmentBase has no content after reset
+    TPtrC8 content2 = pFragment->ContentL();
+    if(!( content2 == KNullDesC8 )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(&document);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_LocalNameL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->LocalName();
+    if(!( localName == _L8("Test") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NsUriL(TTestResult& aResult)
+	{
+    SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->NsUri();
+    if(!( localName == _L8("NsUri") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_NsPrefixL(TTestResult& aResult)
+	{
+	SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TPtrC8 localName = pFragment->NsPrefix();
+    if(!( localName == _L8("t") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsElementLL(TTestResult& aResult)
+	{
+	SetupL();	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    RBuf8 buffer;
+    CleanupClosePushL(buffer);
+    element.OuterXmlL(buffer);
+    // Serialized element should contain all the Fragment data as XML.
+    if(!( buffer == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(&buffer);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsDocumentLL(TTestResult& aResult)
+	{
+	SetupL();
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    RSenDocument document = pFragment->AsDocumentL();
+    TXmlEngElement element = document.DocumentElement();
+    
+    TXmlEngSerializationOptions options;
+    // Omit following declarations from the beginning of XML Document:
+    // <?xml version=\"1.0\...
+    //   encoding="..."
+    //   standalone="..."
+    // ?>
+    options.iOptions = options.iOptions |
+                       TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+    RBuf8 asXml;
+    document.SaveL(asXml, element, options);
+    CleanupClosePushL(asXml);
+    
+    // Serialized document should contain all the Fragment data as XML.
+    if(!( asXml == _L8("<t:Test xmlns:t=\"NsUri\"/>") )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(&asXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ExtractElementL(TTestResult& aResult)
+	{
+	SetupL();
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("NsUri"),
+                                                         _L8("Test"),
+                                                         _L8("t"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->ExtractElement();
+    if(!( element.Name() == _L8("Test") )) return KErrArgument;
+    element.Remove();
+    CleanupStack::PopAndDestroy(pFragment);    
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlUnicodeLL(TTestResult& aResult)
+	{
+	SetupL();
+    // Test serialization of Dom tree which has two child elements
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    HBufC* pAsXml = pFragment->AsXmlUnicodeL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_AsXmlLL(TTestResult& aResult)
+	{
+	SetupL();
+    // Test serialization of Dom tree which has two child elements
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    HBufC8* pAsXml = pFragment->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_WriteAsXMLToLL(TTestResult& aResult)
+	{
+	SetupL();
+    // Test serialization of Dom tree which has two child elements
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement element2 = element.AddNewElementL(_L8("Child"), _L8("nsuri"), _L8("prefix"));
+
+    element2.AddNewElementL(_L8("Child2"), _L8("nsuri2"), _L8("prefix2"));
+    
+    CBufFlat* pBuf = CBufFlat::NewL(200);
+    CleanupStack::PushL(pBuf);
+    RBufWriteStream bufWs(*pBuf);
+    CleanupClosePushL(bufWs);
+    pFragment->WriteAsXMLToL(bufWs);
+
+
+    if(!( pBuf->Ptr(0) == _L8("<Test xmlns:prefix=\"nsuri\"><prefix:Child xmlns:prefix2=\"nsuri2\"><prefix2:Child2/></prefix:Child></Test>") )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(&bufWs);
+    CleanupStack::PopAndDestroy(pBuf);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_ConsistsOfLL(TTestResult& aResult)
+	{
+	SetupL();
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    TXmlEngElement element = pFragment->AsElementL();
+    
+    TXmlEngElement elementchild1 = element.AddNewElementL(_L8("DirectChild"));
+    elementchild1.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //elementchild1.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils1;
+    //domUtils1.XmlEngRenameElementL(elementchild1, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+
+    TXmlEngElement elementchild2 = element.AddNewElementL(_L8("DirectChild"));
+    elementchild2.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //elementchild2.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils2;
+    //domUtils2.XmlEngRenameElementL(elementchild2, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild2.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+    CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment2);
+    TXmlEngElement element2 = pFragment2->AsElementL();
+    
+    TXmlEngElement elementchild22 = element2.AddNewElementL(_L8("DirectChild"));
+    elementchild22.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //elementchild22.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils22;
+    //domUtils22.XmlEngRenameElementL(elementchild22, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild22.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+
+    // ConsistOfL should return ETrue because
+    // root elements of both fragments match and the only element
+    // of pFragment2 = elementchild22 is exactly the same element as
+    // elementchild2.
+    if(!( pFragment->ConsistsOfL(*pFragment2) )) return KErrArgument;
+
+    // ConsistOfL should return EFalse because
+    // Even though root elements of both fragments match
+    // there is extra element (= elementchild1) in pFragment.
+    //
+    // elementchild1 (of pFragment) can not be found from pFragment2
+    // and because of that pFragment2 does not consist of pFragment.
+    if(!( !pFragment2->ConsistsOfL(*pFragment) )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CSenFragmentBase* pFragment3 = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment3);
+    TXmlEngElement element3 = pFragment3->AsElementL();
+    
+    TXmlEngElement elementchild32 = element3.AddNewElementL(_L8("DirectChild"));
+    elementchild32.AddNamespaceDeclarationL(_L8("nsuri"), _L8("prefix"));
+    //elementchild32.RenameNodeL(_L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    //TDomUtils domUtils32;
+    //domUtils32.XmlEngRenameElementL(elementchild32, _L8("DirectChild"), _L8("nsuri"), _L8("prefix"));
+    elementchild32.AddNewElementL(_L8("Child"), _L8("nsuri2"), _L8("prefix2"));
+    elementchild32.SetEscapedTextL(_L8("Text"));
+    
+    // ConsistOfL should return EFalse because
+    // elementchild32 has content ("Text") which doesn't match
+    // to any child element of pFragment.
+    if(!( !pFragment->ConsistsOfL(*pFragment3) )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pFragment3);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing1L(TTestResult& aResult)
+	{
+	SetupL();
+    // Parsing of XML document to CSenFragmentBase
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+    // will be moved to all child elements (Element1, Element2, Element3 and
+    // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+    // the way CParser works <=> Namespaces are reported when namespaces are used.
+    _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nasurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2>\
+<Element3 xmlns=\"nsuri\">Content3</Element3>\
+<Element4 xmlns=\"nsuri\"/></a:Test>");
+
+    // When EReportNamespaceMapping is enabled all the namespace declarations
+    // are reported in exactly the same element as they are defined in parsed
+    // XML document.
+    // Note: The Order of namespace declarations in root element tag may change.
+    // Namespace declaration for root tag is created when fragment is created
+    // and because of that namespace declaration for root tag will be the first.
+    // In this particular case namespace declaration for prefix "a" will be
+    // the first namespace declaration because it is declared when
+    // CSenFragmentBase is created.
+    _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+    
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+
+/*	
+	//tma
+	pParser->ParseBeginL();
+	
+	_LIT8(KXmlParserMimeType,   "text/xml");
+	pParser->ParseBeginL(KXmlParserMimeType);
+		
+    CMatchData* pMatchData = CMatchData::NewLC();
+    pMatchData->SetMimeTypeL(KXmlParserMimeType);
+    pParser->ParseBeginL(*pMatchData);
+    CleanupStack::PopAndDestroy(pMatchData);
+	//tma	
+*/
+
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+    CSenFragmentBase* pFragment2 = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment2);
+
+	pParser->ParseL(KInputString, *pFragment2);
+	
+	HBufC8* pAsXml2 = pFragment2->AsXmlL();
+	CleanupStack::PushL(pAsXml2);
+	                   
+    if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+    
+    CleanupStack::PopAndDestroy(pAsXml2);
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing2L(TTestResult& aResult)
+	{
+	SetupL();
+    // Parsing of XML document to CSenFragmentBase which uses
+    // delegation.
+    _LIT8(KInputString, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<DelegateFragment>DelegateContent</DelegateFragment>\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+
+    // Default namespace declaration (xmlns="nsuri") from Parent element (Test)
+    // will be moved to all child elements (Element1, Element2, Element3 and
+    // Element4) when EReportNamespaceMapping is _NOT_ enabled. That's because
+    // the way CParser works <=> Namespaces are reported when namespaces are used
+    // for the first time.
+    // Note: In CSenFragmentBase case DelegateFragment won't be in
+    //       content of parent fragment which did the delegation.
+    _LIT8(KOutputString1, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+a:x=\"value1\" b:z=\"value2\">\
+<Element1 xmlns=\"nsuri\" x=\"value4\">Content1</Element1>\
+<Element2 xmlns=\"nsuri\">Content2</Element2></a:Test>");
+
+    // When EReportNamespaceMapping is enabled all the namespace declarations
+    // are reported in exactly the same element as they are defined in parsed
+    // XML document.
+    // Note: The Order of namespace declarations in root element tag may change.
+    // Namespace declaration for root tag is created when fragment is created
+    // and because of that namespace declaration for root tag will be the first.
+    // Note: In CSenFragmentBase case DelegateFragment won't be in
+    //       content of parent fragment which did the delegation.
+    _LIT8(KOutputString2, "<a:Test xmlns:a=\"nasuria\" xmlns:b=\"nsurib\" \
+xmlns=\"nsuri\" a:x=\"value1\" b:z=\"value2\">\
+<Element1 x=\"value4\">Content1</Element1>\
+<Element2>Content2</Element2></a:Test>");
+     
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CMainFragment* pFragment = CMainFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    
+    CDelegateFragment& delegate = pFragment->DelegateFragment();
+    HBufC8* pDelegateAsXml = delegate.AsXmlL();
+    CleanupStack::PushL(pDelegateAsXml);
+    if(!( *pDelegateAsXml ==
+                 _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pDelegateAsXml);
+    
+    CleanupStack::PopAndDestroy(pFragment);
+
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+    CMainFragment* pFragment2 = CMainFragment::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment2);
+
+	pParser->ParseL(KInputString, *pFragment2);
+	
+	HBufC8* pAsXml2 = pFragment2->AsXmlL();
+	CleanupStack::PushL(pAsXml2);
+    if(!( *pAsXml2 == KOutputString2 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml2);
+    
+    CDelegateFragment& delegate2 = pFragment2->DelegateFragment();
+    HBufC8* pDelegateAsXml2 = delegate2.AsXmlL();
+    CleanupStack::PushL(pDelegateAsXml2);
+    if(!( *pDelegateAsXml2 ==
+                 _L8("<DelegateFragment xmlns=\"nsuri\">DelegateContent</DelegateFragment>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pDelegateAsXml2);
+    
+    CleanupStack::PopAndDestroy(pFragment2);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+         
+         
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing3L(TTestResult& aResult)
+	{
+	SetupL();
+    // Parsing of XML document to CSenFragmentBase
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">Content1</Element1>\
+<x:Element2 xmlns:x=\"nsuri\">Content2</x:Element2>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+    
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing4L(TTestResult& aResult)
+	{
+	SetupL();
+    // Parsing of XML document to CSenFragmentBase
+    // In this test nested elements (which have same name) are tested.
+    _LIT8(KInputString, "<a:Test xmlns=\"nsuri\" xmlns:a=\"nasuria\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+    _LIT8(KInputString2, "<Nested xmlns=\"nsuri\">\
+<Nested attr=\"attrvalue\"><Nested><Nested>Content</Nested></Nested></Nested>\
+</Nested>");
+
+    // Only namespace declaration order changes for output.
+    // Element4 which has no content will be output with
+    // start and end tags.
+    _LIT8(KOutputString, "<a:Test xmlns:a=\"nasuria\" xmlns=\"nsuri\" \
+xmlns:b=\"nasurib\" a:x=\"value1\" b:z=\"value2\" z=\"value3\">\
+<Element1 xmlns:c=\"nsuric\" c:x=\"value4\">\
+<Element1>Content</Element1>\
+</Element1>\
+<Element3>Content3</Element3>\
+<Element4/></a:Test>");
+
+	CSenParser* pParser = CSenParser::NewLC();
+	
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("nasuria"),_L8("Test"),_L8("a"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString, *pFragment);
+	
+	HBufC8* pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KOutputString )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+    pFragment = CSenFragmentBase::NewL(_L8("nsuri"),_L8("Nested"));
+    CleanupStack::PushL(pFragment);
+	pParser->EnableFeature(EReportNamespaceMapping);
+	
+	pParser->ParseL(KInputString2, *pFragment);
+	
+	pAsXml = pFragment->AsXmlL();
+	CleanupStack::PushL(pAsXml);
+
+    if(!( *pAsXml == KInputString2 )) return KErrArgument;
+
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pFragment);
+
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenFragmentBase_Parsing5L(TTestResult& aResult)
+	{
+	SetupL();
+    // Parsing of XML document to CSenDomFragmentBase
+    // when constructor CSenDomFragmentBase::NewL() is used.
+    _LIT8(KInputString, "<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<S:Header>\
+<wsa:MessageID>URN:UUID:ACF914D6-86A4-E5CF-4BD2-BD9CC2AD30E1</wsa:MessageID>\
+<wsa:To>http://10.132.11.35/WSStar/STS.aspx</wsa:To>\
+<wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>\
+<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wsse:UsernameToken>\
+<wsse:Username>PCNSA15\\wsstar</wsse:Username>\
+<wsse:Password>jaszmn\\3</wsse:Password>\
+</wsse:UsernameToken>\
+</wsse:Security>\
+</S:Header>\
+<S:Body>\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>\
+</S:Envelope>");
+
+    // Note: If EReportNamespaceMapping is not enabled output will be following:
+    //       (Namespace declaration for prefix "wsa" jumps from root element to
+    //        elements (MessageID, To, Action and EndpointReference) which actually
+    //        use above mentioned prefix. <=> Root element Envelope does not use
+    //        "wsa" prefix.)
+    _LIT8(KOutputString1, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+    _LIT8(KOutputString2, "<S:Body xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" \
+xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" \
+xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">\
+<wst:RequestSecurityToken xmlns:wst=\"http://schemas.xmlsoap.org/ws/2005/02/trust\">\
+<wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>\
+<wst:Renewing/>\
+<wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType>\
+<wsp:AppliesTo xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">\
+<wsa:EndpointReference>\
+<wsa:Address>http://10.132.11.35/WSStar/WSService.aspx</wsa:Address>\
+</wsa:EndpointReference>\
+</wsp:AppliesTo>\
+</wst:RequestSecurityToken>\
+</S:Body>");
+
+    CSenParser* parser = CSenParser::NewLC();
+    //create a CSenDomFragment
+	CSenFragmentBase* pBase = CSenFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+	                                                 _L8("Body"),
+	                                                 _L8("S"));
+	CleanupStack::PushL(pBase);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    HBufC8* pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString1 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    CleanupStack::PopAndDestroy(pBase);
+
+    pBase = CSenFragmentBase::NewL(_L8("http://www.w3.org/2003/05/soap-envelope"),
+	                               _L8("Body"),
+	                               _L8("S"));
+    CleanupStack::PushL(pBase);
+    //Enable NamespaceMapping to ensure that namespace declarations will
+    //remain in exactly the same place as in original XML document
+    parser->EnableFeature(EReportNamespaceMapping);
+	//do the parsing
+	parser->ParseL(KInputString, *pBase);
+	
+    pAsXml = pBase->AsXmlL();
+    CleanupStack::PushL(pAsXml);
+    if(!( *pAsXml == KOutputString2 )) return KErrArgument;
+    CleanupStack::PopAndDestroy(pAsXml);
+    
+    CleanupStack::PopAndDestroy(pBase);
+    CleanupStack::PopAndDestroy(parser);
+    Teardown();
+    return KErrNone;    
+	}
+
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLL(TTestResult& aResult)
+	{
+	SetupL();
+    CSenParser* pParser = CSenParser::NewL();
+    delete pParser;
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenParser_NewLCL(TTestResult& aResult)
+	{
+	SetupL();
+    CSenParser* pParser = CSenParser::NewLC();
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_1L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    CParser* pParser = CParser::NewL(KXmlParserMimeType, *pFragment);
+
+    // Ownership of the pParser is transfered to pSenParser
+    CSenParser* pSenParser = CSenParser::NewL(pParser);
+    delete pSenParser;
+
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_1L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CSenFragmentBase* pFragment = CSenFragmentBase::NewL(_L8("Test"));
+    CleanupStack::PushL(pFragment);
+    CParser* pParser = CParser::NewL(KXmlParserMimeType, *pFragment);
+
+    // Ownership of the pParser is transfered to pSenParser
+    CSenParser* pSenParser = CSenParser::NewLC(pParser);
+    CleanupStack::PopAndDestroy(pSenParser);
+
+    CleanupStack::PopAndDestroy(pFragment);
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_2L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CSenParser* pParser = CSenParser::NewL(KXmlParserMimeType);
+    delete pParser;
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_2L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CSenParser* pParser = CSenParser::NewLC(KXmlParserMimeType);
+    CleanupStack::PopAndDestroy(pParser);
+    Teardown();
+    return KErrNone;    
+	}
+/*        
+#if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) )
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewL_3L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CMatchData* pMatchData = CMatchData::NewLC();
+    pMatchData->SetMimeTypeL(KXmlParserMimeType);
+    CSenParser* pParser = CSenParser::NewL(*pMatchData);
+    delete pParser;
+    CleanupStack::PopAndDestroy(pMatchData);
+    Teardown();
+    return KErrNone;    
+	}
+
+TInt CSenFragmentBCTest::MT_CSenParser_NewLC_3L(TTestResult& aResult)
+	{
+	SetupL();
+    _LIT8(KXmlParserMimeType,   "text/xml");
+    CMatchData* pMatchData = CMatchData::NewLC();
+    pMatchData->SetMimeTypeL(KXmlParserMimeType);
+    CSenParser* pParser = CSenParser::NewLC(*pMatchData);
+    CleanupStack::PopAndDestroy(pParser);
+    CleanupStack::PopAndDestroy(pMatchData);
+    Teardown();
+    return KErrNone;    
+	}
+
+#endif 
+        
+*/        
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    document.Close();
+    if(!( document.IsNull() )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+        
+        
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLCL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewLC();
+    CleanupStack::PopAndDestroy();
+    
+    // Can't use IsNull() function because iInternal pointer
+    // (of document) is not NULLed. Only data for which iInternal
+    // points to is deleted.
+    //EUNIT_ASSERT( document.IsNull() );
+    Teardown();
+    return KErrNone;    
+	}
+         
+TInt CSenFragmentBCTest::MT_RSenDocument_NewL_1L(TTestResult& aResult)
+	{
+	SetupL();
+    // Can't test RSenDocument::NewL(void* aInternal)
+    // because there is no way to get proper aInternal
+    // using public API.
+    if(!( ETrue )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+         
+TInt CSenFragmentBCTest::MT_RSenDocument_NewLC_1L(TTestResult& aResult)
+	{
+	SetupL();
+    // Can't test RSenDocument::NewLC(void* aInternal)
+    // because there is no way to get proper aInternal
+    // using public API.
+    if(!( ETrue )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+        
+TInt CSenFragmentBCTest::MT_RSenDocument_CopyL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document1 = RSenDocument::NewL();
+    TXmlEngElement element = document1.CreateDocumentElementL(_L8("Test"));
+    
+    element.AddTextL(_L8("testcontent"));
+    
+    RSenDocument document2 = document1.Copy();
+    
+    // Check that main elements of document1 and document2 
+    // are pointing to the same "in memory node" after copying.
+    if(!( element.IsSameNode(document2.DocumentElement()) )) return KErrArgument;
+    
+    // Test that document2 contains the same data as document1
+    // did contain before closing document1.
+    document1.Close();
+    RBuf8 asXml;
+    TXmlEngSerializationOptions options;
+    options.iOptions = options.iOptions |
+                       TXmlEngSerializationOptions::KOptionOmitXMLDeclaration;
+    document2.SaveL(asXml, element, options);
+    CleanupClosePushL(asXml);
+    if(!( asXml == _L8("<Test>testcontent</Test>") )) return KErrArgument;
+    CleanupStack::PopAndDestroy(&asXml);
+    
+    document2.Close();
+    if(!( document1.IsNull() && document2.IsNull() )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+                
+TInt CSenFragmentBCTest::MT_RSenDocument_CloseL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    document.Close();
+    if(!( document.IsNull() )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+                
+TInt CSenFragmentBCTest::MT_RSenDocument_DestroyL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    document.Destroy();
+    if(!( document.IsNull() )) return KErrArgument;
+    Teardown();
+    return KErrNone;    
+	}
+	
+TInt CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsAttachLL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    TInt retVal = document.ManualXmlEngineTlsAttachL();
+    TL(retVal == KErrNone || retVal == KErrUnknown || retVal == KErrAlreadyExists);
+    Teardown();
+    return KErrNone;    
+	}
+	
+TInt CSenFragmentBCTest::MT_RSenDocument_ManualXmlEngineTlsCleanupL(TTestResult& aResult)
+	{
+	SetupL();
+    RSenDocument document = RSenDocument::NewL();
+    TInt retVal = document.ManualXmlEngineTlsCleanup();
+    TL(retVal == KErrNone || retVal == KErrNotFound );
+    Teardown();
+    return KErrNone;    
+	}
+
+
+TInt CSenFragmentBCTest::MT_TestFragmentBase_SetContentLL(TTestResult& aResult)
+	{
+	SetupL();
+    CTestFragmentBase* pFragment = CTestFragmentBase::NewL(_L8("Test"));
+	pFragment->SetContentL(_L8("Test"));
+    Teardown();
+    return KErrNone;    
+	}
+
+	
+TInt CSenFragmentBCTest::MT_TestFragmentBase_AddContentLL(TTestResult& aResult)
+	{
+	SetupL();
+    CTestFragmentBase* pFragment = CTestFragmentBase::NewL(_L8("Test"));
+	pFragment->AddContentL(_L8("Test"));
+    Teardown();
+    return KErrNone;    
+	}
+	
+	
+TInt CSenFragmentBCTest::MT_TestDomFragmentBase_SetContentOfLL(TTestResult& aResult)
+	{
+	SetupL();
+	_LIT8(KText, "Test1");
+    CTestDomFragmentBase* pFragment = CTestDomFragmentBase::NewL(_L8("Test"));
+    pFragment->SetContentOfL(_L8("Test"), _L8("Test1"));
+    TPtrC8 ptr = pFragment->ContentOf(_L8("Test"));
+    TL(ptr == KText);
+    Teardown();
+    return KErrNone;    
+	}
+/*	
+TInt CSenFragmentBCTest::MT_TestDomFragmentBase_ContentOfL(TTestResult& aResult)
+	{
+	SetupL();
+    Teardown();
+    return KErrNone;    
+	}
+	
+*/
+
+//  End of File