Sending a parameter to webservice with MSXML2.ServerXMLHTTP?

  • Thread starter Michael Christensen
  • Start date
M

Michael Christensen

Hi

How do I send an input-param to my web service with
MSXML2.ServerXMLHTTP?

Can this be done without the soap-toolkit?
Can't find anything about it - looking forward getting some help :)
-------------
Function GetLatest()
Dim url, xmlhttp, XMLDOM, XMLNode

url = "http://www.mssoapinterop.org/asmx/simple.asmx/echoString"
Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
Call xmlhttp.Open("POST", url,False)
Call xmlhttp.send

'Parse result
Set XMLDOM = Server.CreateObject("Microsoft.XMLDOM")
XMLDOM.Load(xmlhttp.responseBody)
Set XMLNode = XMLDOM.SelectSingleNode("//string")

If Not XMLNode Is Nothing Then
GetLatest = XMLNode.text
End If
End Function
 
S

Steven Burn

Call() is not necessary .....

sParams = "&some=param"
xmlhttp.Open "POST", url,False
xmlhttp.send sParams

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
B

Bob Barrows [MVP]

Michael said:
Hi

How do I send an input-param to my web service with
MSXML2.ServerXMLHTTP?

Can this be done without the soap-toolkit?.

Not that I know of. I've posted some links to relevant articles in the past.
I seem to recall 4GuysFromRolla had some good articles about it, so you may
want to concentrate your google search on their site. IIRC, searching for
"consume web service from classic asp" (no quotes) will give you some
relevant links.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top