Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Sending a parameter to webservice with MSXML2.ServerXMLHTTP? (http://www.velocityreviews.com/forums/t799869-sending-a-parameter-to-webservice-with-msxml2-serverxmlhttp.html)

Michael Christensen 10-24-2005 11:18 AM

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


Steven Burn 10-24-2005 11:23 AM

Re: Sending a parameter to webservice with MSXML2.ServerXMLHTTP?
 
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" <pokal@hotmail.com> wrote in message
news:1130152684.779634.135610@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
>




Bob Barrows [MVP] 10-24-2005 12:33 PM

Re: Sending a parameter to webservice with MSXML2.ServerXMLHTTP?
 
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.




All times are GMT. The time now is 10:58 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.