diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-10-07 21:10:27 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-10-07 21:10:27 +0400 |
commit | 85da70956753fef6ba42d3f74f610ca1c0af3c25 (patch) | |
tree | 11b9cc1fc0ce18c3667ff35bfbec73b7b1a6e434 /mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher | |
parent | 6aa4158f65491114892b9d7cbd1182b63b9d62c5 (diff) |
2009-10-07 Atsushi Enomoto <atsushi@ximian.com>
* WebMessageFormatter.cs : when they serialize Wrapped message, it
first writes "root" and then the wrapper element.
svn path=/trunk/mcs/; revision=143689
Diffstat (limited to 'mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher')
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog index 79dabfbda8a..299ede8e73c 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog @@ -1,5 +1,10 @@ 2009-10-07 Atsushi Enomoto <atsushi@ximian.com> + * WebMessageFormatter.cs : when they serialize Wrapped message, it + first writes "root" and then the wrapper element. + +2009-10-07 Atsushi Enomoto <atsushi@ximian.com> + * WebMessageFormatter.cs : JSON writer does not support namespace. 2009-09-02 Atsushi Enomoto <atsushi@ximian.com> diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs index 3499127ec68..12e32896038 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs @@ -327,11 +327,15 @@ namespace System.ServiceModel.Description protected override void OnWriteBodyContents (XmlDictionaryWriter writer) { - if (name != null) + writer.WriteStartElement ("root"); + if (name != null) { + writer.WriteAttributeString ("type", "object"); writer.WriteStartElement (name, ns); - serializer.WriteObject (writer, value); + } + serializer.WriteObjectContent (writer, value); if (name != null) writer.WriteEndElement (); + writer.WriteEndElement (); } } |