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

Re: [soaplite] SOAP::Lite server error..?

Expand Messages
  • Duncan Cameron
    ... This is not the name of the method in your server class. Should it be GoodByeWorld? Duncan Send instant messages to your online friends
    Message 1 of 2 , Mar 10, 2005
    • 0 Attachment
      At 2005-03-10, 13:04:52 show2sh <show2sh@...> wrote:

      >Hi All,
      >
      >I've installed SOAP::Lite and tried to test the sample. The client
      >throws
      >exception the following exception when exception:
      >
      >not well-formed (invalid token) at line 1, column 1, byte 1 at
      >/usr/local/lib/perl5/site_perl/5.8.6/i686-linux/XML/Parser.pm line 187
      >#!/usr/bin/env perl5.8.6
      >
      >use SOAP::Transport::HTTP;
      >use World;
      >
      >SOAP::Transport::HTTP::CGI
      > -> dispatch_to('World')
      > -> handle;
      > at soapClient.pl line 9
      >
      >------
      >
      >The following is the code I've tested with:
      >
      >World.pm
      >--------
      >package World;
      >
      >sub new {
      > bless {}, shift;
      >};
      >
      >sub HelloWorld {
      > my ($self) = @_;
      >
      > return "Answer from sub HelloW\n";
      >};
      >
      >sub GoodByeWorld {
      > my ($self,$adjective) = @_;
      > return "Goodbye $adjective \n";
      >}
      >1;
      >
      >soapserver.cgi#!/usr/bin/env perl5.8.6
      >
      >use SOAP::Transport::HTTP;
      >use World;
      >
      >SOAP::Transport::HTTP::CGI
      > -> dispatch_to('World')
      > -> handle;
      >
      >soapclient.pl
      >--------------
      >#!/usr/local/bin/perl
      >use SOAP::Lite;
      >my $soap = SOAP::Lite
      > ->uri('World')
      > ->proxy('http://localhost/soap/soapserver.cgi');
      > #->on_debug(sub{warn @_});
      >$som = $soap->GoodBye("Bad world");

      This is not the name of the method in your server class. Should it be
      GoodByeWorld?

      Duncan




      Send instant messages to your online friends http://uk.messenger.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.