diff options
author | Mads Kruse Johnsen <mads@xmedicus.com> | 2018-11-16 14:31:00 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2018-11-16 14:31:00 +0300 |
commit | 7f5e358971b8fde74b8c0167e86c93fe25cba4bc (patch) | |
tree | 3b15857dfbbcd2fe6fe240ad12122bc98a1d3957 /mcs/class/System.ServiceModel | |
parent | 30bb12fa2aa4490e66bd7ac579a482c0d53695dc (diff) |
[wcf] do not assume that message body is always Wrapped (#11694)
Currently, setting IsWrapped=false on a MessageContract leads to an error in serialization due to an empty element being present where the wrapper element would have been, instead of it being gone entirely.
The serialization then fails because the empty string is not valid localName (which of course is fine).
Diffstat (limited to 'mcs/class/System.ServiceModel')
-rw-r--r-- | mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs index 0f881358df5..6c90e681f90 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XmlMessagesFormatter.cs @@ -112,7 +112,7 @@ namespace System.ServiceModel.Dispatcher foreach (var type in OperationKnownTypes) xmlImporter.IncludeType (type); XmlMembersMapping [] partsMapping = new XmlMembersMapping [1]; - partsMapping [0] = xmlImporter.ImportMembersMapping (desc.WrapperName, desc.WrapperNamespace, members, true); + partsMapping [0] = xmlImporter.ImportMembersMapping (desc.WrapperName, desc.WrapperNamespace, members, desc.WrapperName != null); bodySerializers [desc] = XmlSerializer.FromMappings (partsMapping) [0]; return bodySerializers [desc]; } |