/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpEnumerateResources::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Create ProxyResourceService instance Ptr<MgResourceService> mgprService = (MgResourceService*)(CreateService(MgServiceType::ResourceService)); // Create MgResourceIdentifier MgResourceIdentifier mgrIdentifier(m_resourceId); // Run API command Ptr<MgByteReader> byteReader = mgprService->EnumerateResources(&mgrIdentifier, m_depth, m_type, m_computeChildren); // Convert to requested response format, if necessary ProcessFormatConversion(byteReader); hResult->SetResultObject(byteReader, byteReader->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpEnumerateResources.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpGetSessionTimeout::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Get the site Ptr<MgSite> mgSite = m_siteConn->GetSite(); // Run API command INT32 ret = mgSite->GetSessionTimeout(); Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(ret); if(!value) throw new MgOutOfMemoryException(L"MgHttpGetSessionTimeout.Execute", __LINE__, __WFILE__, NULL, L"", NULL); hResult->SetResultObject(value, MgMimeType::Text); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetSessionTimeout.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpGetLegendImage::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Create ProxyMappingService instance Ptr<MgMappingService> mgprService = (MgMappingService*)(CreateService(MgServiceType::MappingService)); // Create MgResourceIdentifier MgResourceIdentifier layerDefinition(m_layerDefinition); // Run API command Ptr<MgByteReader> byteReaderResult = mgprService->GenerateLegendImage(&layerDefinition, m_scale, m_width, m_height, m_format, m_type, m_themeCategory); if (byteReaderResult) { hResult->SetResultObject(byteReaderResult, byteReaderResult->GetMimeType()); } MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetLegendImage.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpKmlGetLayer::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // Check common parameters ValidateCommonParameters(); if (m_boundingBox.empty()) { MgStringCollection arguments; arguments.Add(L"BBOX"); arguments.Add(MgResources::BlankArgument); throw new MgInvalidArgumentException(L"MgHttpKmlGetLayer.Execute", __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL); } STRING sessionId = m_userInfo->GetMgSessionId(); // Get a resource service instance Ptr<MgResourceService> resourceService = dynamic_cast<MgResourceService*>(CreateService(MgServiceType::ResourceService)); // Create MgLayer Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(m_layerDefinition); Ptr<MgLayer> layer = new MgLayer(resId, resourceService); // Get a KML service instance Ptr<MgKmlService> kmlService = dynamic_cast<MgKmlService*>(CreateService(MgServiceType::KmlService)); // Create Extents Ptr<MgEnvelope> extents = MgHttpKmlGetFeatures::GetExtents(m_boundingBox); // Get the KML representation of the map Ptr<MgByteReader> reader = kmlService->GetLayerKml(layer, extents, m_width, m_height, m_dpi, m_drawOrder, m_agentUri, m_format); // Set the result hResult->SetResultObject(reader, reader->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpKmlGetLayer.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpGetDrawing::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // Check common parameters ValidateCommonParameters(); MgResourceIdentifier resId(m_resId); // Create Proxy Drawing Service instance Ptr<MgDrawingService> service = (MgDrawingService*)(CreateService(MgServiceType::DrawingService)); // call the C++ API Ptr<MgByteReader> byteReaderResult = service->GetDrawing(&resId); hResult->SetResultObject(byteReaderResult, byteReaderResult->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetDrawing.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpCsConvertWktToCoordinateSystemCode::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // Check common parameters ValidateCommonParameters(); Ptr<MgCoordinateSystemFactory> factory = new MgCoordinateSystemFactory(); STRING code = factory->ConvertWktToCoordinateSystemCode(m_ogcWkt); Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(code); if(!value) throw new MgOutOfMemoryException(L"", __LINE__, __WFILE__, NULL, L"", NULL); hResult->SetResultObject(value, MgMimeType::Text); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpCsConvertWktToCoordinateSystemCode.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpEnumerateGroups::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Open connection to Mg server Ptr<MgSite> mgSite = m_siteConn->GetSite(); // Run API command Ptr<MgByteReader> byteReaderResult = mgSite->EnumerateGroups(); hResult->SetResultObject(byteReaderResult, byteReaderResult->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpEnumerateGroups.Execute") }
void MgHttpCopyResource::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Create ProxyResourceService instance Ptr<MgResourceService> mgprService = (MgResourceService*)(CreateService(MgServiceType::ResourceService)); // Create MgResourceIdentifier MgResourceIdentifier mgrSourceIdentifier(m_sourceResourceId); MgResourceIdentifier mgrDestIdentifier(m_destResourceId); // Run API command mgprService->CopyResource(&mgrSourceIdentifier, &mgrDestIdentifier, m_overwrite); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpCopyResource.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpGetMap::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // Check common parameters ValidateCommonParameters(); Ptr<MgResourceIdentifier> mapDefinition = new MgResourceIdentifier(m_mapDefinition); Ptr<MgHttpRequestParam> params = m_hRequest->GetRequestParam(); Ptr<MgPropertyCollection> commands = params->GetParameters()->GetPropertyCollection(); //execute the request through a dwf controller MgDwfController controller(m_siteConn, m_hRequest->GetAgentUri()); Ptr<MgByteReader> map = controller.GetMap(mapDefinition, m_dwfVersion, m_emapVersion, commands); hResult->SetResultObject(map, map->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetMap.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpGetMapLegendImage::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // Check common parameters ValidateCommonParameters(); // Determine the background color // TODO - Get background color from request Ptr<MgColor> backgroundColor = new MgColor(255, 255, 255); // Use the HTML controller to generate the map legend image MgHtmlController controller(m_siteConn); Ptr<MgByteReader> mapLegendImage = controller.GetMapLegendImage(m_mapName, m_mapFormat, backgroundColor, m_width, m_height); // Set the result hResult->SetResultObject(mapLegendImage, mapLegendImage->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetMapLegendImage.Execute") }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpEnumerateUnmanagedData::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult; MG_HTTP_HANDLER_TRY() hResult = hResponse.GetResult(); // Check common parameters ValidateCommonParameters(); // Create ProxyResourceService instance Ptr<MgResourceService> mgprService = (MgResourceService*)(CreateService(MgServiceType::ResourceService)); // call the C++ API Ptr<MgByteReader> byteReader = mgprService->EnumerateUnmanagedData(m_path, m_recursive, m_type, m_filter); // Convert to requested response format, if necessary ProcessFormatConversion(byteReader); hResult->SetResultObject(byteReader, byteReader->GetMimeType()); MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpEnumerateUnmanagedData.Execute") }
void MgRestTask::Execute_Post_StartWebLayout(MgHttpResponse& HttpResponse) { Ptr<MgResourceService> resourceService = dynamic_cast<MgResourceService*>(CreateService(MgServiceType::ResourceService)); bool openedMap = false; // Open MgWebLayout Ptr<MgResourceIdentifier> resid_weblayout = new MgResourceIdentifier(m_WebLayout); Ptr<MgWebLayout> weblayout = new MgWebLayout(resourceService,resid_weblayout); MgJsonDoc jsondoc; STRING ws_mapdefname = weblayout->GetMapDefinition(); std::string baseuri = m_RestRequest->GetBaseUri(); jsondoc.Add("m_BaseUri",baseuri); jsondoc.Add("m_MapDefName",ws_mapdefname); // like Library://XE/Map_Nanaimo.MapDefinition std::string tempstr; m_RestUriFactory->Create_MapDefinition(ws_mapdefname,tempstr); jsondoc.Add("m_MapDefNameUri",tempstr); // REST/MapDefinition[Library://XE/Map_Nanaimo.MapDefinition] //------------------------------------------------------- // Check if Session is defined if not create a new one //------------------------------------------------------- Ptr<MgUserInformation> userinfo = resourceService->GetUserInfo(); STRING ws_sessionid = userinfo->GetMgSessionId(); if( ws_sessionid.length() == 0 ) { Ptr<MgSite> mgSite = m_siteConn->GetSite(); ws_sessionid = mgSite->CreateSession(); userinfo->SetMgSessionId(ws_sessionid); } jsondoc.Add("m_Session",ws_sessionid); m_RestUriFactory->Create_Session(ws_sessionid,tempstr); jsondoc.Add("m_SessionUri",tempstr); // REST/MapDefinition[Library://XE/Map_Nanaimo.MapDefinition] //------------------------------------------------------- // Create a new Map from MapDefinition in a Session //------------------------------------------------------- Ptr<MgMap> map = new MgMap(); Ptr<MgResourceIdentifier> resid_mapdef = new MgResourceIdentifier(ws_mapdefname); STRING ws_mapname = resid_mapdef->GetName(); // name of the Map; needs to be unique inside session STRING uuid; MgUtil::GenerateUuid(uuid); ws_mapname.append(L"-"); ws_mapname.append(uuid); map->Create(resourceService, resid_mapdef, ws_mapname ); // Save the MgMap state Ptr<MgResourceIdentifier> resid_map = new MgResourceIdentifier(L"Session:" + ws_sessionid + L"//" + ws_mapname + L"." + MgResourceType::Map); map->Save(resourceService,resid_map); jsondoc.Add("m_MapDisplayName",resid_mapdef->GetName()); // like Library://XE/Map_Nanaimo.MapDefinition //------------------------------------------------------- // Read Layer defintions //------------------------------------------------------- //------------------------------------------------------- // Create Tree of Map Layers/Groups //------------------------------------------------------- c_Tree_MgLayerGroup tree_mglayergroup; Ptr<MgLayerGroupCollection> groups = map->GetLayerGroups(); for(int ind=0;ind<groups->GetCount();ind++) { Ptr<MgLayerGroup> group = groups->GetItem(ind); Ptr<MgLayerGroup> parentgroup = group->GetGroup(); c_TreeNode_MgLayerGroup node(group); tree_mglayergroup.Add(parentgroup,node); STRING name = group->GetName(); } Ptr<MgLayerCollection> layers = map->GetLayers(); for(int ind=0;ind<layers->GetCount();ind++) { Ptr<MgLayer> layer = (MgLayer*)layers->GetItem(ind); STRING name = layer->GetName(); Ptr<MgLayerGroup> parentgroup = layer->GetGroup(); c_TreeNode_MgLayerGroup node(layer); AddStyleRanges(node,resourceService,baseuri); tree_mglayergroup.Add(parentgroup,node); } // Now create JSON of it tree_mglayergroup.ToJson(jsondoc,"m_LayersGroups",m_RestUriFactory); //------------------------------------------------------- // Write Map data like Extent, Meters per Unit, Scale, CenterX, Center Y //------------------------------------------------------- Ptr<MgEnvelope> envelope = map->GetMapExtent(); Ptr<MgCoordinate> lowerleft = envelope->GetLowerLeftCoordinate(); jsondoc.Add("m_MapExtentMinX",lowerleft->GetX()); jsondoc.Add("m_MapExtentMinY",lowerleft->GetY()); Ptr<MgCoordinate> upperright = envelope->GetUpperRightCoordinate(); jsondoc.Add("m_MapExtentMaxX",upperright->GetX()); jsondoc.Add("m_MapExtentMaxY",upperright->GetY()); // meters per unit jsondoc.Add("m_MapMetersPerUnit",map->GetMetersPerUnit()); // DPI jsondoc.Add("m_MapDisplayDpi",map->GetDisplayDpi()); // Center X,Y Ptr<MgPoint> center = map->GetViewCenter(); Ptr<MgCoordinate> centercoordinate = center->GetCoordinate(); jsondoc.Add("m_MapViewCenterX",centercoordinate->GetX()); jsondoc.Add("m_MapViewCenterY",centercoordinate->GetY()); // View Scale jsondoc.Add("m_MapViewScale",map->GetViewScale()); //------------------------------------------------------- // Create a Selection Set for Map //------------------------------------------------------- Ptr<MgSelection> selection; selection = new MgSelection(map); selection->Save(resourceService, ws_mapname); jsondoc.Add("m_Map",ws_mapname); m_RestUriFactory->Create_Session_Map(ws_sessionid,ws_mapname,tempstr); jsondoc.Add("m_MapUri",tempstr); // REST/MapDefinition[Library://XE/Map_Nanaimo.MapDefinition] m_RestUriFactory->Create_Session_Map_ImagePng(ws_sessionid,ws_mapname,tempstr); jsondoc.Add("m_MapImageUri",tempstr); m_RestUriFactory->Create_Session_Map_QueryMapFeatures(ws_sessionid,ws_mapname,tempstr); jsondoc.Add("m_QueryMapFeaturesUri",tempstr); //------------------------------------------------------- // Set JSon string as result //------------------------------------------------------- string json_string; jsondoc.PrintFast(json_string); //jsondoc.Print(json_string); STRING json_widestring; MgUtil::MultiByteToWideChar(json_string, json_widestring); Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(json_widestring); Ptr<MgHttpResult> result; result = HttpResponse.GetResult(); result->SetResultObject(value, MgMimeType::JsonP); }//end of MgRestTask::Execute_Post_StartWebLayout
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgRestTask::Execute(MgHttpResponse& HttpResponse) { Ptr<MgHttpResult> hResult = HttpResponse.GetResult(); Ptr<MgHttpRequestParam> query_params = m_hRequest->GetRequestParam(); MG_HTTP_HANDLER_TRY() // // 1. URI for getting data about MAP // HttpMethod: GET URI: REST/SESSION[Id]/MAP[Id] // // 2. URI creating new MAP in Session // HttpMethod: POST URI: REST/SESSION[Id]/MAP ? MapDefName={Map Definition Name} // // 3. Get Image Extent // HttpMethod: GET URI: REST/SESSION[Id]/MAP[Id]/Extent // // 4. Get Image ( return png ) // HttpMethod: GET URI: REST/SESSION[Id]/MAP[Id]/Image.Png[...ImageCreationParameters...] {.jpg } // // 5. Set Image Extent // HttpMethod: PUT URI: REST/SESSION[Id]/MAP[Id]/Extent ? {SETCETNTERX=..}&{SETCENTERY=..}&.. // // Current Index should be on Map path parameter Ptr<MgRestUriPathParam> path_params = m_RestRequest-> GetUriPathParameters(); switch( m_RestRequest->GetHttpMethod() ) { case MgRestRequest::e_HttpMethod_Get: { } break; case MgRestRequest::e_HttpMethod_Post: { //Execute_Post_StartWebLayout(HttpResponse); } break; case MgRestRequest::e_HttpMethod_Put: break; case MgRestRequest::e_HttpMethod_Delete: break; default: break; } Execute_Post_StartWebLayout(HttpResponse); MG_CATCH(L"REST_Request_Hello.Execute") if (mgException != NULL) { if (hResult != NULL) { hResult->SetErrorInfo(m_hRequest, mgException); } (*mgException).AddRef(); mgException->Raise(); } }
/// <summary> /// Executes the specific request. /// </summary> /// <returns> /// MgHttpResponse /// This contains the response (including MgHttpResult and StatusCode) from the server. /// </returns> void MgHttpWfsDescribeFeatureType::Execute(MgHttpResponse& hResponse) { Ptr<MgHttpResult> hResult = hResponse.GetResult(); MG_HTTP_HANDLER_TRY() // We have to wrap the request parameters, since the outside // world is case-sensitive (with respect to names,) but // we need our parameters NOT to be so. Ptr<MgHttpRequestParam> origReqParams = m_hRequest->GetRequestParam(); MgHttpRequestParameters Parms(origReqParams); MgHttpResponseStream Out; MgOgcServer::SetLoader(GetDocument); MgUserInformation::SetCurrentUserInfo(m_userInfo); // Instance a server-lette MgOgcWfsServer Wfs(Parms,Out); // Determine required feature types CPSZ pszFeatureTypes = Wfs.RequestParameter(MgHttpResourceStrings::reqWfsTypeName.c_str()); STRING sFeatureTypes = pszFeatureTypes? pszFeatureTypes : _(""); Ptr<MgStringCollection> featureTypeList; if(sFeatureTypes.empty()) { featureTypeList = NULL; } else { featureTypeList = MgStringCollection::ParseCollection(sFeatureTypes, L","); } Ptr<MgResourceService> pResourceService = (MgResourceService*)(CreateService(MgServiceType::ResourceService)); Ptr<MgFeatureService> pFeatureService = (MgFeatureService*)(CreateService(MgServiceType::FeatureService)); // Retrieve feature definitions auto_ptr<MgWfsFeatureDefinitions> pFeatureTypes; if(NULL == featureTypeList) { pFeatureTypes.reset(new MgWfsFeatureDefinitions(pResourceService,pFeatureService)); } else { pFeatureTypes.reset(new MgWfsFeatureDefinitions(pResourceService,pFeatureService,featureTypeList)); } Wfs.SetFeatureDefinitions(pFeatureTypes.get()); // In order to validate request we have to invoke the ProcessRequest if(!Wfs.ProcessRequest(this)) { // Obtain the response byte reader Ptr<MgByteReader> errorResponse = Out.Stream().GetReader(); // Set the result hResult->SetResultObject(errorResponse, errorResponse->GetMimeType()); return; } // Determine required output format // This part must behind the Wfs.ProcessRequest, where parameters have been validated. CPSZ pszOutputFormat = Wfs.RequestParameter(MgHttpResourceStrings::reqWfsOutputFormat.c_str()); STRING sOutputFormat = pszOutputFormat? pszOutputFormat : _(""); if(sOutputFormat.empty()) { sOutputFormat = Wfs.GetDefaultDescribeFeatureTypeOutputFormat(STRING(Wfs.RequestParameter(MgHttpResourceStrings::reqWfsVersion.c_str()))); } if(pFeatureTypes->InSameNamespace()) { STRING sPrefix = L""; STRING sUrl = L""; STRING sResource = L""; // TODO: look for this in arg, since POST may put it there to save us trouble. STRING sSchemaHash = L""; Ptr<MgResourceIdentifier> idResource; Ptr<MgStringCollection> pFeatureClasses = new MgStringCollection(); while(pFeatureTypes->ReadNext()) { STRING sClassFullName = pFeatureTypes->GetClassFullName(); if(!sFeatureTypes.empty() && STRING::npos == sFeatureTypes.find(sClassFullName)) { continue; } STRING::size_type iPos = sClassFullName.find(_(":")); //NOXLATE if(iPos != STRING::npos) { if(sPrefix.empty()) { sPrefix = sClassFullName.substr(0,iPos); } STRING sClass = sClassFullName.substr(iPos+1); sUrl = pFeatureTypes->GetNamespaceUrl(); if(NULL == idResource) { if(pFeatureTypes->PrefixToFeatureSource(sPrefix, sResource, sSchemaHash)) { idResource = new MgResourceIdentifier(sResource); } else { // Badly formed feature type? Throw an exception. GenerateTypeNameException(hResult,sFeatureTypes); return; } } pFeatureClasses->Add(((sSchemaHash.size()==0) ? sClass : sSchemaHash + _(":") + sClass)); //NOXLATE } else { // Badly formed feature type? Throw an exception. GenerateTypeNameException(hResult,sFeatureTypes); return; } } if(pFeatureClasses->GetCount() == 0) { // Badly formed feature type? Throw an exception. GenerateTypeNameException(hResult,sFeatureTypes); return; } Ptr<MgByteReader> response = pFeatureService->DescribeWfsFeatureType(idResource, pFeatureClasses, sPrefix, sUrl); // Set the result hResult->SetResultObject(response, sOutputFormat); } else { // There's more than one feature, so we need to enumerate // them and have each get imported. // if(!pFeatureTypes->SubsetFeatureList(sFeatureTypes.c_str())) GenerateTypeNameException(hResult,sFeatureTypes); else { #ifdef _WFS_LOGGING MyLog.Write(_("WFS::DescribeFeatureType\r\n")); #endif // Execute the request //Wfs.ProcessRequest(this); // Slurp the results. Ptr<MgByteReader> capabilities = Out.Stream().GetReader(); // Set the result hResult->SetResultObject(capabilities, capabilities->GetMimeType()); } } MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpWfsDescribeFeatureType.Execute") }