aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Regions
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs5
3 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index 81eb5bd..a605d09 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -129,7 +129,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
129 { 129 {
130 // complete region details requested 130 // complete region details requested
131 XmlSerializer xs = new XmlSerializer(typeof(RegionDetails)); 131 XmlSerializer xs = new XmlSerializer(typeof(RegionDetails));
132 xs.Serialize(XmlWriter, details); 132 xs.Serialize(XmlWriter, details, _xmlNs);
133 return XmlWriterResult; 133 return XmlWriterResult;
134 } 134 }
135 135
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 681b99f..67af7b5 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.Environment.Scenes;
35 35
36namespace OpenSim.ApplicationPlugins.Rest.Regions 36namespace OpenSim.ApplicationPlugins.Rest.Regions
37{ 37{
38 [XmlRoot(ElementName="region")] 38 [XmlRoot(ElementName="region", IsNullable = false)]
39 public class RegionDetails 39 public class RegionDetails
40 { 40 {
41 public string region_name; 41 public string region_name;
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
index 24bed99..fa5f117 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
@@ -56,6 +56,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
56 [Extension("/OpenSim/Startup")] 56 [Extension("/OpenSim/Startup")]
57 public partial class RestRegionPlugin : RestPlugin 57 public partial class RestRegionPlugin : RestPlugin
58 { 58 {
59 private static XmlSerializerNamespaces _xmlNs;
60
59 #region overriding properties 61 #region overriding properties
60 public override string Name 62 public override string Name
61 { 63 {
@@ -88,6 +90,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
88 return; 90 return;
89 } 91 }
90 m_log.InfoFormat("{0} REST region plugin enabled", MsgID); 92 m_log.InfoFormat("{0} REST region plugin enabled", MsgID);
93
94 _xmlNs = new XmlSerializerNamespaces();
95 _xmlNs.Add(String.Empty, String.Empty);
91 96
92 // add REST method handlers 97 // add REST method handlers
93 AddRestStreamHandler("GET", "/regions/", GetHandler); 98 AddRestStreamHandler("GET", "/regions/", GetHandler);