MSXML aaarrrgghhh !!!

tylerberk

New Member
Hi All,<BR><BR>I am trying to send a soap query to a server using the MSXML4 parser.. basically it works if IE5 is installed on the server but seems to permanently fail if IE6 is installed, evcen though it should make no difference.. does anyone know another way of doing it??.. the c# code is below...... HELP!!<BR><BR>using System;<BR>using System.Collections;<BR>using System.ComponentModel;<BR>using System.Data;<BR>using System.Drawing;<BR>using System.Web;<BR>using System.Web.SessionState;<BR>using System.Web.UI;<BR>using System.Web.UI.WebControls;<BR>using System.Web.UI.HtmlControls;<BR>using MSXML2;<BR><BR>namespace KnowledgeMine<BR>{<BR> /// <summary><BR> /// Summary description for WebForm1.<BR> /// </summary><BR> public class WebForm1 : System.Web.UI.Page<BR> {<BR> protected string query;<BR> protected System.Web.UI.WebControls.TextBox TextBox1;<BR> protected System.Web.UI.WebControls.Label Label1;<BR> protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;<BR> protected System.Web.UI.WebControls.ImageButton SubmitQuery;<BR> <BR> private void Page_Load(object sender, System.EventArgs e)<BR> {<BR> // Put user code to initialize the page here<BR> }<BR><BR> #region Web Form Designer generated code<BR> override protected void OnInit(EventArgs e)<BR> {<BR> //<BR> // CODEGEN: This call is required by the ASP.NET Web Form Designer.<BR> //<BR> InitializeComponent();<BR> base.OnInit(e);<BR> }<BR> <BR> /// <summary><BR> /// Required method for Designer support - do not modify<BR> /// the contents of this method with the code editor.<BR> /// </summary><BR> private void InitializeComponent()<BR> { <BR> this.SubmitQuery.Click += new System.Web.UI.ImageClickEventHandler(this.SubmitQu ery_Click);<BR> this.Load += new System.EventHandler(this.Page_Load);<BR><BR> }<BR> #endregion<BR><BR> private void SubmitQuery_Click(object sender, System.Web.UI.ImageClickEventArgs e)<BR> {<BR> string soapserver = @"http://192.168.2.126:8020";<BR> MSXML2.XMLHTTP xmlquery = new MSXML2.XMLHTTPClass();<BR> <BR> xmlquery.open ("POST", soapserver, false, "","");<BR> xmlquery.setRequestHeader("Man", "POST" + " " + soapserver + " HTTP/1.0");<BR> xmlquery.setRequestHeader ("MethodName", "Query");<BR> xmlquery.setRequestHeader ("MessageType", "CALL");<BR> xmlquery.setRequestHeader ("Host", "LocalHost:8020");<BR> xmlquery.setRequestHeader ("Content-Type", "text/xml");<BR> try <BR> {<BR> xmlquery.send(SOAPQUERY());<BR> <BR> try <BR> {<BR> Response.Write(xmlquery.responseText.ToString());<BR> }<BR> catch<BR> {<BR> Response.Write("response did not work");<BR> }<BR> finally<BR> {<BR> //do nothing<BR> }<BR> }<BR> catch <BR> {<BR> Response.Write("Did not Send<BR>"+xmlquery.status+"<BR>"+xmlquery.statusText+"<BR>");<BR> Response.Write (SOAPQUERY());<BR> }<BR> <BR> finally <BR> {<BR> Response.Write("hello world");<BR> Response.End();<BR> }<BR> }<BR> public string SOAPQUERY(){<BR> string query;<BR> query = "<SOAP:Envelope xmlns:SOAP=urn:schemas-xmlsoap-org:soap.v1>";<BR> query = query + "<SOAP:Body>";<BR> query = query + "<IP-ADDRESS>" + Request.ServerVariables["REMOTE_ADDR"] + "</IP-ADDRESS><QUERY><INDEX-ID>1</INDEX-ID><SEARCH>"+ TextBox1.Text +"</SEARCH><COUNT>25</COUNT><QUERY-TYPE>0</QUERY-TYPE></QUERY>";<BR> query = query + "</SOAP:Body>";<BR> query = query + "</SOAP:Envelope>";<BR> return query.ToString();<BR> }<BR> <BR> }<BR>}
 
Back
Top