diff --git a/lib/SLUB/LZA/Rosetta/TA/Command/init.pm b/lib/SLUB/LZA/Rosetta/TA/Command/init.pm index 3b0f98e311eb61de3ed106d770e688f6ce612290..ce1f73708a7d5365e7d4939d2056f228e8de5029 100644 --- a/lib/SLUB/LZA/Rosetta/TA/Command/init.pm +++ b/lib/SLUB/LZA/Rosetta/TA/Command/init.pm @@ -22,6 +22,7 @@ sub opt_spec { ["rosettahost|r=s" => "host adress where Rosetta runs", {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}] + ["httponly" => "with this flag only HTTP (instead HTTPS) is used", {required=>0}], ); } sub validate_args { @@ -35,6 +36,7 @@ sub execute { my %config; $config{host} = $opt->{rosettahost}; $config{logdir} = $opt->{logdir}; + $config{httponly} = $opt->{httponly}; if (defined $opt->{authentication}) { warn "HINT: The password will stored in config file!"; my $user = prompt('User:' ); diff --git a/lib/SLUB/LZA/Rosetta/TA/SOAP.pm b/lib/SLUB/LZA/Rosetta/TA/SOAP.pm index 6ba01b972bcc8d827094a250f2952921cd73a9bb..a7035e625658ab1b415b21140557f8ff0d00a84c 100644 --- a/lib/SLUB/LZA/Rosetta/TA/SOAP.pm +++ b/lib/SLUB/LZA/Rosetta/TA/SOAP.pm @@ -8,9 +8,13 @@ use warnings; sub get_ie_pid_by_sip { my $sip = shift; - my $protocol = "https"; my $host = $SLUB::LZA::Rosetta::TA::config{host}; + my $protocol = "https"; 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"; #print "DEBUG: $wsdl_url"; my $soap = SOAP::Lite->new; diff --git a/lib/SLUB/LZA/Rosetta/TA/SRU.pm b/lib/SLUB/LZA/Rosetta/TA/SRU.pm index 93bbe928048baf2df5d835a78b838447873b34cc..d9ecdcfb698ef99548a3c77ace114b2c01690c46 100644 --- a/lib/SLUB/LZA/Rosetta/TA/SRU.pm +++ b/lib/SLUB/LZA/Rosetta/TA/SRU.pm @@ -36,9 +36,13 @@ sub sru_search { if (!exists $searchpaths{$searchtype}){ croak ("Code error, wrong searchtype ($searchtype) used!"); } - my $protocol = 'https'; my $host = $SLUB::LZA::Rosetta::TA::config{host}; + my $protocol = 'https'; my $port = '8443'; + if (defined $SLUB::LZA::Rosetta::TA::Command::config{httponly}) { + $protocol = 'http'; + $port = '1801'; + } my $searchpath = $searchpaths{$searchtype}; my $srubase="${protocol}://${host}:${port}/search/${searchpath}/sru"; my $sru = "${srubase}?version=1.2&operation=searchRetrieve&startRecord=$startrecord&maximumRecords=$maxrecords&recordSchema=dc&query=${query}";