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

Re: [soaplite] Re: SOAP Call - sending XML to hash

Expand Messages
  • Joe Landman
    ... I wrap all my SOAP::Lite calls in an eval, and look at @_ afterwords. I think there may be other ways to do the same thing.
    Message 1 of 7 , Dec 17, 2001
    • 0 Attachment
      On Mon, 2001-12-17 at 11:51, Mental wrote:

      > The next question is: Is there a way to call service and not have it blow
      > up if the url is unreachable?
      >
      > > my $soap = SOAP::Lite->service($wsdl);
      >
      > If in this case, $wsdl is unreachable or down, you'll get an error
      > regardless of what you want to do next. I'm talking to several search

      I wrap all my SOAP::Lite calls in an eval, and look at @_ afterwords. I
      think there may be other ways to do the same thing.
    • Paul Kulchenko
      Hi, Mental! ... my $soap = eval { SOAP::Lite- service($wsdl) } || return undef; You can also check $@ after eval{} but it seems like you don t care in this
      Message 2 of 7 , Dec 17, 2001
      • 0 Attachment
        Hi, Mental!

        > server to not blowup the other calls. Thus, in
        > sub get_soap_results I'd like to do something to the effect of
        >
        > my $soap = SOAP::Lite->service($wsdl) || return undef;

        my $soap = eval { SOAP::Lite->service($wsdl) } || return undef;

        You can also check $@ after eval{} but it seems like you don't care
        in this case, so you can just return.

        Best wishes, Paul.

        --- Mental <mental@...> wrote:
        > The next question is: Is there a way to call service and not have
        > it blow
        > up if the url is unreachable?
        >
        > > my $soap = SOAP::Lite->service($wsdl);
        >
        > If in this case, $wsdl is unreachable or down, you'll get an error
        > regardless of what you want to do next. I'm talking to several
        > search
        > engines, one of which is a soap server. I'd like my call to the
        > soap
        > server to not blowup the other calls. Thus, in
        > sub get_soap_results I'd like to do something to the effect of
        >
        > my $soap = SOAP::Lite->service($wsdl) || return undef;
        >
        > The service being down isnt important (to me) so much as the
        > composite
        > results from the remaining sources are.... Should I factor out soap
        > to its
        > own object and call it from there? I think the way its handling an
        > unreachable service will bubble up regardless.
        >
        > I suppose I could validate the url with LWP first, but that seems
        > expensive for my purposes.....
        >
        >
        > Thanks for any insight.
        >
        > --
        > Mental (Mental@...)
        >
        > Are there any questions?
        > --Steven Wright
        >
        > GPG public key: http://www.neverlight.com/Mental.asc
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Check out Yahoo! Shopping and Yahoo! Auctions for all of
        your unique holiday gifts! Buy at http://shopping.yahoo.com
        or bid at http://auctions.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.