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

"not well-formed" error when using soaplite with tomcat

Expand Messages
  • jchin1000us
    Hi all, My problem involves trying to run perl Hello_client.pl James with the following 2 files: #!perl -w #Hello_client.pl use SOAP::Lite; use SOAP::Lite
    Message 1 of 2 , Mar 24, 2002
    • 0 Attachment
      Hi all,

      My problem involves trying to run perl Hello_client.pl James with the
      following 2 files:

      #!perl -w
      #Hello_client.pl
      use SOAP::Lite;
      use SOAP::Lite +trace;


      my $name = shift;

      print "\n\nCalling the SOAP Server to say hello\n\n";

      print "The SOAP Server says: ";

      print SOAP::Lite
      -> uri('Hello')
      -> proxy('http://localhost:8080/cs894hw2/Hello.cgi')
      -> sayHello($name)
      -> result . "\n\n";

      *****************************************************

      #!perl -w
      #Hello.cgi

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Hello')
      -> handle;

      package Hello;

      sub sayHello {

      shift;
      return "Hello " . shift;

      }

      #************************************************
      Trace:

      Unquoted string "trace" may clash with future reserved word at
      hello_client.pl l
      ine 4.


      Calling the SOAP Server to say hello

      The SOAP Server says: SOAP::Transport::new: ()
      SOAP::Serializer::new: ()
      SOAP::Deserializer::new: ()
      SOAP::Parser::new: ()
      SOAP::Lite::new: ()
      SOAP::Transport::HTTP::Client::new: ()
      SOAP::Lite::call: ()
      SOAP::Serializer::envelope: ()
      SOAP::Serializer::envelope: sayHello James
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Data::new: ()
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH
      (0x25c4394)
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://localhost:8080/cs894hw2
      /Hello.cgi
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 501
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "Hello#sayHello"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
      ENC="http://
      schemas.xmlsoap.org/soap/encoding/" SOAP-
      ENV:encodingStyle="http://schemas.xmlso
      ap.org/soap/encoding/" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/
      " xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3
      .org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:sayHello
      xmlns:namesp1="Hello"><c-g
      ensym3 xsi:type="xsd:string">James</c-
      gensym3></namesp1:sayHello></SOAP-ENV:Body
      ></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
      (0x24b2c70)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Connection: close
      Date: Mon, 25 Mar 2002 07:08:05 GMT
      Server: Java Web Services Developer Pack/1.0-ea1 (HTTP/1.1 Connector)
      Content-Length: 209
      ETag: "209-1017040075046"
      Last-Modified: Mon, 25 Mar 2002 07:07:55 GMT
      Client-Date: Mon, 25 Mar 2002 07:08:05 GMT
      Client-Peer: 127.0.0.1:8080

      #!perl -w
      #Hello.cgi

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Hello')
      -> handle;

      package Hello;

      sub sayHello {

      shift;
      return "Hello " . shift;

      }


      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()

      not well-formed at line 1, column 1, byte 1 at
      C:/Perl/site/lib/XML/Parser.pm li
      ne 168
      #!perl -w
      #Hello.cgi

      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('Hello')
      -> handle;

      package Hello;

      sub sayHello {

      shift;
      return "Hello " . shift;

      }

      SOAP::Lite::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Parser::DESTROY: ()
    • Paul Kulchenko
      Hi, jchin1000us! tomcat can t execute CGI scripts as far as I know, so it just returns source of your server script and client complains that it s not
      Message 2 of 2 , Mar 25, 2002
      • 0 Attachment
        Hi, jchin1000us!

        tomcat can't execute CGI scripts as far as I know, so it just returns
        source of your server script and client complains that it's not
        well-formed. Use Apache (or any other webserver) instead of Tomcat.

        Everything else looks fine.

        Best wishes, Paul.

        --- jchin1000us <jchin1000us@...> wrote:
        > Hi all,
        >
        > My problem involves trying to run perl Hello_client.pl James with
        > the
        > following 2 files:
        >
        > #!perl -w
        > #Hello_client.pl
        > use SOAP::Lite;
        > use SOAP::Lite +trace;
        >
        >
        > my $name = shift;
        >
        > print "\n\nCalling the SOAP Server to say hello\n\n";
        >
        > print "The SOAP Server says: ";
        >
        > print SOAP::Lite
        > -> uri('Hello')
        > -> proxy('http://localhost:8080/cs894hw2/Hello.cgi')
        > -> sayHello($name)
        > -> result . "\n\n";
        >
        > *****************************************************
        >
        > #!perl -w
        > #Hello.cgi
        >
        > use SOAP::Transport::HTTP;
        >
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('Hello')
        > -> handle;
        >
        > package Hello;
        >
        > sub sayHello {
        >
        > shift;
        > return "Hello " . shift;
        >
        > }
        >
        > #************************************************
        > Trace:
        >
        > Unquoted string "trace" may clash with future reserved word at
        > hello_client.pl l
        > ine 4.
        >
        >
        > Calling the SOAP Server to say hello
        >
        > The SOAP Server says: SOAP::Transport::new: ()
        > SOAP::Serializer::new: ()
        > SOAP::Deserializer::new: ()
        > SOAP::Parser::new: ()
        > SOAP::Lite::new: ()
        > SOAP::Transport::HTTP::Client::new: ()
        > SOAP::Lite::call: ()
        > SOAP::Serializer::envelope: ()
        > SOAP::Serializer::envelope: sayHello James
        > SOAP::Data::new: ()
        > SOAP::Data::new: ()
        > SOAP::Data::new: ()
        > SOAP::Data::new: ()
        > SOAP::Data::new: ()
        > SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH
        > (0x25c4394)
        > SOAP::Transport::HTTP::Client::send_receive: POST
        > http://localhost:8080/cs894hw2
        > /Hello.cgi
        > Accept: text/xml
        > Accept: multipart/*
        > Content-Length: 501
        > Content-Type: text/xml; charset=utf-8
        > SOAPAction: "Hello#sayHello"
        >
        > <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
        > xmlns:SOAP-
        > ENC="http://
        > schemas.xmlsoap.org/soap/encoding/" SOAP-
        > ENV:encodingStyle="http://schemas.xmlso
        > ap.org/soap/encoding/" xmlns:SOAP-
        > ENV="http://schemas.xmlsoap.org/soap/envelope/
        > " xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        > xmlns:xsd="http://www.w3
        > .org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:sayHello
        > xmlns:namesp1="Hello"><c-g
        > ensym3 xsi:type="xsd:string">James</c-
        > gensym3></namesp1:sayHello></SOAP-ENV:Body
        > ></SOAP-ENV:Envelope>
        > SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
        > (0x24b2c70)
        > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
        > Connection: close
        > Date: Mon, 25 Mar 2002 07:08:05 GMT
        > Server: Java Web Services Developer Pack/1.0-ea1 (HTTP/1.1
        > Connector)
        > Content-Length: 209
        > ETag: "209-1017040075046"
        > Last-Modified: Mon, 25 Mar 2002 07:07:55 GMT
        > Client-Date: Mon, 25 Mar 2002 07:08:05 GMT
        > Client-Peer: 127.0.0.1:8080
        >
        > #!perl -w
        > #Hello.cgi
        >
        > use SOAP::Transport::HTTP;
        >
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('Hello')
        > -> handle;
        >
        > package Hello;
        >
        > sub sayHello {
        >
        > shift;
        > return "Hello " . shift;
        >
        > }
        >
        >
        > SOAP::Deserializer::deserialize: ()
        > SOAP::Parser::decode: ()
        >
        > not well-formed at line 1, column 1, byte 1 at
        > C:/Perl/site/lib/XML/Parser.pm li
        > ne 168
        > #!perl -w
        > #Hello.cgi
        >
        > use SOAP::Transport::HTTP;
        >
        > SOAP::Transport::HTTP::CGI
        > -> dispatch_to('Hello')
        > -> handle;
        >
        > package Hello;
        >
        > sub sayHello {
        >
        > shift;
        > return "Hello " . shift;
        >
        > }
        >
        > SOAP::Lite::DESTROY: ()
        > SOAP::Transport::DESTROY: ()
        > SOAP::Transport::HTTP::Client::DESTROY: ()
        > SOAP::Deserializer::DESTROY: ()
        > SOAP::Serializer::DESTROY: ()
        > SOAP::Data::DESTROY: ()
        > SOAP::Data::DESTROY: ()
        > SOAP::Data::DESTROY: ()
        > SOAP::Data::DESTROY: ()
        > SOAP::Data::DESTROY: ()
        > SOAP::Parser::DESTROY: ()
        >
        >
        >
        >
        >
        >
        > ------------------------ 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!?
        Yahoo! Movies - coverage of the 74th Academy Awards´┐Ż
        http://movies.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.