Configuring the responseFormats.xml file

We must give format to the different resources obtained. Each scope have one IFormattingResource Class defined.

These formats will be registered in the responseFormats.xml file.

The format of this archive will be:

<?xml version="1.0" encoding="UTF-8"?>
<ResponseFormats>
    <Scope id="http://www.rediris.es/sir/api/sps_available.php">
        <FormatClass>DefaultFormattingResource</FormatClass>
        <FormatClassArchiveName>DefaultFormattingResource.class.php</FormatClassArchiveName>
    </Scope>
</ResponseFormats>

Where:

  • Scope 'id' will be the URI of the scope
  • FormatClass will be the name of the class that implements IFormattingResource.
  • FormatClassArchiveName will be the name of the archive where it's defined the class that implements IFormattingResource. This file must be stored in the directory 'oauth_client/src/resources/'