Capabilities XML Request & Response

XML Request

The following is an example of an XML request for the Capabilities service. In this example, the request is for the capabilities for the reverse geocode operation for Mexico.

GET http://myserver:8080/rest/GlobalGeocode/capabilities.xml?
country=MEX&operation=reverseGeocode HTTP/1.1

XML Response

The following shows the XML response returned by the previous request. This response is an abbreviated view.

<?xml version="1.0" encoding="UTF-8"?>
<GeocodeCapabilitiesResponse>
   <supportedOperations>
      <name>reverseGeocode</name>
      <requiredInputs>
         <name>points</name>
         <description>Point information for a country. i.e latitude and longitude</description>
         <type>Point</type>
         <allowedValuesWithDescriptions />
      </requiredInputs>
      <optionalInputs>
         <name>preferences</name>
         <description>Contains preferences and constraints</description>
         <type>Preferences</type>
         <allowedValuesWithDescriptions />
      </optionalInputs>
      <outputs>
         <name>response</name>
         <description>The address corresponding to the input point</description>
         <type>Response</type>
      </outputs>
      <supportLevels>
         <supportedDataLevel>7</supportedDataLevel>
         <countries>MEX</countries>
      </supportLevels>
   </supportedOperations>
.
.
.
   <customObjects>
      <name>responses</name>
      <description>Holds results from a geocode or reverse geocode operation</description>
      <properties>
         <name>totalPossibleCandidates</name>
         <output>
            <name>totalPossibleCandidates</name>
            <description>Number of candidate that could have been returned from this query</description>
            <type>int</type>
         </output>
      </properties>
      <properties>
         <name>totalMatches</name>
         <output>
            <name>totalMatches</name>
            <description>Number of close candidates that could have been returned from this query</description>
            <type>int</type>
         </output>
      </properties>
      <properties>
         <name>candidates</name>
         <output>
            <name>candidates</name>
            <description>ordered list of matching candidates</description>
            <type>LIST<Candidate></type>
         </output>
      </properties>
   </customObjects>
</GeocodeCapabilitiesResponse>