<%@ Language=VBScript %> <%Response.Buffer=true%> <% Const SoapServer = "web14.3essentials.com" Const SoapPath = "/$sitepreview/ws.ntforl.com/MathService2.asmx" ' Instantiate objects to hold the XML DOM and the HTTP/XML communication: Dim xmlhttp, soapMsg Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP") ' Build XML SOAP request: soapMsg = "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" & Trim(Request.Form("num1")) & "" soapMsg = soapMsg & "" & Trim(Request.Form("num2")) & "" soapMsg = soapMsg & "" & Request.Form("chooseOp") & "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" soapMsg = soapMsg & "" ' Build the custom SOAP request HTTP header: xmlhttp.Open "POST", "http://" & SoapServer & SoapPath, False ' False = Do not respond immediately xmlhttp.setRequestHeader "Man", "POST " & SoapPath & " HTTP/1.1" xmlhttp.setRequestHeader "Host", SoapServer xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8" xmlhttp.setRequestHeader "SOAPAction", "http://web14.3essentials.com/$sitepreview/ws.ntforl.com/Calculate" ' now Send the SOAP request using the header generated above: xmlhttp.send(soapMsg) If xmlhttp.Status = 200 Then ' Response from server was success soapResponse = xmlhttp.responseText Response.Write(soapResponse) Else ' Response from server failed xmlGeoSoap = "" ' Tell administrator what went wrong - maybe not users though Response.Write("Server Error...
") Response.Write("status = " & xmlhttp.status) Response.Write("
" & xmlhttp.statusText) Response.Write("
" & Request.ServerVariables("ALL_HTTP") & "
") End If Set xmlhttp = nothing %>