By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,694 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,694 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

The .Net equivalent is HttpWebRequest / HttpWebRequest :

http://msdn.microsoft.com/msdnmag/is...b/default.aspx

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.