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

problems with DOC type services (continued)

Expand Messages
  • Chad Simmons
    Still can t figure out how to get from the documentation provided for the service into actual soap::lite objects and function calls. Any help would be
    Message 1 of 1 , Sep 16 2:41 PM
    • 0 Attachment
      Still can't figure out how to get from the documentation provided for the
      service into actual soap::lite objects and function calls. Any help would be
      appreciated. As an example, looking at:

      http://www.xmethods.com/ve2/ViewListing.po;jsessionid=oSMgK3iDTlFwLo7TrHTy0bYw(QhxieSRM)?serviceid=149694

      It's a DOC type service, and I've gotten this for the code so far:

      #!/usr/bin/perl

      use strict;
      use SOAP::Lite;

      my $s= SOAP::Lite
      ->uri('http://interpressfact.net/webservices/')
      ->proxy('http://www.interpressfact.net/webservices/getJoke.asmx')
      ->on_action( sub { return $_[0] . $_[1]; })
      # ->on_debug(
      # sub {
      # my $tmp = $_[0];
      # $tmp =~ s/</\n</g;
      # print "***\n", $tmp, "***\n";
      # }
      # )
      ;

      my $response = $s->getJoke();


      Which (when the on_debug is uncommented) seems to give me an approprate
      response. However, I'm totally unsure as to what I need to do in order to
      retrieve that 'joke and punchline' from the returned $response variable. I'm
      also unsure how to change the function call to specify one of the joke
      categories (Murphy's Laws, Q&A, Unnatural Laws, Cool Jokes, Blondes,
      Random(contains Adult), Lawyers, Headlines, Military, All categories). If
      anyone could look at the documentation provided and explain how one would use
      that to build the SOAP::Lite code that would be very helpful. Again, the
      specifics aren't really important, I'm just needing some sort of reference or
      guide for taking specs (like those provided for this service) and converting
      those into SOAP::Lite calls.

      Thanks,
      Chad Simmons

      =====
      -----BEGIN GEEK CODE BLOCK-----
      Version 3.1
      GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$
      P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O
      M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@
      b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
      ------END GEEK CODE BLOCK------

      __________________________________________________
      Do you Yahoo!?
      Yahoo! News - Today's headlines
      http://news.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.