= !MapGuide RFC 103 - Client needs to get WMS/WFS config info = This page contains an change request (RFC) for the !MapGuide Open Source project. More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||(July 13, 2010)|| ||Last Modified||(Christine Bao Tue July 13 05:23:00 2010)|| ||Author||Christine Bao|| ||RFC Status||Ready for Review|| ||Implementation Status||Not Implemented|| ||Proposed Milestone||2.3|| ||Assigned PSC guide(s)||Tom Fukushima|| ||'''Voting History'''|| == Overview == This RFC exposes GetDocument() API through HTTP Handler to allow client such as Studio to access WMS/WFS configuration file. == Motivation == When user uses client application such as Studio to publish WMS/WFS, (s)he wants to use some customized EPSG code which is defined in configuration file. For example, user can define an EPSG code mapping to a WKT if this EPSG code is not supported by MapGuide's coordinate system. {{{ PROJCS["CH1903.LV03/01",GEOGCS["LLCH1903",DATUM["CH-1903",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[660.0770,13.5510,369.3440,0.804816,0.577692,0.952236,5.66000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Swiss_Oblique_Cylindrical"],PARAMETER["false_easting",600000.000],PARAMETER["false_northing",200000.000],PARAMETER["latitude_of_origin",46.95240555555556],PARAMETER["central_meridian",7.43958333333333],UNIT["Meter",1.00000000000000]] }}} This EPSG code should be available in Studio for user to choose, however there is no way to get the config infomation so far. This RFC will provide a way to read WMS/WFS config file in client. == Proposed Solution == There is an API in ServerAdminService which can get the information.[[BR]] {{{ MgByteReader* GetDocument(CREFSTRING identifier); }}} [[BR]] It's not published through HTTP. A solution is to expose it through HTTP by adding HttpGetDocument in HttpHandler.[[BR]] {{{ #ifndef _S_GET_DOCUMENT_H #define _S_GET_DOCUMENT_H class MgHttpGetDocument : public MgHttpRequestResponseHandler { HTTP_DECLARE_CREATE_OBJECT() public: /// /// Initializes the common parameters of the request. /// /// Input /// MgHttpRequest /// This contains all the parameters of the request. /// /// /// nothing /// MgHttpGetDocument(MgHttpRequest *hRequest); /// /// Executes the specific request. /// /// Input /// This contains the response (including MgHttpResult and StatusCode) from the server. /// void Execute(MgHttpResponse& hResponse); private: STRING m_identifier; }; #endif }}} [[BR]] Then client can send HTTP request to get the document, for example: http:///mapguide2011/mapagent/mapagent.fcgi?Operation=GetDocument&Version=1.0.0&Identifier=Wms:OgcWmsService.config == Implications == This new added API won't affect existing application. == Test Plan == Test publish WMS/WFS in Studio, checking the customized EPSG code is available. == Funding/Resources == Supplied by Autodesk.