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

Getting not well-formed (invalid token) at line 1, column 1, byte 1

Expand Messages
  • nerdscan <nramjee@yahoo.com>
    Hi, I am running the client example with the following error: not well-formed (invalid token) at line 1, column 1, byte 1 at
    Message 1 of 1 , Jan 25, 2003
    • 0 Attachment
      Hi,

      I am running the client example with the following error:
      "not well-formed (invalid token) at line 1, column 1, byte 1
      at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-
      multi/XML/Parser.pm line 185"

      The files I used are shown below, as is the trace output.

      ----Environment -------
      Server OS: Linux 2.4.18-14
      Web server: Apache/2.0.40 (Red Hat Linux)

      ----Client------
      #!/usr/bin/perl -w
      use SOAP::Lite on_debug => sub{print@_};
      use SOAP::Lite + "trace";

      my $name = shift;

      $SOAP::Constants::DO_NOT_CHECK_CONTENT_TYPE = 1;

      print "\n\nCalling the SOAP server to say hello\n\n";
      print "\nThe SOAP Server says: ";
      print SOAP::Lite
      -> uri('urn:Example1')
      -> proxy('http://localhost/hello.cgi')
      -> sayHello($name)
      -> result . "\n\n";

      ----Server-------
      # Hello.pm - simple Hello module
      package Hello;
      sub sayHello {
      shift;
      return "Hello " . shift;
      }
      1;

      ------- CGI script ----
      #!/usr/bin/perl -w
      # hello.cgi - Hello SOAP handler
      use lib '/home/ramjee/soap';
      use SOAP::Transport::HTTP;

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

      -------- Trace output ----------
      perl ./hw_client.pl James


      Calling the SOAP server to say hello


      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
      (0x831a648)
      SOAP::Transport::HTTP::Client::send_receive: POST
      http://localhost/hello.cgi
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 508
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "urn:Example1#sayHello"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-
      ENV:Body><namesp1:sayHello xmlns:namesp1="urn:Example1"><c-gensym3
      xsi:type="xsd:string">James</c-gensym3></namesp1:sayHello></SOAP-
      ENV:Body></SOAP-ENV:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
      (0x84cc740)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Connection: close
      Date: Sat, 25 Jan 2003 23:43:59 GMT
      Accept-Ranges: bytes
      ETag: "44081-d3-8cd86880"
      Server: Apache/2.0.40 (Red Hat Linux)
      Content-Length: 211
      Content-Type: text/plain; charset=ISO-8859-1
      Last-Modified: Sat, 25 Jan 2003 23:34:42 GMT
      Client-Date: Sat, 25 Jan 2003 23:43:59 GMT
      Client-Response-Num: 1

      #!/usr/bin/perl -w
      # hello.cgi - Hello SOAP handler
      use lib '/home/ramjee/soap';
      use SOAP::Transport::HTTP;

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

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

      not well-formed (invalid token) at line 1, column 1, byte 1
      at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-
      multi/XML/Parser.pm line 185
      #!/usr/bin/perl -w
      # hello.cgi - Hello SOAP handler
      use lib '/home/ramjee/soap';
      use SOAP::Transport::HTTP;

      SOAP::Transport::HTTP::CGI
      # -> dispatch_to('Hello::(?:sayHello)')
      -> dispatch_to('Hello')
      -> handle;
      at ./hw_client.pl line 11
      SOAP::Lite::DESTROY: ()
      SOAP::Deserializer::DESTROY: ()
      SOAP::Transport::DESTROY: ()
      SOAP::Transport::HTTP::Client::DESTROY: ()
      SOAP::Serializer::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      SOAP::Data::DESTROY: ()
      The SOAP Server says: SOAP::Parser::DESTROY: ()
    Your message has been successfully submitted and would be delivered to recipients shortly.