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

1549Re: [soaplite] Can't call method on an undefined value ???

Expand Messages
  • Paul Kulchenko
    May 23, 2002
    • 0 Attachment
      Hi, Jon!

      > my $som = $soap->LookitUp(
      ... skipped
      > )->result;

      you don't need to call ->result() here. When you call ->result()
      method it returns result of the method call, which is undef in this
      case. Just leave it out and you'll get a SOM object you may work
      with.

      Best wishes, Paul.

      --- jonthorwilliams <jonthorwilliams@...> wrote:
      > my SOAP::Lite 0.55 script throws this error, and i cannot figure
      > out
      > why. can anyone make a guess? it implies that my SOM object is
      > not
      > defined??? how can this be?
      >
      > "Can't call method "match" on an undefined value at
      > C:\Temp\findcommunity.pl line 27."
      >
      > BTW, The returned envelope is empty, and looks like this:
      > <?xml version="1.0" encoding="UTF-8" standalone="no"?><soap-
      > env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/enve
      > lope/" soap-
      > env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:namesp1="sURL"><soap-env:Header/><soap-env:Bo
      > dy><namesp1:ReturnAllResponse/></soap-env:Body></soap-env:Envelope>
      >
      > ----------------------------------------
      > #!perl -w
      >
      > use strict;
      > use SOAP::Lite +'trace';
      >
      > my $soap = SOAP::Lite
      > -> uri('http://www.awebservice.com')
      > -> proxy('http://localhost:8080/'); # proxy to MSSoapTrace
      >
      > my $som = $soap->LookitUp(
      > SOAP::Header->name('TargeSiteUrl')->type(string =>
      > '1.1.1.1'),
      > SOAP::Header->name('Token')->type(string => 'FakeToken'),
      > SOAP::Header->name('TargetSitePort')->type(string =>
      > '9088'),
      > SOAP::Data->name('Scope')->type(string => 'LocalOnly'),
      > SOAP::Data->name('World')->type(string => '6'),
      > SOAP::Data->name('Type')->type(string => 'Community'),
      > SOAP::Data->name('ConId')->type(string => '2'),
      > SOAP::Data->name('Action')->type(string => 'ReturnAll'),
      > SOAP::Data->name('Public')->type(string => 'true'),
      > SOAP::Data->name('Client')->type(string => 'JAXM Test App'),
      > SOAP::Data->name('Cat')->type(string => '1559'),
      > SOAP::Data->name('TSGZ')->type(string => 'false'),
      > )->result;
      >
      > print "\n-----\n";
      >
      > if ($som->match(SOAP::SOM::envelope)) {
      > $som->valueof('Header'); # should give access to header if
      > present
      > $som->valueof('Body'); # should give access to body
      > } else {
      > print "nothing here";
      > }
      >
      >
      > ------------------------ 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!?
      LAUNCH - Your Yahoo! Music Experience
      http://launch.yahoo.com
    • Show all 3 messages in this topic