View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
The code you posted tries to generate the HTTP request, which from your original description, you will not need to do. According to your description, you will need to retrieve the XML data, posted to your site by another application. Is this correct? If yes, then you can retrieve the posted text, by calling Request.Form() without any parameters.
 
It's also possible that the XML data will come as part of a "multipart/form-data" request, in which case you may be able to use the Request.FormFieldObject() method. It really all depends on the value of Request.ContentType and Request.MultipartFormData. I can't provide more details without knowing the exact nature of the incoming HTTP request.
 
For development purposes, I suggest that you write a script that captures incoming requests and stores their content to a file. You will need to capture the text returned when you call Request.ServerVariables() and Request.Form() without any parameters. This should give you more clues on how to proceed.
 
<%
M.FileName = FULLPATH("InputData.txt")
M.result = STRTOFILE(STRTRAN(Request.ServerVariables(), CR, CRLF) ;
        + CRLF + "+++++++++++++++++" + CRLF + Request.Form(), ;
        M.FileName)
IF M.result > 0
    Response.Write("Incoming data saved in " + M.FileName)
ELSE
    Response.Write("Failed to save incoming data to a file")
ENDIF
%>
 
If in doubt, post the contents of the file here.
FoxWeb Support Team
support@foxweb.com email
Sent by Ali Koumaiha on 10/22/2008 10:07:11 AM:
Thank you for your quick reponse.

I am still lost.

can you give me a sample script if you can.

*********** would that do the trick?

<%
   response.write(request.form())
%>
<html>
  <body>
     <form name='xml' method='POST' action='xml.fwx'>
     </form>
  </body>
</html>
Sent by FoxWeb Support on 10/21/2008 08:48:35 PM:
You can retrieve the complete POST data with the Request.Form() method with no arguments.
FoxWeb Support Team
support@foxweb.com email
Sent by Ali Koumaiha on 10/21/2008 02:11:32 PM:
Hi everyone,
Has anyone done this before?

I need to create an FWX script that another company (Machine to Machine) can do an HTTP Post to my link and "post" an XML file, which later i can read and disect.

I don't know where to begin.