Loading ...
Sorry, an error occurred while loading the content.

2531Re: [soaplite] HTTPS/SSL Authentication

Expand Messages
  • Sadanand Kalasabail
    Apr 16, 2003
    • 0 Attachment
      I am working on a simillar one client side only,
      noitced that the proxy authentication worked by
      passing the user/password in the https_proxy env
      variables

      Try
      $ENV{HTTPS_PROXY} =
      'https://proxyuser:proxypasswd@...:81';

      Regards

      Sade

      --- RRosenkranz@... wrote:
      > I'm trying to connect to a SOAP-daemon with a https
      > connection and want to make a ssl authentication but
      > i get an error message:
      >
      > 500 proxy connect failed: PROXY ERROR HEADER, could
      > be non-SSL URL:
      > HTTP/1.1 405 Method Not Allowed
      > Date: Wed, 16 Apr 2003 13:24:46 GMT
      > Server: libwww-perl-daemon/1.26
      > at ./client-daemon.pl line 30
      >
      > my client-daemon.pl looks like:
      >
      > #!/usr/bin/perl
      >
      > use SOAP::Lite;
      > use SOAP::Lite +trace => 'debug';
      > use LWP::Protocol::https;
      > use Crypt::SSLeay;
      > use IO::Socket::SSL;
      > use Data::Dumper;
      >
      >
      > $ENV{HTTPS_PROXY} = 'https://devil.xxx.xx:81';
      > $ENV{HTTPS_PROXY_USERNAME} = '';
      > $ENV{HTTPS_PROXY_PASSWORD} = '';
      > $ENV{HTTPS_VERSION} = '3';
      > $ENV{HTTPS_CERT_FILE} =
      > '/home/rro/public_html/soap/daemon/client-cert.pem';
      > $ENV{HTTPS_KEY_FILE} =
      > '/home/rro/public_html/soap/daemon/client-key.pem';
      >
      > my $user = shift;
      > my $pass = shift;
      > my $id = shift;
      > my $confirm = shift;
      > my $Debug = shift;
      > my $mysoap = SOAP::Lite
      > -> uri('urn:BillInterface')
      > -> proxy('https://devil.xxx.xx:81/daemon-ssl.pl');
      >
      > my $test_func = $mysoap->getBillCustomerDf($user,
      > $pass, $id, $confirm, $Debug);
      >
      > unless ($test_func->fault) {
      > $result = $test_func->result;
      > print Dumper($result);
      > print "\n---\n";
      > } else {
      > print "FEHLER:\n";
      > print join ', ',
      > $test_func->faultcode,
      > $test_func->faultstring,
      > $test_func->faultdetail,
      > $test_func->faultactor;
      > }
      >
      >
      > the daemon-ssl.pl looks like:
      >
      >
      > #!/usr/bin/perl
      > use DBI;
      > # Kommentar entfernen f�r SOAP-Debugging (./_DEBUG)
      > use SOAP::Lite on_debug => sub{debug(@_)};
      > use SOAP::Transport::TCP;
      > use SOAP::Transport::HTTP;
      > use POSIX;
      >
      > my $daemon = SOAP::Transport::TCP::Server
      > -> new(
      > LocalAddr => 'devil.xxx.xx',
      > LocalPort => 81,
      > Listen => 10,
      > # SSL aktivieren
      > SSL_server=> 1,
      > SSL_key_file =>
      > '/home/rro/public_html/soap/daemon/mykey.pem',
      > SSL_cert_file =>
      > '/home/rro/public_html/soap/daemon/mycert.pem',
      > SSL_passwd_cb => sub{return "1234";},
      > Reuse => 1
      > )
      > -> serializer(SOAP::Serializer->new(encoding =>
      > "ISO-8859-1"))
      > ->
      > dispatch_to('/var/stargate/scripts/sync_bill')
      > -> handle;
      >
      > sub debug($) {
      > $out = open(DEBUG,">> _DEBUG")
      > || die "Fehler beim �ffnen der
      > Debug-Datei: $!\n";
      >
      >
      >
      ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
      > = localtime(time);
      > $time = sprintf("%04d-%02d-%02d %02d:%02d:%02d",
      > $year+1900, $mon, $mday, $hour, $min, $sec);
      > print DEBUG "$time\t@_\n";
      > close(DEBUG);
      > }
      >
      >
      > the output is:
      >
      > SOAP::Transport::HTTP::Client::send_receive: POST
      > https://devil.xxx.xx:81/dae
      > mon-ssl.pl
      > Accept: text/xml
      > Accept: multipart/*
      > Content-Length: 674
      > Content-Type: text/xml; charset=utf-8
      > SOAPAction: "urn:BillInterface#getBillCustomerDf"
      >
      > <?xml version="1.0"
      > encoding="UTF-8"?><SOAP-ENV:Envelope
      > xmlns:SOAP-ENC="http://
      > schemas.xmlsoap.org/soap/encoding/"
      > SOAP-ENV:encodingStyle="http://schemas.xmlso
      > ap.org/soap/encoding/"
      >
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
      > "
      >
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > xmlns:xsd="http://www.w3
      >
      .org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:getBillCustomerDf
      > xmlns:namesp1="ur
      > n:BillInterface"><c-gensym3
      > xsi:type="xsd:string">user</c-gensym3><c-gensym5 xsi
      > :type="xsd:string">pass</c-gensym5><c-gensym7
      > xsi:type="xsd:int">10</c-gensym7><
      > c-gensym9 xsi:null="1"/><c-gensym11
      > xsi:null="1"/></namesp1:getBillCustomerDf></
      > SOAP-ENV:Body></SOAP-ENV:Envelope>
      > SOAP::Transport::HTTP::Client::send_receive: 500
      > (Internal Server Error) proxy c
      > onnect failed: PROXY ERROR HEADER, could be non-SSL
      > URL:
      > HTTP/1.1 405 Method Not Allowed
      > Date: Wed, 16 Apr 2003 13:49:35 GMT
      > Server: libwww-perl-daemon/1.26
      >
      >
      > Client-Date: Wed, 16 Apr 2003 13:49:35 GMT
      >
      >
      > 500 proxy connect failed: PROXY ERROR HEADER, could
      > be non-SSL URL:
      > HTTP/1.1 405 Method Not Allowed
      > Date: Wed, 16 Apr 2003 13:49:35 GMT
      > Server: libwww-perl-daemon/1.26
      >
      > at ./client-daemon.pl line 30
      >
      >
      > What's wrong with this? Why isn't it working? Please
      > help...
      >
      > --�
      > Roland�Rosenkranz
      >
      >
      >


      __________________________________________________
      Do you Yahoo!?
      The New Yahoo! Search - Faster. Easier. Bingo
      http://search.yahoo.com
    • Show all 2 messages in this topic