Okay, I have managed to get the web service client to stream its request to
an XML file which I then FTP onto the server. What I need to do next is to
HTTP Post that XML to the real web service....
WebService definition
=====================
[WebMethod]
public string StartSession(string deviceUniqueID, string
applicationVersion)
{
return "SessionID";
}
CLIENT
======
private string QueryXml = "<?xml version=\"1.0\"
encoding=\"utf-8\"?><soap:Envelope
xmlns:soap=\"
http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsi=\"
http://www.w3.org/2001/XMLSchema-instance\"
xmlns:xsd=\"
http://www.w3.org/2001/XMLSchema\"><soap:Body><StartSession
xmlns=\"
http://tempuri.org/\"><deviceUniqueID>123</deviceUniqueID><applicationVersion>123</applicationVersion></StartSession></soap:Body></soap:Envelope>";
private void Form1_Load(object sender, EventArgs e)
{
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://localhost/HandheldVendorWebService/SyncService.asmx");
request.Method = "POST";
request.ContentType = "text/xml";
request.ContentLength = QueryXml.Length;
byte[] postData = System.Text.ASCIIEncoding.ASCII.GetBytes(QueryXml);
request.GetRequestStream().Write(postData, 0, postData.Length);
/*******************************/
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);
textBox1.Text = reader.ReadToEnd();
}The QueryXml string is exactly what is generated by the client to call
StartSession(). When I call request.GetResponse() I get "500 Internal
server error", but this works fine in the test page inside Internet
Explorer.Any ideas?ThanksPete