Here's the scenario: I need to connect to a web site to retrieve electronic lab results formatted in XML. In order to connect, I need to use a digital certificate.
I've been able to get a version of this working in Perl. It looks like this:
#!/usr/bin/env perl
use strict;
use WWW::Mechanize;
$|++;
my $username = 'xxx';
my $password = 'yyy';
$ENV{HTTPS_PKCS12_FILE} = 'CERTFILE.pfx';
$ENV{HTTPS_PKCS12_PASSWORD} = 'PathCert';
my $mech = WWW::Mechanize->new();
$mech->agent_alias('Windows IE 6');
$mech->get("https://www.example.org/xyz/,DanaInfo=999.33.1.10+");
$mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=Login&Mode=Silent&UserID=xxx&Password=yyy,DanaInfo=999.33.1.10");
$mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=HL7&Query=NewRequests,DanaInfo=999.33.1.10");
print $mech->content();
Now, this works when I run it from my workstation. However:
So, plenty of problems here. Anyone have any ideas?
I have no idea what is going on with your perl issues. However, mechanize for Python can be found here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.