469,658 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,658 developers. It's quick & easy.

Sending a parameter to webservice with MSXML2.ServerXMLHTTP?

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
-------------

Best regards

Michael Christensen

Oct 24 '05 #1
2 20484
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!

"Michael Christensen" <po***@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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
-------------

Best regards

Michael Christensen

Oct 24 '05 #2
Michael Christensen wrote:
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.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Oct 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by P1ayboy | last post: by
2 posts views Thread by Maris Janis Vasilevskis | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.