[mapguide-commits] r5222 - trunk/MgDev/Web/src/HttpHandler
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Sep 30 06:49:59 EDT 2010
Author: liuar
Date: 2010-09-30 10:49:59 +0000 (Thu, 30 Sep 2010)
New Revision: 5222
Modified:
trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp
trunk/MgDev/Web/src/HttpHandler/WfsGetFeatureParams.cpp
Log:
Ticket #1449
Enhance post request type for WFS GetFeature Operation.
Modified: trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp 2010-09-30 10:10:13 UTC (rev 5221)
+++ trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp 2010-09-30 10:49:59 UTC (rev 5222)
@@ -77,18 +77,15 @@
MG_HTTP_HANDLER_TRY()
Ptr<MgHttpRequestParam> origReqParams = m_hRequest->GetRequestParam();
- // Comment out to pass the OGC CITE test
- // We should find a proper way to handle POST requests rather than hard code.
+
// Make sure the REQUEST and SERVICE parameters are set, in case this came from
// a POST request.
- //if(!origReqParams->ContainsParameter(MgHttpResourceStrings::reqWmsRequest))
- //{
- // origReqParams->AddParameter(MgHttpResourceStrings::reqWmsRequest, L"GetFeature"); //NOXLATE
- //}
- //if(!origReqParams->ContainsParameter(MgHttpResourceStrings::reqWmsService))
- //{
- // origReqParams->AddParameter(MgHttpResourceStrings::reqWmsService, L"WFS"); //NOXLATE
- //}
+ if(m_sPostRequestXml.length() > 0)
+ {
+ origReqParams->AddParameter(MgHttpResourceStrings::reqWmsRequest, L"GetFeature"); //NOXLATE
+ origReqParams->AddParameter(MgHttpResourceStrings::reqWmsService, L"WFS"); //NOXLATE
+ origReqParams->AddParameter(MgHttpResourceStrings::reqWmsVersion, L"1.1.0"); //NOXLATE
+ }
MgHttpRequestParameters requestParams(origReqParams);
MgHttpResponseStream responseStream;
Modified: trunk/MgDev/Web/src/HttpHandler/WfsGetFeatureParams.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/WfsGetFeatureParams.cpp 2010-09-30 10:10:13 UTC (rev 5221)
+++ trunk/MgDev/Web/src/HttpHandler/WfsGetFeatureParams.cpp 2010-09-30 10:49:59 UTC (rev 5222)
@@ -171,6 +171,15 @@
else
m_maxFeatures = -1;
+ STRING sVersion;
+ if(pBegin->GetAttribute(_("version"), sVersion) && sVersion.length() > 0)
+ m_version = sVersion;
+
+ STRING sOutputFormat;
+ if(pBegin->GetAttribute(_("outputFormat"), sOutputFormat) && sOutputFormat.length() > 0)
+ m_outputFormat = sOutputFormat;
+
+
// We want to hang onto the namespaces that are
// defined in the GetFeature request, since that will
// likely contain namespaces that help us track feature type
More information about the mapguide-commits
mailing list