[mapguide-commits] r5152 - trunk/MgDev/Common/MapGuideCommon/Services

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Sep 19 01:50:38 EDT 2010


Author: liuar
Date: 2010-09-19 05:50:38 +0000 (Sun, 19 Sep 2010)
New Revision: 5152

Modified:
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureService.cpp
Log:
Submit on behalf of Mars Wu

It's for ticket 1443: MgProxyFeatureService::GetCapabilities is using a fixed api version 1.0.0
http://trac.osgeo.org/mapguide/ticket/1443

Steps: - Run WebTier? tests:Feature/GetCapabilities. It will get the capabilites for a certain FDO provider. - Keep the initial values for the test page except for changing the version to be 2.0.0 - Submit the request 

You will find the response is always for 1.0.0 instead of 2.0.0. 

The reason is like following: 

************** 
MgByteReader * MgProxyFeatureService::GetCapabilities?(CREFSTRING providerName, CREFSTRING connectionString) 
{ 

    MgCommand? cmd; 
    cmd.ExecuteCommand?(m_connProp, // Connection 
        MgCommand::knObject, // Return type expected 
        MgFeatureServiceOpId::GetCapabilities?_Id, // Command Code 
        2, // No of arguments   
        Feature_Service, // Service Id 
        BUILD_VERSION(1,0,0), // Operation version 
        MgCommand::knString, &providerName, // Argument#1 
        MgCommand::knString, &connectionString, // Argument#2 
        MgCommand::knNone); // End of argument 

    SetWarning?(cmd.GetWarningObject?()); 

    return (MgByteReader?*)cmd.GetReturnValue?().val.m_obj; 

} 
************ 

The version is a fixed one: BUILD_VERSION(1,0,0) instead of the requested version 
This submission changes BUILD_VERSION(1,0,0) to be m_connProp->GetUserInfo()->GetApiVersion() 


Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureService.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureService.cpp	2010-09-18 07:34:36 UTC (rev 5151)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureService.cpp	2010-09-19 05:50:38 UTC (rev 5152)
@@ -289,7 +289,7 @@
                        MgFeatureServiceOpId::GetCapabilities_Id,    // Command Code
                        2,                                           // No of arguments
                        Feature_Service,                             // Service Id
-                       BUILD_VERSION(1,0,0),                        // Operation version
+                       m_connProp->GetUserInfo()->GetApiVersion(),                        // Operation version
                        MgCommand::knString, &providerName,          // Argument#1
                        MgCommand::knString, &connectionString,      // Argument#2
                        MgCommand::knNone);                          // End of argument



More information about the mapguide-commits mailing list