0514: Publisher: dpchiesa 0515: Service Name: ZipToCityState 0516: Description: Retrieves valid City+State pairs for a given 0517: US Zip Code, or longitude/latitude for a zipcode. 0518: Also retrieves zipcodes for city/state pairs 0519: Implementation: MS .NET
http://www.winisp.net/cheeso/zips/ZipService.asmx?WSDL
The above URL ends in .asmx?WSDL.
The .asmx is a sure sign that this Web Service
has been implemented using Microsoft's .NET Framework.
As explained earlier,
one of the benefits of using .NET for Web Services
is that WWW pages that can be used
to test a Web Service are dynamically generated.
You can go to the first of these WWW pages
by using the above URL without the last 5 characters,
i.e., by going to:
http://www.winisp.net/cheeso/zips/ZipService.asmx
You should get a WWW page saying:
0520: The following operations are supported. For a formal definition, 0521: please review the Service Description. 0522: * ZipToLatLong 0523: * CityToZip 0524: * ZipToCityAndState 0525: * CityTo1Zip 0526: * ZipTo1CityAndState
This
is a list of the names of the methods provided by the Web Service.
If you now click on one of these names, e.g.,
ZipTo1CityAndState,
another WWW page is dynamically generated.
It is the WWW page at:
http://www.winisp.net/cheeso/zips/ZipService.asmx?op=ZipTo1CityAndState
This WWW page provides a textbox
and an Invoke button.
If you type a zipcode like 94042 into the textbox and click on the Invoke button, the browser will contact the webserver at www.winisp.net to get it to execute the ZipTo1CityAndState method. After a little time, your browser will give you the following WWW page:
0527: <?xml version="1.0" encoding="utf-8"?> 0528: <string xmlns="http://dinoch.dyndns.org/webservices/"> 0529: MOUNTAIN VIEW CA 0530: </string>
You may have to click on View Page Source to see this XML.
You could use the techniques described in Section 4 of this document to provide a program that accesses this Web Service.