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

4548Accessing SOAP::Header

Expand Messages
  • jameshargreavesgmail
    Apr 8, 2005
    • 0 Attachment
      No doubt another stupid question from yours truly ;)

      I have a SOAP::Transport::HTTP::CGI server and a simple SOAP::Lite
      client. I can send a SOAP::Header fine:

      ===
      soapimport.pl
      ---
      $soap = new SOAP::Lite
      -> uri($uri)
      -> proxy($server);

      $session_id = $soap->soapimport( SOAP::Header->name(client_id =>
      $client_id),
      SOAP::Header->name(password =>
      $password) )->result;
      ===

      but I don't know how to extract the SOAP::Header on the server so I
      can verify the parameters:

      ===
      soapimport.cgi
      ---
      use SOAP::Transport::HTTP;

      use TPG_SOAPImport;

      SOAP::Transport::HTTP::CGI
      ->dispatch_to(qw(TPG_SOAPImport))
      ->handle;
      ===

      ===
      TPG_SOAPImport.pm
      ---
      package TPG_SOAPImport;

      sub soapimport
      { my $self = shift;

      # verify details
      $self->authenticate;

      # do some stuff
      ...
      }

      sub authenticate
      { my $self = shift;

      # how do i access the SOAP::Header element here ???
      return undef;
      }

      1;
      ===

      Any help would be appreciated!

      Thanks
      Jay
    • Show all 4 messages in this topic