Listing 13: Template of semantic service request and response for Address Finder Web Service (* The service template may contain some URLs that refer to the XML documents that describe those information elements like errorCode and CoordinateSystems, etc. The content of the template can be referenced to the ArcWeb Services Web site)
<?xml version="1.0" encoding="utf-8" standalone="no"?> <ArcWebServiceDescription> <description> <doc>Required elements in service request</doc> <element>XML declaration</element> <element>ServiceRequest</element> <element>Service Name="ServiceName"</element> <element>Function Name="FunctionName"</element> <element>InputVariables</element> <ServiceRequestXMLDocType>URL refers to the Service Request XML document</ServiceRequestXMLDocType> <ServiceResponseXMLDocType>URL refers to the Service Response XML document</ServiceResponseXMLDocType> </description> ... ... <ServiceRequestTemplate> ... ... <Service Name="AddressFinder"> ... ... <Function Name="findAddress"> <InputVariables> <address> <houseNumber optional="true">house number</houseNumber> <street>street name</street> <intersection optional="true">street intersection of the address</intersection> <city>city name</city> <state_prov>state/province name</state_prov> <zone>zip code</zone> <country optional="true">two-letter country code</country> </address> <datasource> <option>ESRINZ.Streets.NZ</option> <option>GDT.Address.CA</option> <option>GDT.Address.US</option> <option>GDT.Streets.CA</option> <option>GDT.Streets.US</option> <option>TA.Address.EU</option> <option>TA.Address.US</option> <option>TA.Streets.US</option> </datasource> <username>[username]</username> <password>[password]</password> </InputVariables> </Function> ... ... </Service> ... ... </ServiceRequestTemplate> ... ... <ServiceResponseTemplate> <ServiceResponse> ... ... <Service Name="AddressFinder"> <Function Name="findAddress"> <InputVariables> <address> <houseNumber>InputVariable</houseNumber> <street>InputVariable</street> <intersection>InputVariable</intersection> <city>InputVariable</city> <state_prov>InputVariable</state_prov> <zone>InputVariable</zone> <country>InputVariable</country> </address> <datasource>InputVariable</datasource> </InputVariables> <OutputResult> <Locations> <NumberOfCandidates> number of candidate location elements thatmatches the input address </NumberOfCandidates> <matchType> <description>matchType contains the typeof candidate match</description> <option>CANDIDATES</option> <option>ERROR</option> <option>EXACT</option> <option>NOMATCH</option> </matchType> <errorCode> <description>errorCode contains an error codein the case of NOMATCH</description> <option code="E000">No address found by the geocoder</option> ... ... <option code="E027">Invalid directional attempted</option> </errorCode> <Location> <Description1>long description of the input address</Description1> <Description2>short description of the input address</Description2> <x-coordinate> x coordinate of the input address </x-coordinate> <y-coordinate> y coordinate of the input address </y-coordinate> <CoordinateSystems> <description> contains the coordinate system being used. Default value is projection "4326". </description> <CoordinateSystem> <datumTransformation> ... ... </datumTransformation> <projection code="4326"> ... ... </projection> </CoordinateSystem> ... ... </CoordinateSystems> <matchType> <description> </description> <option code="Shh"> a match found in United States Postal Service (USPS) data </option> ... ... <option code="Xhhh"> a match found was for an intersection of two streets </option> </matchType> </Location> </Locations> </OutputResult> </Function> </Service> ... ... </ServiceResponse> </ServiceResponseTemplate> ... ... </ArcWebServiceDescription> |