Browse Source

2009-08-17 Atsushi Enomoto <[email protected]>

	* MessageHeaders.cs : eliminate wrong use of
	  ReadElementContentAsString() (it is not always simple string).


svn path=/trunk/mcs/; revision=140043
Atsushi Eno 16 years ago
parent
commit
e7fb9bf4ec

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog

@@ -1,3 +1,8 @@
+2009-08-17  Atsushi Enomoto  <[email protected]>
+
+	* MessageHeaders.cs : eliminate wrong use of
+	  ReadElementContentAsString() (it is not always simple string).
+
 2009-08-17  Atsushi Enomoto  <[email protected]>
 
 	* MessageHeaders.cs : when the value is null, do not try to

+ 1 - 1
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 r.NodeType != XmlNodeType.Element ? default (T) : (T) (object) new EndpointAddress (r.ReadElementContentAsString ());
+				return r.NodeType != XmlNodeType.Element ? default (T) : (T) (object) EndpointAddress.ReadFrom (r);
 			}
 			else
 				return GetHeader<T> (index, GetSerializer<T> (index));