internet proxy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

internet proxy

Dr. med. Christoph Gille
Please apologize my stupid question:
How do I tell BioPerl that I have a http proxy ?

I try  Bio/Tools/Analysis/Protein/Sopma.pm
which computes second struct predictions using a HTTP server.
Since I do not have direct Internet I've  set the variables http_proxy and
HTTP_PROXY to the proxy server.

Linux$ echo  $http_proxy $HTTP_PROXY
http://realproxy.charite.de:888 http://realproxy.charite.de:888

But Sopma is not able to connect to the Internet.
At home with direct Internet it worked fine.
All other Internet programs can cope with the proxy without problem.
For example wget http://www.google.de fetches the data.

Sopma will be my first test case of how to bring Java and BioPerl together.

Many thanks Christoph


_______________________________________________
Bioperl-l mailing list
[hidden email]
http://portal.open-bio.org/mailman/listinfo/bioperl-l
Reply | Threaded
Open this post in threaded view
|

Re: internet proxy

Torsten Seemann
Dr. Christoph Gille wrote:

> Please apologize my stupid question:
> How do I tell BioPerl that I have a http proxy ?
> I try  Bio/Tools/Analysis/Protein/Sopma.pm
> which computes second struct predictions using a HTTP server.
> Since I do not have direct Internet I've  set the variables http_proxy and
> HTTP_PROXY to the proxy server.
> But Sopma is not able to connect to the Internet.
> At home with direct Internet it worked fine.
> All other Internet programs can cope with the proxy without problem.
> For example wget http://www.google.de fetches the data.

Sopma.pm ISA Bio::WebAgent ISA LWP::UserAgent.
LWP::UserAgent does the actual HTTP work.
Try:

  my $sopma = Bio::Tools::Analysis::Protein::Sopma->new( ... );
  $sopma->env_proxy;  # tell LWP::UserAgent to use proxy env. vars.
  $sopma->run;

--
Torsten Seemann
Victorian Bioinformatics Consortium, Monash University, Australia
http://www.vicbioinformatics.com/
_______________________________________________
Bioperl-l mailing list
[hidden email]
http://portal.open-bio.org/mailman/listinfo/bioperl-l
Reply | Threaded
Open this post in threaded view
|

Re: internet proxy

Dr. med. Christoph Gille
Hi Torsten,
Sorry, does not work yet. I am not working with PERL long enough to sort
this out.

In Sopma.pm is
    my $request = POST 'http://npsa-pbil.ibcp.fr/cgi-bin/secpred_sopma.pl',
        Content_Type => 'form-data',
            Content  => [title     => "",
                         notice    => $self->seq->seq,
                         ali_width => 70,
                         states    => $self->states,
                         threshold => $self->similarity_threshold ,
                         width     => $self->window_width,
                        ];

Is POST a static method or is it an instance method ?

If I call $sopma->env_proxy; does the POST method know this ?
Does this method get a "self" reference of Sopma.pm ?

I would have expected that I need to set a static field in the
module that provides the POST method.

Thanks for your help

Christoph

_______________________________________________
Bioperl-l mailing list
[hidden email]
http://portal.open-bio.org/mailman/listinfo/bioperl-l