473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 21674
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dan Sikorsky | last post by:
Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up? here's the...
0
by: P1ayboy | last post by:
Trying to use Dim objXmlHttp = Server.HttpWebRequest("Msxml2.ServerXMLHTTP.4.0") in a vb.net web application on server 2003, but receive the following error. "System.Web.HttpException: Could...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
1
by: ehilario | last post by:
Hello everyone, I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines. When I access the local machine (A) which has the same...
0
by: Sia Jai Sung | last post by:
Hi, I need to write a ASPX file that will post some request to other party (web service written in java), here is my code, <%@ Page aspcompat=true %> <% Dim xml, url
1
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
2
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking...
1
by: gihan | last post by:
Hi, I have a problem accessing remote webservice from my asp code. Instead of returning results, it returns list of web methods it has. Wonder where i'm doing wrong. Also note that, this is a...
2
by: arnomarga | last post by:
I am trying to consuming a .NET web service from a standard (classic) ASP, but having not so much luck as I dont have much experience about SOAP. Here is the webservice url:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.