aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Regions
diff options
context:
space:
mode:
authorDr Scofield2008-05-29 13:55:01 +0000
committerDr Scofield2008-05-29 13:55:01 +0000
commitc2925dcd404312b1751a03045ddcd35a7c84cd58 (patch)
treed5d5adbb4b0cb83a4c2559a2cb548209b0c72d7e /OpenSim/ApplicationPlugins/Rest/Regions
parentMantis#852. Thank you kindly, cmickeyb for a patch that: (diff)
downloadopensim-SC-c2925dcd404312b1751a03045ddcd35a7c84cd58.zip
opensim-SC-c2925dcd404312b1751a03045ddcd35a7c84cd58.tar.gz
opensim-SC-c2925dcd404312b1751a03045ddcd35a7c84cd58.tar.bz2
opensim-SC-c2925dcd404312b1751a03045ddcd35a7c84cd58.tar.xz
cleaning up returned XML REST doclet (no more xsi, xsd)
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);