[mapguide-commits] r7370 - branches/2.5/MgDev/Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Feb 19 16:08:16 PST 2013


Author: jng
Date: 2013-02-19 16:08:16 -0800 (Tue, 19 Feb 2013)
New Revision: 7370

Modified:
   branches/2.5/MgDev/Server/src/Services/Feature/OpUpdateFeatures.cpp
Log:
#2218: Fix UpdateFeatures writing incorrect stream response in the event of partial failure. Patch by Bruno Scott. Reviewed by Walt Welton-Lair and myself.

Modified: branches/2.5/MgDev/Server/src/Services/Feature/OpUpdateFeatures.cpp
===================================================================
--- branches/2.5/MgDev/Server/src/Services/Feature/OpUpdateFeatures.cpp	2013-02-19 17:53:39 UTC (rev 7369)
+++ branches/2.5/MgDev/Server/src/Services/Feature/OpUpdateFeatures.cpp	2013-02-20 00:08:16 UTC (rev 7370)
@@ -91,9 +91,6 @@
         // Execute the operation
         Ptr<MgPropertyCollection> rowsAffected = m_service->UpdateFeatures(resource, commands, useTransaction);
 
-        // Write the response
-        EndExecution(rowsAffected);
-
         // #649: Exceptions are only thrown in transactional cases (which will never reach here). For non-transactional cases, 
         // we check for any MgStringProperty instances. These are "serialized" FDO exception messages indicating failure for that 
         // particular command. We can't throw for non-transactional cases, instead we put the onus on the consuming caller to do 
@@ -109,6 +106,13 @@
                 break;
             }
         }
+
+        if (mgException == NULL && partialFailureMsg.empty())
+        {
+            // Only Write the response if there no Fdo Exception
+            // if there is an exception, Response will be written by MgFeatureServiceHandler::ProcessOperation catching it
+            EndExecution(rowsAffected);
+        }
     }
     else
     {
@@ -148,4 +152,5 @@
     MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
 
     MG_FEATURE_SERVICE_THROW()
+
 }



More information about the mapguide-commits mailing list