ok. I have attempted to put in this piece of code. Here is what I tried:
my $lite = SOAP::Lite->new()->on_action(sub { join '/', @_ } ) ->proxy($args->{proxy}); my $response = $lite->call( SOAP::Data->name('fetchAndLock') ->attr({ 'xmlns', $args->{xmlns}}), SOAP::Data->name("first")->value($args->{first}), SOAP::Data->name("max")->value($args->{max}), SOAP::Data->name("action")->value($args->action}), SOAP::Data->name("state")->value($args->{state}), ); return $response; } sub SOAP::Transport::HTTP::Client::get_basic_credentials { $zID => $zPW; }

Where $zID and $zPW were defined higher up in the code. When I run the script, I receive the following error:

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401
Unauthorized
Connection: close
Date: Wed, 29 Aug 2012 14:16:22 GMT
Server: IBM_HTTP_Server
Content-Language: en-US
Content-Type: text/xml; charset=UTF-8
Client-Date: Wed, 29 Aug 2012 14:16:22 GMT
Client-Peer: 169.81.175.20:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Client-Warning: Missing Authenticate header


I tried putting the "get_basic_credentials" line just after the "my $line = SOAP..." line, but the error is the same.

where am I going wrong? Any help/advice/suggestions/etc... are much appreciated.

Thanks
Frank


In reply to Re^2: soap::lite and authorization by fritz1968
in thread soap::lite and authorization by fritz1968

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.