Autodesk MapGuide Enterprise
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
GeoRest PUT with AIMS 2013
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi All, has anyone tried a PUT with XML with GeoRest with AIMS 2013?
I am getting an "Update Done" with a responseText but the data actually isn't updating.
Any clues? I am using IIS 7.5
Solved! Go to Solution.
Re: GeoRest PUT with AIMS 2013
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Steps to reproduce:
1. Modify the existing restcfg.xml in the C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\GeoREST\conf\Sheboygan\Property\ folder to (A) point to AIMS and (B) Make XML editable:
<Resource uripart="property">
<Source type="MapGuide">
<FeatureSource>Library://Samples/Sheboygan/Data/Pa
<FeatureClass>SHP_Schema
arcels</FeatureClass>
<ServerIp>127.0.0.1</ServerIp>
<ServerPort>2802</ServerPort>
</Source>
<Representation renderer="JSON" pattern=".json"/>
<Representation renderer="XML" pattern=".xml">
<Method name="GET" />
<Method name="PUT" />
<Method name="POST" />
<Method name="DELETE" />
</Representation>
2. Restart IIS to refresh the Config in GeoRest
3. Test the site to make sure you can see the parcel data:
4. Now write the PUT code to change the RACRE from 14.25 to 500
<script language=javascript>
var xml='<?xml version="1.0" encoding="UTF-8" ?><FeatureSet><Features><Feature>';
xml=xml+ '<Property><Name>RACRE</Name>';
xml=xml+ '<Value>500</Value></Property>';
xml=xml+ '</Feature></Features></FeatureSet>';
var xmlhttp;
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange = function(evt)
{
if(this.readyState == 4)
{
alert(this.responseText);
}
};
xmlhttp.open("PUT",'http://localhost/rest/data/pro
xmlhttp.setRequestHeader("Content-Type","applicati
xmlhttp.send(xml);
}
</script>
This returns "Update Done" but the data actually does not update (this worked with MG2011)
Load the 1.html to verify
Re: GeoRest PUT with AIMS 2013
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Aha! You need to remove the read-only tag - unfortunately, you have to install MapGuide Maestro because there is not an option (at least I can't find it) in Autodesk Infrastructure Studio 2013 to remove this flag from the Datasource.

