A. Sinan Unur wrote:
> Ian Wilson <> wrote in
> news:d9tq3u$k3n$:
>
>
>> With LWP::UserAgent, you can also do things like
>> $ua->proxy('http'=>'http://proxy.server:8080');
>> $request->proxy_authorization_basic('fred', 'secret'); Is there any
>> way to do something equivalent using SOAP::Lite?
>
>
> Are you asking us to look up documentation for you?
Certainly not! My apologies for not stating that I had already read that
document.
> http://search.cpan.org/~byrne/SOAP-L...b/SOAP/Lite.pm
>
> <blockquote> In addition to endpoint parameter, proxy() can accept
> any transport specific parameters that could be passed as name =>
> value pairs. For example, to specify proxy settings for HTTP protocol
> you may do:
>
> $soap->proxy('http://endpoint.server/', proxy => ['http' =>
> 'http://my.proxy.server/']); </blockquote>
I hadn't found anywhere in that document where it explains how to set
the credentials required by the proxy for authorization - i.e. a user-ID
and password (for the HTTP proxy, not the endpoint).
There are however some clues in the soaplite cookbook, I have tried all
of these. I will follow-up with some sanitized code later.
I have tried, for example:
$soap->proxy('http://user

/',
proxy => ['http' => 'http://my.proxy.server/']);
and
$soap->proxy('http://endpoint.server/',
proxy => ['http' => 'http://user

/']);
The former is suggested in the cookbook. It seems like it should
authenticate to the endpoint not to the HTTP proxy so I tried the latter
variant as well.
> Now, I have never tried this, and I don't know if it works, but I
> would have expected you to at least attempt it yourself,
You are right to expect this and I have indeed tried a half dozen
variants of this, I should have said so (I worry that long posts tend to
make people's eyes glaze over)
I also checked what is happening with "use SOAP::Lite +trace;"
concurrently with a "tail -f /var/log/squid/access.log" at the HTTP
proxy server. I have used wget and a perl script using LWP::Useragent to
check the proxy and endpoint logging, use of environment variables,
explicit setting of credentials, etc. This would be a lot to post so
instead I'll construct a minimal example that readers could run.
> and provide a minimal but complete script that still exhibits the
> problem.
Will do, once I have found (or created) a public SOAP endpoint that I
can use for this purpose.