The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
How do I post XML to a web site
Posted: 28 Jan 09 11:09 AM
|
Hi, I have been trying to do this with my 7.2 and even with the help of my partner it still does not work - This line xmlhttp.Send oXML has an error:
dim oxml dim xmlhttp dim strXML dim strtarget dim strMethod strMethod = "API_test"
strtarget="http://www.xxxxxx.com/collective/cAdminAPI.cfc"
strxml = "" & "xx " & "dealaday " & "3054 " & ""
set oXML= CreateObject ("Microsoft.XMLDOM")
set xmlhttp = CreateObject ("Microsoft.XMLHTTP")
oXML.loadXML strXML ' strXML is the XML string yu want to post
xmlhttp.Open "POST", strTarget, false 'strTArget is the ASP page on the server to which you want to send see details here:http://msdn.microsoft.com/en-us/library/ms757849(VS.85).aspx
xmlhttp.Send oXML 'this will send the XML to the server see details here:http://msdn.microsoft.com/en-us/library/ms763706(VS.85).aspx
if xmlhttp.status = 200 then 'the post was successful
strXML=xmlhttp.responseText ' the response from the server
end if
ANY HELP would be greatly appreciated |
|
|
|
Re: How do I post XML to a web site
Posted: 29 Jan 09 3:19 AM
|
I'm not sure what you're trying to do, but this statement:
strxml = "" & "xx " & "dealaday " & "3054 " & ""
Means that the 'XML' youre sending is the string "xx dealaday 3054 "
Don't you want to send something that is actually XML?
|
|
|
|
Re: How do I post XML to a web site
Posted: 29 Jan 09 5:22 AM
|
you could try doing it like this instead:
set XMLObject = CreateObject("Msxml2.XMLHTTP") XMLObject.Open "POST", urlstr, False XMLObject.Send returnstring = XMLObject.responseText
This is (old) but working code - I don't remember if there is anything MSXML version specific here.
HTH
ws |
|
|
|
Re: How do I post XML to a web site
Posted: 30 Jan 09 11:40 AM
|
Thanks I will try it later. It was a sample string. It was the syntaxt that I did not know.
I appreciate the help from others on this board! |
|
|
|