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

SOAP problems questions, regarding weblogs.com "ping"ing

Expand Messages
  • Bill Turner
    Hi there, I m posting this here, as I ve seen this covered before in this group ( http://groups.yahoo.com/group/soaplite/message/880 ). I ve taken the code in
    Message 1 of 2 , Oct 23, 2001
    • 0 Attachment
      Hi there,

      I'm posting this here, as I've seen this covered before in this group
      ( http://groups.yahoo.com/group/soaplite/message/880 ).

      I've taken the code in the msg above, and have been trying to figure
      out how to decode a response that I get from the rpc.weblogs.com
      server. Here's the SOAP spec URL for reference:
      http://www.soapware.org/weblogsCom

      Here's my perl code:

      use SOAP::Lite;

      my $siteName = "sitename";
      my $siteURI = "http://siteurl.com/";

      # Ping the rpc.weblogs.com server.
      print $soap = SOAP::Lite->new();
      $soap->proxy("http://rpc.weblogs.com/RPC/weblogUpdates");
      $soap->on_action(sub{'"/weblogUpdates"'});
      $soap->ping(
      SOAP::Data->name(weblogname=>$siteName),
      SOAP::Data->name(weblogurl=>$siteURI)
      );
      $soap->result;

      The "ping" is successful, but I can't figure out how to read a SOAP
      response. The result of this script is SOAP::Lite=HASH(0x1f43700)

      I've tried many options on $soap->message, $soap->{'flerror'}, etc,
      but I cannot figure out how to retrieve the value of <message
      xsi:type="xsd:string">Thanks for the ping.</message>" or the flerror
      element.

      Any help or pointers is greatly appreciated. I'm doing my best to
      learn SOAP, and I'm thinking I picked a bad first example. :)

      Bill
    • Paul Kulchenko
      Hi, Bill! Here is the example that is included with 0.52: use SOAP::Lite; my $weblogs = SOAP::Lite - proxy( http://rpc.weblogs.com/weblogUpdates ) -
      Message 2 of 2 , Oct 23, 2001
      • 0 Attachment
        Hi, Bill!

        Here is the example that is included with 0.52:

        use SOAP::Lite;

        my $weblogs = SOAP::Lite
        -> proxy("http://rpc.weblogs.com/weblogUpdates")
        -> on_action(sub{'"/weblogUpdates"'});

        print $weblogs->ping(
        SOAP::Data->name(weblogname=>'Scripting News'),
        SOAP::Data->name(weblogurl=>'http://www.scripting.com/'),
        )->result->{message};

        As you may see the result of ->result() method is hash, so in your
        case it'll look like:

        my $response = $soap->ping(
        SOAP::Data->name(weblogname=>$siteName),
        SOAP::Data->name(weblogurl=>$siteURI)
        );
        prnit $response->result->{message};

        Best wishes, Paul.

        --- Bill Turner <b@...> wrote:
        > Hi there,
        >
        > I'm posting this here, as I've seen this covered before in this
        > group
        > ( http://groups.yahoo.com/group/soaplite/message/880 ).
        >
        > I've taken the code in the msg above, and have been trying to
        > figure
        > out how to decode a response that I get from the rpc.weblogs.com
        > server. Here's the SOAP spec URL for reference:
        > http://www.soapware.org/weblogsCom
        >
        > Here's my perl code:
        >
        > use SOAP::Lite;
        >
        > my $siteName = "sitename";
        > my $siteURI = "http://siteurl.com/";
        >
        > # Ping the rpc.weblogs.com server.
        > print $soap = SOAP::Lite->new();
        > $soap->proxy("http://rpc.weblogs.com/RPC/weblogUpdates");
        > $soap->on_action(sub{'"/weblogUpdates"'});
        > $soap->ping(
        > SOAP::Data->name(weblogname=>$siteName),
        > SOAP::Data->name(weblogurl=>$siteURI)
        > );
        > $soap->result;
        >
        > The "ping" is successful, but I can't figure out how to read a SOAP
        >
        > response. The result of this script is SOAP::Lite=HASH(0x1f43700)
        >
        > I've tried many options on $soap->message, $soap->{'flerror'}, etc,
        >
        > but I cannot figure out how to retrieve the value of <message
        > xsi:type="xsd:string">Thanks for the ping.</message>" or the
        > flerror
        > element.
        >
        > Any help or pointers is greatly appreciated. I'm doing my best to
        > learn SOAP, and I'm thinking I picked a bad first example. :)
        >
        > Bill
        >
        >
        >
        > ------------------------ 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!?
        Make a great connection at Yahoo! Personals.
        http://personals.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.