Tutorials Point


  Learn XML-RPC
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     About TP     Advertising  

XML-RPC Fault Format

previous next AddThis Social Bookmark Button


Advertisements

XML-RPC Fault are type of responses. If there was a problem in processing the XML-RPC request,the methodResponse element will contain a fault element instead of a params element. The fault element, like the params element, has only a single value. Instead of containing a response to the request, however, that value indicates that something went wrong. A fault response might look like:

<?xml version="1.0"?>
<methodResponse>
   <fault>
      <value><string>No such method!</string></value>
   </fault>
</methodResponse>

A fault will also have an error code. XML-RPC doesn't standardize error codes at all. You'll need to check the documentation for particular packages to see how they handle faults.

The fault response could also look like:

<?xml version="1.0"?>
<methodResponse>
   <fault>
      <value>
         <struct>
            <member>
               <name>code</name>
               <value><int>26</int></value>
            </member>
            <member>
               <name>message</name>
               <value><string>No such method!</string></value>
            </member>
         </struct>
      </value>
   </fault>
</methodResponse>


previous next Printer Friendly

Advertisements


  

Advertisements