Greetings !

I just installed SOAP::Lite and decided to check it out, and in the process created the following scripts:

script /var/www/html/soap/soapserver.cgi
#!/usr/bin/env perl5.8.6 use SOAP::Transport::HTTP; use World; SOAP::Transport::HTTP::CGI -> dispatch_to('World') -> handle;
Module /var/www/html/soap/World.pm
package World; sub new { bless {}, shift; }; sub HelloPeople { my ($self) = @_; return "Answer from sub HelloPeople\n"; }; sub GoodBye { my ($self,$adjective) = @_; return "Goodbye $adjective \n"; } 1;
After this I started the Apache server.

The following is the soap client(soapClient.pl)
#!/usr/bin/env perl5.8.6 use SOAP::Lite; my $s = SOAP::Lite ->uri('World') ->proxy('http://localhost/soap/soapserver.cgi') ->HelloPeople() ->on_debug(sub{print@_}); print $s->result(); my $s = SOAP::Lite ->uri('World') ->proxy('http://localhost/soap/soapserver.cgi') ->GoodBye("Bad world") ->on_debug(sub{print@_}); print $s->result();
Everything's fine until this point. When I execute the client (soapClient.pl), It spews out the
following errors
not well-formed (invalid token) at line 1, column 1, byte 1 at /usr/lo +cal/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
Anybody has any idea, why is that so.

Thanks in advance

In reply to Error while receiving SOAP envelope from client by chanakya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.