Sending a parameter to webservice with MSXML2.ServerXMLHTTP?

Discussion in 'ASP General' started by Michael Christensen, Oct 24, 2005.

  1. 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
    Michael Christensen, Oct 24, 2005
    #1
    1. Advertising

  2. Michael Christensen

    Steven Burn Guest

    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" <> wrote in message
    news:...
    > 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, Oct 24, 2005
    #2
    1. Advertising

  3. 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.
    Bob Barrows [MVP], Oct 24, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maris Janis Vasilevskis

    MSXML2.ServerXMLHTTP to HttpWebRequest: Error 500

    Maris Janis Vasilevskis, Aug 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,283
    Maris Janis Vasilevskis
    Aug 29, 2005
  2. bo0oost

    Msxml2.ServerXMLHTTP

    bo0oost, Apr 17, 2004, in forum: XML
    Replies:
    0
    Views:
    2,804
    bo0oost
    Apr 17, 2004
  3. MSXML2.ServerXMLHTTP

    , Aug 23, 2005, in forum: ASP .Net Web Services
    Replies:
    7
    Views:
    780
    dado49
    Aug 25, 2005
  4. Dick Berthold

    MSXML2.ServerXMLHTTP

    Dick Berthold, Jun 5, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    175
    Dick Berthold
    Jun 5, 2006
  5. katrinaVictim@.

    msxml2.serverXMLhttp and response.binarywrite

    katrinaVictim@., Oct 16, 2005, in forum: ASP General
    Replies:
    4
    Views:
    316
    McKirahan
    Oct 17, 2005
Loading...

Share This Page