JetPro
JetPro

Reputation: 1054

SOAP POST Request using VBScript

I am looking for a simple way to send a POST request on a web service and receive a response as well using VBScript. So far, I have found a way to send a GET request using the code below:

Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", "http://www.webservicex.net/stockquote.asmx?WSDL", FALSE
http.send ""
WScript.Echo http.responseText

Please note that I chose VBScript because I am planning to create scheduled task using Task Scheduler on server. If there are any other ways to do this, please let me know.

Thanks in advance.

Upvotes: 1

Views: 6275

Answers (1)

sampathsris
sampathsris

Reputation: 22280

You can use "POST" instead of "GET". That will create a HTTP Post request.

If you want to send anything as post data, you can do it with http.send

Sending form data

http.send "Name=John+Doe&Age=40&foo=bar&foobar=foobaz"

Sending a SOAP request

http.send "<?xml version="1.0"?><soap:Envelope ...... </soap:Envelope>"

Upvotes: 1

Related Questions