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

1829Re: Getting HTTP Headers

Expand Messages
  • jpeyser
    Sep 13, 2002
      Actually, sub-classing the transport level is possible and it will
      give us a hook to the LWP::UserAgent (I should have tried this
      yesterday).

      sub BEGIN {
      use SOAP::Lite;
      use SOAP::Transport::HTTP;

      package My::Transport;

      @ISA = qw(SOAP::Transport);

      package My::Transport::HTTP::Client;

      @ISA = qw(SOAP::Transport::HTTP::Client);

      sub send_receive {

      ### Copy code from Transport/HTTP.pm, replacing $resp
      ### with $My::Transport::HTTP::Client::resp.

      }

      } #end BEGIN


      my $soapObject = SOAP::Lite
      -> service($SERVICE)
      -> transport(My::Transport->new);

      ### Now we have access to the HTTP headers
      print $My::Transport::HTTP::Client::resp->content_type, "\n";

      Jonathan

      --- In soaplite@y..., rjray@b... wrote:
      > The SOAP::Lite client object abstracts most of the communication
      layer away
      > for you, so to get the info you want you would have to subclass one
      of the
      > relevant classes that the client objects use.
      >
      > Actually, I'm not sure it can be done at this point, with
      SOAP::Lite 0.55.
      > There is no hook for when the client object gets the response back
      from the
      > LWP::UserAgent side of the object. And sub-classing at the
      transport level
      > isn't really an option, since SOAP::Lite chooses that behind the
      scenes based
      > on the URI you give for an endpoint.
      >
      > Paul?
      >
      > Randy
      > --
      > """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
      """""""""""
      > Randy J. Ray
      rjray@b...
      > Campbell, CA
      rjray@s...
      > <A HREF="http://www.svsm.org">Silicon Valley Scale Modelers</A>
    • Show all 6 messages in this topic