Re: Using HTTP request to POST XML files?
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Thu, 07 Jul 2005 15:55:02 +0200
Paul M wrote:
Basically I've got to post some XML documents to an external
server using HTTP web request (POST, not GET) and be able to receive
files back. I've got the XML file generated and checked over, but I
just dont know how to go about the post process. I've got a feeling I'm
supposed to create a form in my ASP application with an action which
points at the URL I've got for the external server, but I don't know
how to "attach" the XML files I'm sending.
Are you using classic ASP or ASP.NET?
With classic ASP you use MSXML e.g.
Set XmlDocument = Server.CreateObject("Msxml2.DOMDocument.4.0")
XmlDocument.async = False
XmlDocument.load Server.MapPath("file.xml")
Set HttpRequest = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
HttpRequest.open "POST", "http://example.com/dir/whatever.jsp", False
HttpRequest.send XmlDocument
With .NET you have more generic objects so some more coding is necessary, look into WebRequest/HttpWebRequest.
--
Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ .
- Follow-Ups:
- Re: Using HTTP request to POST XML files?
- From: Paul M
- Re: Using HTTP request to POST XML files?
- References:
- Using HTTP request to POST XML files?
- From: Paul M
- Using HTTP request to POST XML files?
- Prev by Date: XmlTextReader problem with & in element text
- Next by Date: Re: Using HTTP request to POST XML files?
- Previous by thread: Using HTTP request to POST XML files?
- Next by thread: Re: Using HTTP request to POST XML files?
- Index(es):
Relevant Pages
|