User defined xml reponse in drupal 6 webservices

XMLRPC server gives xml reponse in following way. <methodResponse>   <fault>    <value>     <struct>      <member>       <name></name>       <value><int></int></value>      </member>      <member>       <name></name>       <value><string></string></value>      </member>     </struct>    </value>   </fault> </methodResponse> But If you want to use your own xml format for response, then edit includes/ Comment following code at line number 77 $xml = xmlrpc_value_get_xml($r); and while returning the value, return response in xml format. For example function myservices_test($name){   $response = "<root>     <name>".$name."</name> </root>";   return $response; }


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options