Hi, I am trying to get the response from using SOAP API and results in parsing error. I am using SOAP LITE module to pull response. Is there a way we can get rid of error responses (￿￿) and process the rest of the data? or Are there any conversions available for SOAP responses? Below are code. Appreciate your reply

not well-formed (invalid token) at line 15, column 314, byte 3846 at C:/Perl64/lib/XML/Parser.pm line 187. <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <GetRelevanceResultResponse xmlns="http://schemas.bigfix.com/Relevance"> ..... 1sys234&~&15802503&~&Adobe Creative Suite&~& &~& &~& C:\Users\boundsjr\Adobe &~& &~& &~& C:\PROGRA~2\INSTAL~1\{0134A~1\setup.exe /relaunched/rootloc=c:\users\boundsjr\desktop\creative suite 2 - standard\adobe creative suite 2.0/lang=0409￿￿嘸ņ椺倝 鈀牔湡潳瑦匠汯瑵潩獮䌠癩汩㌠⁄牆浡睥牯⸱‰縦…⸱‰縦…牔湡潳瑦匠汯瑵潩獮☠♾䌠尺牐杯慲楆敬⁳砨㘸尩牔湡潳瑦匠汯瑵潩獮䌠癩汩㌠⁄牆浡睥牯縦…☠♾†縦…䌢尺楗摮睯屳牔湡潳瑦匠汯瑵潩獮䌠癩汩㌠⁄牆浡睥牯屫湵湩瑳污⹬硥≥∠唯䌺尺楗摮睯屳牔湡潳瑦匠汯瑵潩獮䌠癩汩㌠⁄牆浡睥牯屫湕湩瑳污屬湵湩瑳污⹬浸≬" ..... </GetRelevanceResultResponse> </soapenv:Body> </soapenv:Envelope> at C:\Users\User1\Desktop\rep\SW\SoftwareInventoryFull_v5.pl line 74.

use SOAP::Lite; my $configfile="Config.txt"; my $host; my $cusername; my $cpassword; my $cexpr1; my $offset = 0; while ($offset < $loop) { my $username = SOAP::Data->name('username' => $cusername ); my $password = SOAP::Data->name('password' => $cpassword ); my $service = SOAP::Lite -> uri( 'https://' . $host . '/reports?ws +dl' ) -> proxy( 'https://' . $host ); $timestamp = localtime(time); #Retrieve the records my $expr = SOAP::Data->name('relevanceExpr' => $cexpr1 ); my $result = $service -> GetRelevanceResult( $expr, $username, $p +assword ); if( $result->fault ) { print " [".$timestamp. "] ---- faultcode: " . $result->faultco +de . "\n"; print " [".$timestamp. "] ---- faultstring: " . $result->fault +string . "\n"; } else { # Insert the data in to Temp table from API foreach my $answer ( $result->valueof( "//GetRelava +nceResultResponse/a" ) ) { Insert in to the table. } } }

In reply to not well-formed (invalid token) while using SOAP Lite Module by Perl_Jay

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.