Multiple POST parameters, some containing XML
<p>I'd Like to be able to have my web service accept multiple POST parameters, some of which will be XML. Is this possible?  The code below will generate a server error:</p>

<p>WebResponse resp = (WebResponse)req.GetResponse();</p>

<p><pre><code>
string programId = "1";
        string statusMessages = statusMessagesXML.ToString(SaveOptions.DisableFormatting);</p>

<pre><code>    string postData = "programId=" + programId;
    postData += "&amp;statusMessages=" + HttpUtility.UrlEncode(statusMessages);
    string data = postData;

    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = data.Length;
    req.Method = "POST";
    StreamWriter writer = new StreamWriter(req.GetRequestStream());
    writer.Write(data);
    writer.Flush();
    writer.Close();

    String result = null;
    WebResponse resp = (WebResponse)req.GetResponse();
    Stream readstream = resp.GetResponseStream();
    StreamReader read = new StreamReader(readstream);

    result = read.ReadToEnd();
</code></pre>

<p></pre></code>
Thanks.</p>
