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

3208Re: [soaplite] SOAP::Lite and Proxies

Expand Messages
  • Duncan Cameron
    Dec 4, 2003
    • 0 Attachment
      At 16:54:05 on 2003-12-04 Mick Watson <michael.watson@...> wrote:

      >OK I know I can't be the only person having trouble with SOAP::Lite and
      >proxies!
      >
      >My very simple script is trying to access the KEGG API. It looks like this:
      >
      >#!/usr/local/bin/perl
      >use SOAP::Lite;
      >$url = 'http://soap.genome.ad.jp/KEGG.wsdl';
      >
      >my $response = SOAP::Lite
      > -> service("$url")
      > -> proxy('http://wwwcache.bbsrc.ac.uk:8080')
      > -> get_pathways_by_enzymes(['ec:1.3.99.1']);
      >
      >foreach (@{$response}) {
      > print "$_->{'kid1'}\t$_->{'kid2'}\t$_->{'sw_score'}\n";
      >}
      >
      >This script basically times out. The message I get back is:
      >
      >Service description 'http://soap.genome.ad.jp/KEGG.wsdl' can't be
      >loaded: 500 Can't connect to soap.genome.ad.jp:80 (connect: timeout)
      >
      >Now here's the thing - if I use my browser, then
      >http://soap.genome.ad.jp/KEGG.wsdl can be accessed perfectly, and I
      >can connect to soap.genome.ad.jp:80. And my browser uses
      >http://wwwcache.bbsrc.ac.uk:8080 as the proxy. Sooooo, to conclude:
      >
      >My browser can connect to the resource using my proxy
      >SOAP::Lite cannot connect to the resource using my proxy
      >SOAP::Lite must be doing something different to what my browser does
      >that makes it not work.
      >
      >Anyone have a clue what that might be?
      SOAP::Lite uses the word 'proxy' to mean the remote server that you
      are connecting to, not a HTTP proxy as you may understand it. Not sure
      why the term was chosen.
      See the SOAP::Transport::HTTP section of the docs for how to use
      a HTTP proxy, I think that you can also use environment variables as
      it is all handled by the LWP::UserAgent module.

      Regards
      Duncan
    • Show all 6 messages in this topic