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

2038Re: Adding SOAP headers in a client

Expand Messages
  • Todd Ekenstam
    Nov 11, 2002
      --- In soaplite@y..., "Todd Ekenstam" <tekenstam@y...> wrote:
      > How do you add a SOAP header in the client? In the server I do
      > something like:
      > sub fake_login {
      > $authInfo = +{ 'username' => 'john_doe',
      > 'timestamp' => 1036799949,
      > 'signature' => '2c4db5d1650b8c98'};
      > return 1, SOAP::Header->name(authInfo => $authInfo);
      > }
      > That works. But I don't see examples of how to do this on the
      > side.

      Sorry, the Quick Start DOES work for the client side.

      # convert it into the Header
      $authInfo = SOAP::Header->name(authInfo => $authInfo);
      # invoke protected method
      $response = SOAP::Lite
      -> uri('http://www.soaplite.com/TicketAuth')
      -> proxy('http://myserver/cgi-bin/ticketauth.cgi')
      -> protected($authInfo, 'garbage');

      An argument of SOAP::Header->name provided as a parameter to the
      method is converted to a header much the same as a SOAP::Header->name
      is converted when provided as a return parameter.

      But now I can't seem to get the header back out on the server side.
      the Quick Start example says to do something like this:

      my $email = $checkAuthInfo->(pop->valueof('//authInfo'));

      However, I get a fault "Can't locate object method "valueof" via
      package "garbage" (perhaps you forgot to load "garbage"?"

      The pop is getting the last parameter, not the header.

      Any help would be appreciated.


    • Show all 3 messages in this topic