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

XML::Parser "not well-formed (invalid token)" problem

Expand Messages
  • Erik van Zijst
    Hi folks, I ve just started using SOAP::Lite (I m quite new to perl as well) and I started building SOAP::Lite clients for my existing GLUE webservices. At
    Message 1 of 1 , Jun 19, 2003
    • 0 Attachment
      Hi folks,

      I've just started using SOAP::Lite (I'm quite new to perl as well) and
      I started building SOAP::Lite clients for my existing GLUE webservices.

      At some point, XML::Parser throws an exception complaining about
      invalid XML. However, there's nothing wrong the xml AFAIK. Below is
      the exception, stacktrace and xml soap envelope:

      Yahoo will probably mess up the layout and I can't attach a text file,
      but the parser complains about line 2, column 1164, which is
      "...VersionsO'Reilly..."



      Uncaught exception from user code:
      Uncaught exception from user code:
      Uncaught exception from user code:

      not well-formed (invalid token) at line 2, column 1164, byte 1204 at
      /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/XML/Parser.pm line 185
      Carp::croak('^Jnot well-formed (invalid token) at line 2,
      column 1164, byte 12...') called at
      /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/XML/Parser/Expat.pm line 478

      XML::Parser::Expat::parse('XML::Parser::Expat=HASH(0x828c008)', '<?xml
      version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope xmlns...')
      called at /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/XML/Parser.pm
      line 185
      eval {...} called at
      /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/XML/Parser.pm line 184
      XML::Parser::parse('XML::Parser=HASH(0x85f7e14)', '<?xml
      version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope xmlns...')
      called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1258
      SOAP::Parser::decode('SOAP::Parser=HASH(0x82a0194)', '<?xml
      version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope xmlns...')
      called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1630

      SOAP::Deserializer::decode('SOAP::Deserializer=HASH(0x82a029c)',
      '<?xml version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope
      xmlns...') called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1643

      SOAP::Deserializer::deserialize('SOAP::Deserializer=HASH(0x82a029c)',
      '<?xml version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope
      xmlns...') called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2832
      eval {...} called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2832
      SOAP::Lite::call('SOAP::Lite=HASH(0x828c3e0)', 'pop',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2802
      SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x828c3e0)',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      ./headlines.pl line 44
      XML::Parser::parse('XML::Parser=HASH(0x85f7e14)', '<?xml
      version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope xmlns...')
      called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1258
      SOAP::Parser::decode('SOAP::Parser=HASH(0x82a0194)', '<?xml
      version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope xmlns...')
      called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1630

      SOAP::Deserializer::decode('SOAP::Deserializer=HASH(0x82a029c)',
      '<?xml version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope
      xmlns...') called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 1643

      SOAP::Deserializer::deserialize('SOAP::Deserializer=HASH(0x82a029c)',
      '<?xml version=\'1.0\' encoding=\'UTF-8\'?>^M^J<soap:Envelope
      xmlns...') called at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2832
      eval {...} called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2832
      SOAP::Lite::call('SOAP::Lite=HASH(0x828c3e0)', 'pop',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2802
      SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x828c3e0)',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      ./headlines.pl line 44
      <?xml version='1.0' encoding='UTF-8'?>
      <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
      xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
      soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
      xmlns:ns5='http://www.themindelectric.com/package/com.marketxs.soap.push/'
      xmlns:ns6='http://www.themindelectric.com/package/com.marketxs.soap.news/'><soap:Body><n:popResponse
      xmlns:n='http://tempuri.org/com.marketxs.soap.push.AlertImpl'><Result
      href='#id0'></Result></n:popResponse><id0 id='id0' soapenc:root='0'
      xsi:type='soapenc:Array' soapenc:arrayType='ns5:Trigger[1]'><i
      href='#id1'></i></id0><id1 id='id1' soapenc:root='0'
      xsi:type='ns6:NewsAlertTrigger'><persistent
      xsi:type='xsd:boolean'>true</persistent><news href='#id2'></news><vars
      xsi:nil='1'></vars><bodyIncluded
      xsi:type='xsd:boolean'>false</bodyIncluded><filterMatchAll
      xsi:type='xsd:boolean'>true</filterMatchAll></id1><id2 id='id2'
      soapenc:root='0' xsi:type='ns6:NewsInfo'><priority
      xsi:type='xsd:string'>flash</priority><headline
      xsi:type='xsd:string'>O'REILLY: Applying order to Concurrent
      VersionsO'Reilly releases
      </headline><newsDate
      xsi:type='xsd:dateTime'>2003-06-19T11:27:00.000Z</newsDate><newsId
      xsi:type='xsd:long'>14588038</newsId><newsSource
      xsi:type='xsd:string'>ForumNews US</newsSource><newsSourceId
      xsi:type='xsd:long'>157</newsSourceId><body
      xsi:nil='1'></body><countries xsi:nil='1'></countries><industries
      xsi:nil='1'></industries><markets xsi:nil='1'></markets><tickers
      href='#id3'></tickers><articleTypes
      xsi:nil='1'></articleTypes><regions xsi:nil='1'></regions><keywords
      xsi:nil='1'></keywords><newsCodes xsi:nil='1'></newsCodes></id2><id3
      id='id3' soapenc:root='0' xsi:type='soapenc:Array'
      soapenc:arrayType='xsd:long[]'></id3></soap:Body></soap:Envelope> at
      ./headlines.pl line 44
      Carp::croak('Uncaught exception from user code:^J^IUncaught
      exception from user...') called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2710
      SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x828c3e0)', 'Uncaught
      exception from user code:^J^IUncaught exception from user...') called
      at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2834
      SOAP::Lite::call('SOAP::Lite=HASH(0x828c3e0)', 'pop',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2802
      SOAP::Lite::__ANON__('SOAP::Lite=HASH(0x828c3e0)',
      'SOAP::Data=HASH(0x86c51a0)', 'SOAP::Data=HASH(0x86baf28)') called at
      ./headlines.pl line 44
    Your message has been successfully submitted and would be delivered to recipients shortly.