Perl to trigger ASP that posts XML feed to another page


D

Dave

I have an .asp page that posts an XML feed to another company's URL.
The feed needs to be run on a schedule, so I am attempting to use a
Perl script on a UNIX box to trigger the page which creates and posts
the XML feed to the URL. When the Perl script is run it echoes back
the HTML including the XML from the .asp page; however, the XML is not
posted to the other company's URL. Snippets of the code are provided
here:

..
..
..
use LWP::UserAgent;
$ua = new LWP::UserAgent;
..
..
..
my $req = new HTTP::Request
'POST','https://certsite.com/Tools/DHL_Emplid_Feed.asp?Company=XYZ';
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
my $res = $ua->request($req);
print $res->as_string;
..
..
..

This is my first attempt to do anything like this, so any advice you
can give is appreciated.

Regards,

Dave
 
Ad

Advertisements

B

Brian Wakem

Dave said:
I have an .asp page that posts an XML feed to another company's URL.
The feed needs to be run on a schedule, so I am attempting to use a
Perl script on a UNIX box to trigger the page which creates and posts
the XML feed to the URL. When the Perl script is run it echoes back
the HTML including the XML from the .asp page; however, the XML is not
posted to the other company's URL.



Which is supposed to be done by the ASP page, so nothing to do with perl.


Snippets of the code are provided
here:

.
.
.
use LWP::UserAgent;
$ua = new LWP::UserAgent;
.
.
.
my $req = new HTTP::Request
'POST','https://certsite.com/Tools/DHL_Emplid_Feed.asp?Company=XYZ';


You are posting to an HTTPS url therefore you will need to:

use Crypt::SSLeay;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top