2 // Microsoft.Web.Services.Messaging.SoapPlainFormatter.cs
4 // Author: Todd Berman <tberman@gentoo.org>
6 // (C) 2003 Todd Berman
11 //FIXME: Can be removed when workaround is removed.
13 using System.Net.Sockets;
15 using Microsoft.Web.Services;
17 namespace Microsoft.Web.Services.Messaging
19 public class SoapPlainFormatter : ISoapFormatter
21 public SoapEnvelope Deserialize (Stream stream)
24 throw new ArgumentNullException ("stream");
26 SoapEnvelope env = new SoapEnvelope ();
30 //FIXME: Workaround for XmlDocument.Load's love of stream closing
31 byte[] buf = new byte[1024];
36 numRead = stream.Read(buf, 0, buf.Length);
37 msg = String.Concat (msg, Encoding.ASCII.GetString (buf, 0, numRead));
38 } while(((NetworkStream)stream).DataAvailable);
45 [MonoTODO("Should error if envelope has DimeAttachments")]
46 public void Serialize (SoapEnvelope env, Stream stream)
49 throw new ArgumentNullException ("stream");
52 throw new ArgumentNullException ("envelope");