I have a CGI file that dispatches requests to a PERL module using SOAP::Lite. I read (http://cookbook.soaplite.com/#soap%20faults) that if I use "die" from the PERL module, SOAP::Lite will package the string given to "die" as the SOAP faultstring and return it to the client. I know that my PERL module is returning the string because I have tested the module on the server side. However, something goes wrong after the module returns its output such that my client gets the following error message (if I add print "Content-type..." in the CGI file) minus the delimiting "**********":

**********

not well-formed (invalid token) at line 1, column 581, byte 581 at /us +r/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser.pm l +ine 185 Status: 500 Internal Server Error Content-Length: 747 Content-Type: text/xml; charset=utf-8 SOAPServer: SOAP::Lite/Perl/0.60 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instanc +e" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:S +OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/ +/www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xm +lsoap.org/soap/encoding/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>ghrccatsvcs.cgi:GhrcCatSvcs:GhrcCatTableFields: ***Failed + to prepare SQL statement: ORA-00942: table or view does not exist ( +DBD ERROR: error possibly near <*> indicator at char 14 in 'SELECT * +FROM <*>amsu_sub_in WHERE 1 = 0') at GhrcCatSvcs.pm line 216. </faultstring> </SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> at dbq_client_fi +elds line 51

*********

You can clearly see the "Failed to prepare SQL statement" faultstring embedded in the SOAP response, but all my client usually returns is "500 Internal Server Error at dbq_client_fields line 51. What am I doing wrong? Many thanks!


In reply to Client-side error Handling (SOAP,CGI) by Anonymous Monk

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.