Const URL = "http://www.domain.com/folder/service.asmx" Const nsUrl = "http://www.domain.com/namespace-name" ' Create the http request text Dim strSoapReq strSoapReq = GenerateSoapBodyStart() strSoapReq = strSoapReq + GenerateSoapFunctionCallStart("WebServiceFunctionName") strSoapReq = strSoapReq + GenerateSoapParameter("paramName1", paramValue1) strSoapReq = strSoapReq + GenerateSoapParameter("paramName2", paramValue2) strSoapReq = strSoapReq + GenerateSoapFunctionCallEnd("WebServiceFunctionName") strSoapReq = strSoapReq + GenerateSoapBodyEnd() Dim oHttp Dim strResult Set oHttp = CreateObject("Msxml2.XMLHTTP") oHttp.open "POST", URL, false oHttp.setRequestHeader "Content-Type", "text/xml" oHttp.setRequestHeader "SOAPAction", URL + "WebServiceFunctionName" oHttp.send strSoapReq strResult = oHttp.responseText ' parse XML in strResult Function GetResult(byval responseText, byval resultParam) Dim oXml Set oXml = CreateObject("Msxml2.DOMDocument") oXml.Async = true oXml.LoadXml responseText Dim strPath strPath = "/*/*/*/" + resultParam Dim oNode Set oNode = oXml.documentElement.SelectSingleNode(strPath) GetResult = oNode.Text End Function Function GenerateSoapBodyStart() Dim strSoap strSoap = "" strSoap = strSoap + " " strSoap = strSoap + "" GenerateSoapBodyStart = strSoap End Function Function GenerateSoapBodyEnd() Dim strSoap strSoap = "" strSoap = strSoap + "" GenerateSoapBodyEnd = strSoap End Function Function GenerateSoapFunctionCallStart(byval strFunction) Dim strSoap strSoap = "<" + strFunction + " xmlns=""" + nsUrl + """>" GenerateSoapFunctionCallStart = strSoap End Function Function GenerateSoapFunctionCallEnd(byval strFunction) Dim strSoap strSoap = "" GenerateSoapFunctionCallEnd = strSoap End Function Function GenerateSoapParameter(byval strParam, byval strValue) Dim strSoap strSoap = "<" + strParam + ">" strSoap = strSoap + strValue strSoap = strSoap + "" GenerateSoapParameter = strSoap End Function