--- swapan_das <swapan_das@...> wrote:
> I have multiple endpoints.
> my $soap = SOAP::Lite->service
> my $soap1 = SOAP::Lite->service
> Is the above definiion correct? Should I use something like :
> proxy => ['http' => 'http://my.proxy.server/']);
Yes, that should work (don't confuse 'proxy' from SOAP::Lite and
'proxy' from LWP::UserAgent:
$soap->proxy('http://fake/') # SOAP::Lite's
->proxy(http => 'http://my.proxy.server/'); # LWP::UserAgent's
--OR short version--
proxy => ['http' => 'http://my.proxy.server/']);
You can always use transport() method to get an access to low-level
transport settings, but the feature is that transport object doesn't
exist yet (it will be created during the first call, because
transport depends on endpoint address in WSDL), so you need to create
it first using fake URL (only protocol part is important).
proxy() creates transport object, transport() returns this object and
you can call any methods you want. You can get/set options, timeout,
cookies or anything else. You need to use proxy() call ONLY if you
want to specify something before the first call. After that transport
object already exists and can be accessed.
> Lastly, how do I pass the cookie between these services.
do something like this (untested):
my $cookie = HTTP::Cookies->new(ignore_discard => 1);
$soap->proxy('http://fake/', cookie_jar => $cookie);
$soap1->proxy('http://fake/', cookie_jar => $cookie);
Then use $soap, $soap1 as usual.
If you just need to specify proxy parameters, you can also use
HTTP_proxy and HTTP_proxy_user/HTTP_proxy_pass that work from
WSDL-based interface also.
Best wishes, Paul.
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!