p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: send xml object with xmlhttp


Message #1 by "heriyanto binduni" <ryan@s...> on Wed, 28 Feb 2001 10:43:10 +0700
dear all,
please help me.
i want to send an xml document -- create on the fly -- to another web 
server using the xmlHttp object.
but i got the error report:

Error Type:
(0x800C0005)
/test/login.asp, line 89

this error line, reference to objXMLHttp.send xmlDoc on code.
here the code:
--------------------begin
adrUSG =3D "http://202.150.92.200:1111/usg/command.asp"

set xmlDoc =3D server.createObject("Msxml2.DOMDocument")
set usgNode =3D xmlDoc.createElement("USG")
usgNode.setAttribute "COMMAND","USER_ADD"
usgNode.setAttribute "MAC_ADDR","11011001010110001"
xmlDoc.appendChild(usgNode)

set objXMLHttp =3D server.createObject("Msxml2.XMLHTTP")
objXMLHttp.open "POST", adrUSG, false

'send xmlDoc to adrUSG as xml document/object
'and here the error occur
objXMLHttp.send xmlDoc

Set xmlRes =3D CreateObject("Msxml2.DOMDocument")
xmlRes.async =3D False
xmlRes.loadxml(objXMLHttp.responseXML)

'save the xml response from adrUSG to server as response.xml
xmlRes.save(Server.MapPath("response.xml"))
-------------------end

can you please, help me, what's wrong with my code above?
i have replace objXMLHttp.send xmlDoc with objXMLHttp.send xmlDoc.xml 
but i got the same error report :(
please help me..

thanks and regards,
ryan

  Return to Index