From: Atsushi Eno Date: Mon, 17 Aug 2009 08:36:05 +0000 (-0000) Subject: 2009-08-17 Atsushi Enomoto X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=3068fbdf08bdf8c2d372a656a184b86fd4171803;p=mono.git 2009-08-17 Atsushi Enomoto * MessageHeaders.cs : when the value is null, do not try to deserialize EndpointAddress. svn path=/trunk/mcs/; revision=140042 --- diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog index d86b92277c8..dc95b047c65 100755 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog @@ -1,3 +1,8 @@ +2009-08-17 Atsushi Enomoto + + * MessageHeaders.cs : when the value is null, do not try to + deserialize EndpointAddress. + 2009-08-17 Atsushi Enomoto * MessageHeader.cs : add Value property. (Forgot dependent change.) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs index c38cdea9ba6..902f180ac9b 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs @@ -164,7 +164,7 @@ namespace System.ServiceModel.Channels return (T) dmh.Value; if (typeof (T) == typeof (EndpointAddress)) { XmlDictionaryReader r = GetReaderAtHeader (index); - return (T) (object) new EndpointAddress (r.ReadElementContentAsString ()); + return r.NodeType != XmlNodeType.Element ? default (T) : (T) (object) new EndpointAddress (r.ReadElementContentAsString ()); } else return GetHeader (index, GetSerializer (index));