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

Re: [soaplite] Re: Error: Can't call method "result"

Expand Messages
  • Paul Kulchenko
    Hi, swapan_das! ... Yes, that should work (don t confuse proxy from SOAP::Lite and proxy from LWP::UserAgent: $soap- proxy( http://fake/ )
    Message 1 of 6 , Jan 22, 2002
      Hi, swapan_das!

      --- swapan_das <swapan_das@...> wrote:
      > I have multiple endpoints.
      > my $soap = SOAP::Lite->service
      > ('http://localhost:8004/glue/urn:glueXXX1.wsdl');
      > my $soap1 = SOAP::Lite->service
      > ('http://localhost:8004/glue/urn:glueXXX2.wsdl');
      > Is the above definiion correct? Should I use something like :
      > $soap->proxy('http://endpoint.server/',
      > 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):

      use HTTP::Cookies;
      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!
    Your message has been successfully submitted and would be delivered to recipients shortly.