in reply to Re^3: Basic authentication in SOAP
in thread Basic authentication in SOAP

Thanks. I have done what you said. However, I would expect to see something like this in the header when I send my request:
POST http://newscentre.aap.com.au/SRW/SRW.asmx Authorization: Basic dmljcGFybDJcbWV0YWxpYjo1bmV3c2NlbnRyZTM=
. Since this is not in the header (or anywher else in the SOAP request), I think that I am missing something. Are you sure this is all that needs to be done?

Replies are listed 'Best First'.
Re^5: Basic authentication in SOAP
by jhourcle (Prior) on Jul 20, 2006 at 14:26 UTC

    You'd think so, but you'd be wrong -- HTTP basic authentication is normally a two pass process -- once for the client to find it needs authentication, and a second request when it actually sends the authentication. In HTTP, a server might have multiple realms associated with it, and the client has no way of knowing which realm it needs to authenticate under without the first failed connection.

    See F5 for a work around if you want it to only do one pass. (it also shows directly messing with $soap->transport(), which gives you access to the SOAP::Transport object.)

      Thanks. It looks very good.