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

Re: [soaplite] Sending login 2x (anonymous, and then credentials)

Expand Messages
  • Randy J. Ray
    ... This isn t actually an issue with the stubmaker, it s at the user-agent level. What happens is that it doesn t call get_basic_credentials until the initial
    Message 1 of 2 , Jan 6, 2005
    • 0 Attachment
      gartnerjmoody wrote:
      >
      > Another quick question (I hope) -- I used stubmaker.pl to generate a
      > module for the Web Service calls.
      > I added this:
      > sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      > return 'userid' => 'userpw';
      > }
      >
      > What seems to happen is that the Web service gets called with
      > user anonymous FIRST (which fails), then the credentials are sent
      > with the userid/userpw, which works, and the service runs.
      >
      > Is there a way with the stubmaker-made stub.pm to prevent the sent of
      > the anonymous user first, and just send the credentials right away?
      > Doing away with the anonymous send would speed things up.
      > Thanks!

      This isn't actually an issue with the stubmaker, it's at the user-agent level.
      What happens is that it doesn't call get_basic_credentials until the initial
      attempt to authenticate fails.

      When you create the client object, use the transport() method to get at the
      underlying useragent (SOAP::Transport::HTTP::Client is a subclass of
      LWP::UserAgent), and use that value to call the credentials() method. See the
      man page for LWP::UserAgent for the syntax of what to pass to credentials().

      Randy
      --
      rjray@... http://www.rjray.org http://www.svsm.org

      We will never have true civilization until we have learned to recognize the
      rights of others.-- Will Rogers
    Your message has been successfully submitted and would be delivered to recipients shortly.