in reply to xml response

What you want, then, is a CGI script that handles a file upload -- or so I understand it. That's what should be sitting at (what you call) the postback_url. The script on the vendor's site should submit the XML file as an upload (i.e. if they're using Perl, they'll use LWP to submit the XML to you; you'll handle it with (if you're sane =) CGI.pm).

The fact that the file you're receiving is in XML format isn't *terribly* important for purposes of recieving it; what your script needs to do is handle the upload, and save the file to a designated location. Then process it (this can be handled by the CGI script itself, a script *called by* the CGI script, or maybe a cron job).

As far as handling uploads via CGI are concerned, you can read the documentation for CGI.pm with perldoc CGI and/or entering a search for "handling uploads" and the like on this site.

Hope that's helped you narrow down what you need to know!

Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Replies are listed 'Best First'.
Re: Re: xml response
by $code or die (Deacon) on Jan 25, 2001 at 01:20 UTC
    I don't think this is a file upload. The vendor is going to "transmit the XML in some way" to port 443 on averylongloginname's server. Without knowing exaxtly how the vendor does this, makes it difficult to know what the answer is. i.e.:

    1. Is the vendor doing a POST or GET to the URL provided?
    2. Is the vendor opening a connection to port 443 and sending a stream of data (XML)

    if (1), then what is the field name which will hold the XML. What other fieldnames are there that might be necessary?
    if (2), will there be any headers\footers that need to be stripped off?

    I suggest:
    if (1) - then use the CGI module to capture the XML from the query_string or posted data and shove it in a variable to be parsed by your preferred method.
    if (2) - then I'd suggest something like IO::Socket or HTTP::Daemon to "act" as a web server. I.e. listen on port 443 and wait for connections. See Listening on an HTTP port for some samples. But obviously this is made more difficult because you need to be able to deal with the SSL encoded data on your side.

    averylongloginname, can you give some more specific details about how the XML is being sent? You can post it here, if you start another node then it will get confusing for everyone! =)

    $code or die
    Using perl at
    The Spiders Web