Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Pass XML Request String via HTTP POST Question [Thread Next] Re: Pass XML Request String via HTTP POST QuestionTo: NULL Date: 5/3/2004 1:30:00 PM
Matt wrote:
> Here's the VB routine that I tried to send the XML request to an ASP page
> (aspxml.asp).
> The code has no error, but the aspxml.asp cannot see the string
>
> Sub sendXMLRequest()
> Dim HttpReq As New MSXML2.XMLHTTP
> Dim voidReqXML As String
> voidReqXML = "<Customers><Name>Joe</Name></Customer>"
> 'sending XML requests via HTTP
> HttpReq.Open "POST", "http://localhost/aspxml.asp", False
> HttpReq.send voidReqXML
> End Sub
>
> //aspxml.asp
> <%= Request.Form %>
>
You need
Dim XmlDocument
Set XmlDocument = Server.CreateObject("Msxml2.DOMDocument")
XmlDocument.async = False
Dim Loaded
Loaded = XmlDocument.load(Request)
to load the uploaded XML into an MSXML DOMDocument in your ASP page, of
course for that to work you need to send well-formed XML which you don't
do above so correct that first.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
