Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Semantic request and response for standardized Web services

Return to article


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>

Return to article