How do I output XML schema?
You'll need to hook into the rest server module's formatters. This is untested but I think it'll work:

function MYMODULE_rest_server_response_formatters_alter(&amp;$formatters) {
  $formatters['xml']['formatter class'] = 'MyServicesXMLFormatter';
}

...

class MyServicesXMLFormatter extends ServicesXMLFormatter {

  public function render($data) {
    // This is the default code from ServicesXMLFormatter::render(), 
    // manipulate this to add your schema and return the saved doc as normal
    $doc = new DOMDocument('1.0', 'utf-8'); 
    $root = $doc-&gt;createElement('result'); 
    $doc-&gt;appendChild($root); 
    $this-&gt;xml_recursive($doc, $root, $data); 
    return $doc-&gt;saveXML();
  }

}