Skip to content
Snippets Groups Projects
Commit 1ec54ce3 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added support for http only

parent 649c8837
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ sub opt_spec { ...@@ -22,6 +22,7 @@ sub opt_spec {
["rosettahost|r=s" => "host adress where Rosetta runs", {required=>1}], ["rosettahost|r=s" => "host adress where Rosetta runs", {required=>1}],
["logdir|l=s" => "logdir where rosetta stores it server log files", {required=>1}], ["logdir|l=s" => "logdir where rosetta stores it server log files", {required=>1}],
["authentication|a" => "enable authentification (needed if Rosetta's general parameter 'sru_authentication=true'), password is stored salted only in config file!", {required=>0}] ["authentication|a" => "enable authentification (needed if Rosetta's general parameter 'sru_authentication=true'), password is stored salted only in config file!", {required=>0}]
["httponly" => "with this flag only HTTP (instead HTTPS) is used", {required=>0}],
); );
} }
sub validate_args { sub validate_args {
...@@ -35,6 +36,7 @@ sub execute { ...@@ -35,6 +36,7 @@ sub execute {
my %config; my %config;
$config{host} = $opt->{rosettahost}; $config{host} = $opt->{rosettahost};
$config{logdir} = $opt->{logdir}; $config{logdir} = $opt->{logdir};
$config{httponly} = $opt->{httponly};
if (defined $opt->{authentication}) { if (defined $opt->{authentication}) {
warn "HINT: The password will stored in config file!"; warn "HINT: The password will stored in config file!";
my $user = prompt('User:' ); my $user = prompt('User:' );
......
...@@ -8,9 +8,13 @@ use warnings; ...@@ -8,9 +8,13 @@ use warnings;
sub get_ie_pid_by_sip { sub get_ie_pid_by_sip {
my $sip = shift; my $sip = shift;
my $protocol = "https";
my $host = $SLUB::LZA::Rosetta::TA::config{host}; my $host = $SLUB::LZA::Rosetta::TA::config{host};
my $protocol = "https";
my $port = 8443; my $port = 8443;
if (defined $SLUB::LZA::Rosetta::TA::Command::config{httponly}) {
$protocol = 'http';
$port = 1801;
}
my $wsdl_url="${protocol}://${host}:${port}/dpsws/repository/SipWebServices?wsdl"; my $wsdl_url="${protocol}://${host}:${port}/dpsws/repository/SipWebServices?wsdl";
#print "DEBUG: $wsdl_url"; #print "DEBUG: $wsdl_url";
my $soap = SOAP::Lite->new; my $soap = SOAP::Lite->new;
......
...@@ -36,9 +36,13 @@ sub sru_search { ...@@ -36,9 +36,13 @@ sub sru_search {
if (!exists $searchpaths{$searchtype}){ if (!exists $searchpaths{$searchtype}){
croak ("Code error, wrong searchtype ($searchtype) used!"); croak ("Code error, wrong searchtype ($searchtype) used!");
} }
my $protocol = 'https';
my $host = $SLUB::LZA::Rosetta::TA::config{host}; my $host = $SLUB::LZA::Rosetta::TA::config{host};
my $protocol = 'https';
my $port = '8443'; my $port = '8443';
if (defined $SLUB::LZA::Rosetta::TA::Command::config{httponly}) {
$protocol = 'http';
$port = '1801';
}
my $searchpath = $searchpaths{$searchtype}; my $searchpath = $searchpaths{$searchtype};
my $srubase="${protocol}://${host}:${port}/search/${searchpath}/sru"; my $srubase="${protocol}://${host}:${port}/search/${searchpath}/sru";
my $sru = "${srubase}?version=1.2&operation=searchRetrieve&startRecord=$startrecord&maximumRecords=$maxrecords&recordSchema=dc&query=${query}"; my $sru = "${srubase}?version=1.2&operation=searchRetrieve&startRecord=$startrecord&maximumRecords=$maxrecords&recordSchema=dc&query=${query}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment