Im basically using a
VB application to post XML to an asp page. I've created the code that sends the post ... and so far I think it's working fine. It is as follows:
VBCode:
Quote:
quote:Dim oHttp As New XMLHTTP
oHttp.Open "POST", "http://www.myurl.com/blah.asp", False
oHttp.setRequestHeader "Content-Type", "text/xml"
oHttp.send "<xml text>contents of the file</xml>"
|
Now that is executing and I'm getting back the responseText just fine, the only problem is I can't figure out how to extract the xml in the asp page. I can access all the header information via Request.ServerVariables ... and if I check Request.ServerVariables("CONTENT_LENGTH") it tells me there is 1200+ characters of inromation in the post, I just can't figure out how to access it?
How do I pull out my xml data so that I can save it as an xml file on the server? Do i need to load it into a DOM object? can I just reference it directly?
Okay, this is the code i'm trying to use to extract the XML from the post and save it as an xml file:
Quote:
quote:dim xmldoc
set xmldoc = Server.CreateObject("Msxml2.DOMDocument")
xmldoc.async = false
xmldoc.resolveExternals = false
xmldoc.load(Request)
xmldoc.save(Server.MapPath("sample.xml"))
|
I don't know if it matters but my text xml is as follows:
Quote:
quote:<AuthorsList>
<Author au_id="0001" au_name="Kelly"/>
<Author au_id="0002" au_name="Derek"/>
<Author au_id="0003" au_name="Don"/>
<AuthorsList>
|
My result? well let's just say I have a very empty sample.xml file on the server that I want to be filled with the xml I'm sending!!!
Help...