Re: Using HTTP request to POST XML files?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





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/
.



Relevant Pages

  • Re: Access denied ( From one site to another, that is in another server)
    ... I created a web application on the second server where I placed my XML ... >> I think you used NET classes, because of the code you sent to me, so I ... You can find the MSXML parser under System32 folder of windows installation ... | I tryed to access the xml file using a browser and I was be able to do it ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: MS patch-scanner for Win-NT, 2K, IIS, SQL
    ... MS patch-scanner for Win-NT, 2K, IIS, SQL ... XML file from the following location - mssecure.xml Possible ... and on a NT 4 Server, but the scanner works fine on a W2K Server ...
    (Focus-Microsoft)
  • Re: File Upload/Download Problem
    ... constructor build the object using the input data. ... This means of course your upload routine will have to be smart enough to ... to the server and want to be able to keep it on their local PC) ... use XMLSerialization to serialize UserCase to an XML file and then have ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Application.StartupPath
    ... bellow steps to change your app's security policy settings. ... company's Network admin set up a login script to run the installer - I ... However when I just copy the exe file to the file server (along with the ... This xml file is located in the same folder as the executable. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: MS patch-scanner for Win-NT, 2K, IIS, SQL
    ... MS patch-scanner for Win-NT, 2K, IIS, SQL ... I would check the TCP/IP settings of the two machines that are having ... XML file from the following location - mssecure.xml Possible ... and on a NT 4 Server, but the scanner works fine on a W2K Server ...
    (Focus-Microsoft)