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

5001Returning nice error for invalid method call

Expand Messages
  • burke_thomas
    Nov 10, 2005
    • 0 Attachment
      Hi,

      I've got a SOAP::Lite server running under Apache that only has one
      method. If the wrong method is called, the following fault is
      returned:

      <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Denied access to method (Request) in class (main) at
      /usr/lib/perl5/site_perl/5.8.6/SOAP/Lite.pm line 2416.
      </faultstring>
      </soap:Fault>

      Soap::Lite is generating this error, not my code.

      I'd like to return a custom error message instead of this, like
      <soap:Fault>
      <faultcode>330</faultcode>
      <faultstring>Invalid method</faultstring>
      </soap:Fault>

      How would I do that?

      In addition, the faults I do generate always have a tag "soap:" in
      front of the fault code. E.g.

      <soap:Fault>
      <faultcode>soap:610</faultcode>
      <faultstring>Unauthorized</faultstring>
      </soap:Fault>

      Why is it "soap:610" instead of just 610, and can I get rid of
      the "soap:"?

      Thanks,

      Tom