[mapguide-internals] MapGuide RESTful Web Service

Haris Kurtagic haris at sl-king.com
Wed Sep 5 13:49:35 EDT 2007

Yes, you are right. I have designed couple of those URI (very simillar
to one you described) and I am playing with adding new Maps, Layers.


-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Jason
Sent: Wednesday, September 05, 2007 7:25 PM
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] MapGuide RESTful Web Service

It strikes me that REST would be a great addition to repository (not
just session) management too.  All of the resources are accessible by
pseudo-URL already (Library://).  I'm not sure how you would deal with
things like resource data / config documents though...

Imagine going to http://localhost/rest/library and getting:

<li><a href="TestData" class="Folder">TestData</a></li>
<li><a href="Nanaimo" class="Folder">Nanaimo</a></li>
<li><a href="Samples" class="Folder">Samples</a></li>
<li><a href="RasterTest.FeatureSource"
<li><a href="RasterTest.LayerDefinition"

Or going to http://localhost/rest/library.js and getting

{ features: [
   { "type": "Folder", name="TestData",
uri="http://localhost/rest/library/TestData" },
   { "type": "Folder", name="Nanaimo",
uri="http://localhost/rest/library/Nanaimo" },
   { "type": "Folder", name="Samples",
uri="http://localhost/rest/library/Samples" },
   { "type": "FeatureSource", name="RasterTest",
uri="http://localhost/rest/library/RasterTest.FeatureSource" },  
   { "type": "LayerDefinition", name="RasterTest",
uri="http://localhost/rest/library/RasterTest.LayerDefinition" }

Or going to http://localhost/rest/library.xml and getting the default
EnumerateResources output.

The beauty of this is that not only could the directory listings be
returned in multiple representations, but so could the actual resources.
The JSON work with the MapAgent is defining some standard XML-to-JSON
mapping that could be used for JSON representations of the XML
resources.  I don't think it's worth reformatting the output to be more
JSON-like, as the effort required to manage two semantically different
representations would be excessive.


-----Original Message-----
From: Haris Kurtagic
Subject: [mapguide-internals] MapGuide RESTful Web Service

My colleague Simon Pelicon and I are working on adding a Web Service
functionality to Map Guide Open Source.

We are trying to implement it as RESTful Web Service.
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org

More information about the mapguide-internals mailing list