title: Why I get an XmlException "Unexpected end of file" with the TextMessageEncodingBindingElement?
body: <p>I try to do something really simple in theory : deserialize a string to a Message, here is the code :</p>
  
  <pre><code>[TestMethod]
  public void EncoderErrorTest()
  {
      var message = "&lt;s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\"&gt;&lt;s:Header&gt;&lt;a:Action s:mustUnderstand=\"1\"&gt;http://tempuri.org/IHelloWorldService/SayHello&lt;/a:Action&gt;&lt;/s:Header&gt;&lt;s:Body&gt;&lt;SayHello xmlns=\"http://tempuri.org/\"&gt;&lt;name&gt;Nico&lt;/name&gt;&lt;/SayHello&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;";
  
      MemoryStream stream = new MemoryStream();
      StreamWriter writer = new StreamWriter(stream);
      writer.Write(message);
      stream.Position = 0;
      var soapMessage = new TextMessageEncodingBindingElement().CreateMessageEncoderFactory().Encoder.ReadMessage(stream, 99999);
      Assert.IsNotNull(soapMessage);
  }
  </code></pre>
  
  <p>But during the deserialization I get a XmlException "Unexpected end of file".
  Is something wrong with my code ?</p>
  
  <p>Thanks in advance for your responses.</p>