Capabilities XML-Anforderung und -Antwort
XML-Anforderung
Im Folgenden wird ein Beispiel für eine XML-Anforderung an den Capabilities-Dienst aufgeführt. In diesem Beispiel gilt die Anforderung für die Funktionen des Reverse Geocode-Vorgangs für Mexiko.
GET http://myserver:8080/rest/GlobalGeocode/capabilities.xml?
country=MEX&operation=reverseGeocode HTTP/1.1
XML-Antwort
Nachfolgend wird die XML-Antwort dargestellt, die von der vorherigen Anforderung zurückgegeben wurde. Diese Antwort ist eine verkürzte Ansicht.
<?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>