W
Waterstraat, Joern
Try to convert following perl script to ruby but
get errors as listest in section "RESULT RUBY".
SOAP connection to external Server without SSL
is working. All scripts are running on same machine.
ruby 1.8.2 (2004-12-25) [x86_64-linux], http-access-2_0_5
Any Help?
Joern.
Working:
#!/usr/bin/perl
#################################### PERL ################
use LWP:rotocol::https;
use SOAP::Lite
uri =3D> "https://uri",
proxy =3D> "https://myurl";
$ENV{HTTPS_CERT_FILE}=3D$ENV{HOME}.'/.certstore/client_'.$ENV{USER}.'.crt'
;
$ENV{HTTPS_KEY_FILE}=3D$ENV{HOME}.'/.keystore/client_'.$ENV{USER}.'.key';
eval {
my $head =3D undef;
my $soap =3D SOAP::Lite
-> new
-> on_fault(sub{print "Could not init SOAP\n" && exit
1});
my $ret;
my $som =3D $soap
-> call('CheckAuthentication'=3D>$head=3D>$data);
$ret=3D$som -> result;
if(ref $som && $som -> result && $som -> result =3D=3D 1) {
print "Success, authentication ok\n";=0D
} else {
print "Error, no authentication\n";=0D
}
}
Not Working:
#!/usr/local/bin/ruby
###################################### RUBY ##############
require 'http-access2'
require 'soap/rpc/driver'
url =3D "https://myurl"
client =3D SOAP::RPC:river.new(url, 'https://uri')
client.add_method("CheckAuthentication","from")
client.loadproperty('sslclient.properties')
p client.CheckAuthentication(__FILE__)
=3Dbegin content sslclient.properties
# verify server's certificate
protocol.http.ssl_config.verify_mode =3D NIL=0D
# certificates for verification
# key and certificate for client identity
protocol.http.ssl_config.client_cert =3D .certstore/client_user.crt
protocol.http.ssl_config.client_key =3D .keystore/client_user.key
=3Dend
Error Messages:
###################################### RESULT RUBY ########
rubysprdb.rb
at depth 1 - 19: self signed certificate in certificate chain
/shared/ruby/1.8.2/lib/ruby/1.8/soap/streamHandler.rb:270:in
`send_post': 301: Moved Permanently (SOAP::HTTPStreamError)
from
/shared/ruby/1.8.2/lib/ruby/1.8/soap/streamHandler.rb:103:in `send'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/proxy.rb:114:in
`invoke'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/proxy.rb:131:in
`call'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:275:in
`call'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:302:in
`CheckAuthentication'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:297:in
`CheckAuthentication'
from rubysprdb.rb:9
------------------------------------------------------------
--
-- Joern Waterstraat (e-mail address removed)
--
DISCLAIMER: This email (including any attachments) may contain confidential=
and/or privileged information. This email is for the intended addressee=
only. If you have received it in error, please notify the sender=
immediately and delete this email and any copies. Any use of this email is=
prohibited without the senders prior consent.
This email may not reflect the views of EADS SPACE Transportation=
(EADS-ST). Nothing in this email shall bind EADS-ST unless endorsed by a=
duly authorised representative and subject to a formal notification=
independent of this email either by fax or by post mail.
EADS-ST and the other companies of the EADS group refuse any and all=
liabilities if this email transmission was virus corrupted, altered or=
falsified.
HINWEIS: Diese E-Mail (einschliesslich ihrer eventuellen Anlagen) kann=
vertrauliche und/oder geschuetzte Informationen beinhalten. Diese E-Mail=
ist nur fuer den beabsichtigten Adressaten bestimmt. Falls Sie diese=
E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den=
Absender und loeschen diese E-Mail und jegliche Kopie. Jegliche Nutzung=
oder Verwendung dieser E-Mail ist ohne vorheriges Einverstaendnis des=
Absenders untersagt.
Diese E-Mail entspricht nicht unbedingt der Meinung oder den Positionen von=
EADS SPACE Transportation (EADS-ST). Der Inhalt dieser E-Mail verpflichtet=
EADS-ST nur, wenn er durch eine hierzu autorisierte Person bestaetigt ist=
und ferner vorbehaltlich einer separaten formellen Notifizierung durch Fax=
oder per Post.
EADS-ST und die anderen Firmen der EADS Gruppe uebernehmen keinerlei=
Haftung, falls diese E-Mail mit Viren behaftet ist oder im Wege ihrer=
Uebertragung geaendert oder verfaelscht wurde.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
EADS SPACE Transportation GmbH (Amtsgericht Bremen, HRB-Nr. 21713) -=
Huenefeldstrasse 1-5 - 28199 Bremen - Deutschland/Germany
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://www.eads.net =3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
get errors as listest in section "RESULT RUBY".
SOAP connection to external Server without SSL
is working. All scripts are running on same machine.
ruby 1.8.2 (2004-12-25) [x86_64-linux], http-access-2_0_5
Any Help?
Joern.
Working:
#!/usr/bin/perl
#################################### PERL ################
use LWP:rotocol::https;
use SOAP::Lite
uri =3D> "https://uri",
proxy =3D> "https://myurl";
$ENV{HTTPS_CERT_FILE}=3D$ENV{HOME}.'/.certstore/client_'.$ENV{USER}.'.crt'
;
$ENV{HTTPS_KEY_FILE}=3D$ENV{HOME}.'/.keystore/client_'.$ENV{USER}.'.key';
eval {
my $head =3D undef;
my $soap =3D SOAP::Lite
-> new
-> on_fault(sub{print "Could not init SOAP\n" && exit
1});
my $ret;
my $som =3D $soap
-> call('CheckAuthentication'=3D>$head=3D>$data);
$ret=3D$som -> result;
if(ref $som && $som -> result && $som -> result =3D=3D 1) {
print "Success, authentication ok\n";=0D
} else {
print "Error, no authentication\n";=0D
}
}
Not Working:
#!/usr/local/bin/ruby
###################################### RUBY ##############
require 'http-access2'
require 'soap/rpc/driver'
url =3D "https://myurl"
client =3D SOAP::RPC:river.new(url, 'https://uri')
client.add_method("CheckAuthentication","from")
client.loadproperty('sslclient.properties')
p client.CheckAuthentication(__FILE__)
=3Dbegin content sslclient.properties
# verify server's certificate
protocol.http.ssl_config.verify_mode =3D NIL=0D
# certificates for verification
# key and certificate for client identity
protocol.http.ssl_config.client_cert =3D .certstore/client_user.crt
protocol.http.ssl_config.client_key =3D .keystore/client_user.key
=3Dend
Error Messages:
###################################### RESULT RUBY ########
rubysprdb.rb
at depth 1 - 19: self signed certificate in certificate chain
/shared/ruby/1.8.2/lib/ruby/1.8/soap/streamHandler.rb:270:in
`send_post': 301: Moved Permanently (SOAP::HTTPStreamError)
from
/shared/ruby/1.8.2/lib/ruby/1.8/soap/streamHandler.rb:103:in `send'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/proxy.rb:114:in
`invoke'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/proxy.rb:131:in
`call'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:275:in
`call'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:302:in
`CheckAuthentication'
from /shared/ruby/1.8.2/lib/ruby/1.8/soap/rpc/driver.rb:297:in
`CheckAuthentication'
from rubysprdb.rb:9
------------------------------------------------------------
--
-- Joern Waterstraat (e-mail address removed)
--
DISCLAIMER: This email (including any attachments) may contain confidential=
and/or privileged information. This email is for the intended addressee=
only. If you have received it in error, please notify the sender=
immediately and delete this email and any copies. Any use of this email is=
prohibited without the senders prior consent.
This email may not reflect the views of EADS SPACE Transportation=
(EADS-ST). Nothing in this email shall bind EADS-ST unless endorsed by a=
duly authorised representative and subject to a formal notification=
independent of this email either by fax or by post mail.
EADS-ST and the other companies of the EADS group refuse any and all=
liabilities if this email transmission was virus corrupted, altered or=
falsified.
HINWEIS: Diese E-Mail (einschliesslich ihrer eventuellen Anlagen) kann=
vertrauliche und/oder geschuetzte Informationen beinhalten. Diese E-Mail=
ist nur fuer den beabsichtigten Adressaten bestimmt. Falls Sie diese=
E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den=
Absender und loeschen diese E-Mail und jegliche Kopie. Jegliche Nutzung=
oder Verwendung dieser E-Mail ist ohne vorheriges Einverstaendnis des=
Absenders untersagt.
Diese E-Mail entspricht nicht unbedingt der Meinung oder den Positionen von=
EADS SPACE Transportation (EADS-ST). Der Inhalt dieser E-Mail verpflichtet=
EADS-ST nur, wenn er durch eine hierzu autorisierte Person bestaetigt ist=
und ferner vorbehaltlich einer separaten formellen Notifizierung durch Fax=
oder per Post.
EADS-ST und die anderen Firmen der EADS Gruppe uebernehmen keinerlei=
Haftung, falls diese E-Mail mit Viren behaftet ist oder im Wege ihrer=
Uebertragung geaendert oder verfaelscht wurde.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
EADS SPACE Transportation GmbH (Amtsgericht Bremen, HRB-Nr. 21713) -=
Huenefeldstrasse 1-5 - 28199 Bremen - Deutschland/Germany
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://www.eads.net =3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D