|SOAP Samples / Find the Nearest Five Subway Stations|
The final step is to write the Java client code. The client code will receive a request to retrieve the five subway stations that are nearest to a given point. The point could be obtained either by geocoding an address or from a mobile device's GPS. Either way, the point will be provided to the client code as WGS 84 (lat/long) coordinates. The client code will call on the Feature Service to get the station locations. The client code will then use the Mapping Service to return a map of Toronto that has the location of the five subway stations as an overlay.
Before you can begin writing the Java client code, you must first generate the stub code based on the WSDL documents for the Feature and Mapping services. For information about how to generate stub code for a Java client, see Generating Stub Code for a Java Client. For the URLs of the Feature and Mapping Service WSDL documents, see WSDL URLs.