if in asp is CreateObject("Microsoft.XMLHTTP"). Is in asp.net this Server.CreateObject("MSXML2.Serv

Discussion in 'ASP .Net' started by Raúl Martín, May 12, 2004.

  1. 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 server don´t
    response right.

    xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")

    I have tried with MSXML2.ServerXMLHTTP.3.0 and MSXML2.ServerXMLHTTP.4.0
    but it´s the same

    Please help


    Function GetXML()

    Dim xml
    xml = "<?xml version='1.0' encoding='ISO-8859-1'?>" + _
    > "<barceloDS_requests>" + _

    "<request type='availability list' id='1'>" + _
    " <language_code>ING</language_code>" + _
    " <agency>" + _
    " <primary>888</primary>" + _
    " <secondary>88</secondary>" + _
    " <detail>888</detail>" + _
    " <branch>1</branch>" + _
    " </agency>" + _
    " <contract></contract>" + _
    " <check_in_date>20040501</check_in_date>" + _
    " <check_out_date>20040507</check_out_date>" + _
    " <location>" + _
    " <destination_code>PMI</destination_code>" + _
    " <zone_code></zone_code>" + _
    " </location>" + _
    " <establishment>" + _
    " <code></code>" + _
    " <category></category>" + _
    " </establishment>" + _
    " <board_type_code></board_type_code>" + _
    " <occupancy>" + _
    " <adults>2</adults>" + _
    " <children>1</children>" + _
    " <rooms>1</rooms>" + _
    " </occupancy>" + _
    "</request>" + _
    "</barceloDS_requests>"

    Dim xmlHTTP, URLPath, strXMLOut

    ' xmlHTTP = CreateObject("Microsoft.XMLHTTP")
    xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
    URLPath = "http://195.57.250.36/barceloDS/interface/xml"
    xmlHTTP.open("POST", URLPath, False)
    xmlHTTP.SetRequestHeader("Content-type", "application/xml")
    xmlHTTP.send(xml)
    strXMLOut = xmlHTTP.responseText
    Response.Write(strXMLOut)

    End Function
    Raúl Martín, May 12, 2004
    #1
    1. Advertising

  2. Raúl Martín

    Natty Gur Guest

    Natty Gur, May 13, 2004
    #2
    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. rote
    Replies:
    0
    Views:
    861
  2. ashish
    Replies:
    1
    Views:
    434
    ashish
    Aug 14, 2007
  3. Sagar

    Server.CreateObject Vs CreateObject

    Sagar, Jan 15, 2008, in forum: ASP General
    Replies:
    2
    Views:
    329
    Sagar
    Jan 15, 2008
  4. Arnaud
    Replies:
    4
    Views:
    387
    Arnaud
    Mar 17, 2006
  5. yawnmoth

    Msxml*.XMLHTTP vs. Microsoft.XMLHTTP

    yawnmoth, Nov 7, 2006, in forum: Javascript
    Replies:
    11
    Views:
    383
    Matt Kruse
    Nov 9, 2006
Loading...

Share This Page