F
Francis
I have the following codes in an asp file. This page can receive the XML string send from client.
==================================================
Dim objReceive
Set objReceive = Server.CreateObject("Microsoft.XMLDOM")
objReceive.async=false
On Error Resume Next
objReceive.load(Request)
if objReceive.xml <> "" then
Dim objWinHttp
Dim strHTML
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
'Set objWinHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
objWinHttp.Send objReceive.xml
Response.Write( "Status: " & objWinHttp.Status & " " & objWinHttp.StatusText)
strHTML = objWinHttp.ResponseText
Set objWinHttp = Nothing
else
Response.Write( "You have reached a secure site." )
end if
===================================================
objReceive.xml ===> contains the XML string from client
After receiving the XML string, the string need to be sent to another page, http://localhost/bank/Trx.asp.
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
But I cannot get the XML string in the Trx.asp, anything wrong with my code?
The 3rd parametere should I use false or true?
It's a simple code, but I still cannot figure out what is wrong. Pls comment. Thanks a lot.
==================================================
Dim objReceive
Set objReceive = Server.CreateObject("Microsoft.XMLDOM")
objReceive.async=false
On Error Resume Next
objReceive.load(Request)
if objReceive.xml <> "" then
Dim objWinHttp
Dim strHTML
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
'Set objWinHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
objWinHttp.Send objReceive.xml
Response.Write( "Status: " & objWinHttp.Status & " " & objWinHttp.StatusText)
strHTML = objWinHttp.ResponseText
Set objWinHttp = Nothing
else
Response.Write( "You have reached a secure site." )
end if
===================================================
objReceive.xml ===> contains the XML string from client
After receiving the XML string, the string need to be sent to another page, http://localhost/bank/Trx.asp.
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
But I cannot get the XML string in the Trx.asp, anything wrong with my code?
The 3rd parametere should I use false or true?
It's a simple code, but I still cannot figure out what is wrong. Pls comment. Thanks a lot.