diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-10-07 16:53:36 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-10-07 16:53:36 +0400 |
commit | 2e58802be58f869db32e1596d69972364e883ee6 (patch) | |
tree | 3b491a47150939baf388e38ab39cda42ad6d2f56 /mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher | |
parent | d6e6c4b944e2526d1ed742a448160038f050b967 (diff) |
2009-10-07 Atsushi Enomoto <atsushi@ximian.com>
* WebMessageFormatter.cs : JSON writer does not support namespace.
svn path=/trunk/mcs/; revision=143635
Diffstat (limited to 'mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher')
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog index fc640d7802c..79dabfbda8a 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/ChangeLog @@ -1,3 +1,7 @@ +2009-10-07 Atsushi Enomoto <atsushi@ximian.com> + + * WebMessageFormatter.cs : JSON writer does not support namespace. + 2009-09-02 Atsushi Enomoto <atsushi@ximian.com> * WebMessageFormatter.cs : it was not returning value with correct 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 904e645eb02..3499127ec68 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs @@ -370,6 +370,12 @@ namespace System.ServiceModel.Description string mediaType = null; XmlObjectSerializer serializer = null; + + // FIXME: serialize ref/out parameters as well. + + string name = IsResponseBodyWrapped ? md.Body.WrapperName : null; + string ns = IsResponseBodyWrapped ? md.Body.WrapperNamespace : null; + switch (msgfmt) { case WebMessageFormat.Xml: serializer = GetSerializer (WebContentFormat.Xml); @@ -378,14 +384,10 @@ namespace System.ServiceModel.Description case WebMessageFormat.Json: serializer = GetSerializer (WebContentFormat.Json); mediaType = "application/json"; + ns = String.Empty; break; } - // FIXME: serialize ref/out parameters as well. - - string name = IsResponseBodyWrapped ? md.Body.WrapperName : null; - string ns = IsResponseBodyWrapped ? md.Body.WrapperNamespace : null; - Message ret = Message.CreateMessage (MessageVersion.None, null, new WrappedBodyWriter (result, serializer, name, ns)); // Message properties |