Code
1 function callwebservices (Surl, smethodname, soapmessage, xmlstring)
2 callwebservices = false
3
4 set XMLHTTP = Createobject ("msxml2.xmlhttp ")
5 XMLHTTP. Open "Post", Surl, false
6 XMLHTTP. setRequestHeader "Content-Type", "text/XML; charset = UTF-8"
7 XMLHTTP. setRequestHeader "soapaction", Surl & "/" & smethodname
8 XMLHTTP. Send (soapmessage)
9 'response. Write ("XMLHTTP. Status:" & XMLHTTP. Status & "<br> ")
10 'response. Write ("XMLHTTP. statustext:" & XMLHTTP. statustext & "<br> ")
11 'response. Write ("XMLHTTP. responsetext:" & XMLHTTP. responsetext & "<br> ")
12 'response. Write ("XMLHTTP. responsexml. xml:" & XMLHTTP. responsexml. xml & "<br> ")
13 if XMLHTTP. Status = 200 then
14 callwebservices = true
15 xmlstring = XMLHTTP. responsexml. xml
16 end if
17 set XMLHTTP = nothing
18 end Function
This method requires the construction of a SOAP request string.
Calling Web Services in C # is much easier. As long as you add a web reference, you can use it like using your own class.