Free Web Services - Herong's Tutorial Examples - v2.13, by Herong Yang
GetInfoByState - Response Message Sample
This section provides a response message sample of GetInfoByState Web service.
The response message of GetInfoByState Web service contains the list of ZIP codes with city names, phone area codes, and time zone codes of the specified US state.
After running the "Request 1" sample in the previous tutorial, look at the response window. You will see the response message of "GetInfoByState" in SOAP 1.2 format with all ZIP codes in RI (Rhode Island):
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetInfoByStateResponse xmlns="http://www.webserviceX.NET"> <GetInfoByStateResult> <NewDataSet xmlns=""> <Table> <CITY>Wood River Junction</CITY> <STATE>RI</STATE> <ZIP>02894</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Woonsocket</CITY> <STATE>RI</STATE> <ZIP>02895</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Wyoming</CITY> <STATE>RI</STATE> <ZIP>02898</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Adamsville</CITY> <STATE>RI</STATE> <ZIP>02801</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Albion</CITY> <STATE>RI</STATE> <ZIP>02802</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Ashaway</CITY> <STATE>RI</STATE> <ZIP>02804</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Barrington</CITY> <STATE>RI</STATE> <ZIP>02806</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Block Island</CITY> <STATE>RI</STATE> <ZIP>02807</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Bradford</CITY> <STATE>RI</STATE> <ZIP>02808</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Bristol</CITY> <STATE>RI</STATE> <ZIP>02809</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Carolina</CITY> <STATE>RI</STATE> <ZIP>02812</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Central Falls</CITY> <STATE>RI</STATE> <ZIP>02863</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Charlestown</CITY> <STATE>RI</STATE> <ZIP>02813</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Chepachet</CITY> <STATE>RI</STATE> <ZIP>02814</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Clayville</CITY> <STATE>RI</STATE> <ZIP>02815</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Newport</CITY> <STATE>RI</STATE> <ZIP>02840</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Newport</CITY> <STATE>RI</STATE> <ZIP>02841</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Kingstown</CITY> <STATE>RI</STATE> <ZIP>02852</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Kingstown</CITY> <STATE>RI</STATE> <ZIP>02854</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Providence</CITY> <STATE>RI</STATE> <ZIP>02904</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Providence</CITY> <STATE>RI</STATE> <ZIP>02911</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Scituate</CITY> <STATE>RI</STATE> <ZIP>02857</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>North Smithfield</CITY> <STATE>RI</STATE> <ZIP>02896</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Oakland</CITY> <STATE>RI</STATE> <ZIP>02858</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Pascoag</CITY> <STATE>RI</STATE> <ZIP>02859</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Pawtucket</CITY> <STATE>RI</STATE> <ZIP>02860</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Pawtucket</CITY> <STATE>RI</STATE> <ZIP>02861</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Pawtucket</CITY> <STATE>RI</STATE> <ZIP>02862</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Peace Dale</CITY> <STATE>RI</STATE> <ZIP>02883</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Portsmouth</CITY> <STATE>RI</STATE> <ZIP>02871</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02901</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02902</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02903</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02905</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02906</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02907</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02908</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02909</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02912</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02918</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Providence</CITY> <STATE>RI</STATE> <ZIP>02940</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Prudence Island</CITY> <STATE>RI</STATE> <ZIP>02872</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table>
<Table> <CITY>Riverside</CITY> <STATE>RI</STATE> <ZIP>02915</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Rockville</CITY> <STATE>RI</STATE> <ZIP>02873</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Rumford</CITY> <STATE>RI</STATE> <ZIP>02916</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Saunderstown</CITY> <STATE>RI</STATE> <ZIP>02874</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Shannock</CITY> <STATE>RI</STATE> <ZIP>02875</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Slatersville</CITY> <STATE>RI</STATE> <ZIP>02876</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Slocum</CITY> <STATE>RI</STATE> <ZIP>02877</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Smithfield</CITY> <STATE>RI</STATE> <ZIP>02917</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Tiverton</CITY> <STATE>RI</STATE> <ZIP>02878</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Wakefield</CITY> <STATE>RI</STATE> <ZIP>02879</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Wakefield</CITY> <STATE>RI</STATE> <ZIP>02880</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Warren</CITY> <STATE>RI</STATE> <ZIP>02885</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Warwick</CITY> <STATE>RI</STATE> <ZIP>02886</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Warwick</CITY> <STATE>RI</STATE> <ZIP>02887</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Warwick</CITY> <STATE>RI</STATE> <ZIP>02888</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Warwick</CITY> <STATE>RI</STATE> <ZIP>02889</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>West Greenwich</CITY> <STATE>RI</STATE> <ZIP>02817</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>West Kingston</CITY> <STATE>RI</STATE> <ZIP>02892</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>West Warwick</CITY> <STATE>RI</STATE> <ZIP>02893</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Westerly</CITY> <STATE>RI</STATE> <ZIP>02891</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Hope</CITY> <STATE>RI</STATE> <ZIP>02831</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Hope Valley</CITY> <STATE>RI</STATE> <ZIP>02832</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Hopkinton</CITY> <STATE>RI</STATE> <ZIP>02833</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Jamestown</CITY> <STATE>RI</STATE> <ZIP>02835</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Johnston</CITY> <STATE>RI</STATE> <ZIP>02919</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Kenyon</CITY> <STATE>RI</STATE> <ZIP>02836</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Kingston</CITY> <STATE>RI</STATE> <ZIP>02881</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Lincoln</CITY> <STATE>RI</STATE> <ZIP>02865</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Little Compton</CITY> <STATE>RI</STATE> <ZIP>02837</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Manville</CITY> <STATE>RI</STATE> <ZIP>02838</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Mapleville</CITY> <STATE>RI</STATE> <ZIP>02839</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Middletown</CITY> <STATE>RI</STATE> <ZIP>02842</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Narragansett</CITY> <STATE>RI</STATE> <ZIP>02882</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Coventry</CITY> <STATE>RI</STATE> <ZIP>02816</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Cranston</CITY> <STATE>RI</STATE> <ZIP>02910</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Cranston</CITY> <STATE>RI</STATE> <ZIP>02920</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Cranston</CITY> <STATE>RI</STATE> <ZIP>02921</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Cumberland</CITY> <STATE>RI</STATE> <ZIP>02864</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>East Greenwich</CITY> <STATE>RI</STATE> <ZIP>02818</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>East Providence</CITY> <STATE>RI</STATE> <ZIP>02914</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Exeter</CITY> <STATE>RI</STATE> <ZIP>02822</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Fiskeville</CITY> <STATE>RI</STATE> <ZIP>02823</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Forestdale</CITY> <STATE>RI</STATE> <ZIP>02824</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Foster</CITY> <STATE>RI</STATE> <ZIP>02825</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Glendale</CITY> <STATE>RI</STATE> <ZIP>02826</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Greene</CITY> <STATE>RI</STATE> <ZIP>02827</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Greenville</CITY> <STATE>RI</STATE> <ZIP>02828</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Harmony</CITY> <STATE>RI</STATE> <ZIP>02829</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> <Table> <CITY>Harrisville</CITY> <STATE>RI</STATE> <ZIP>02830</ZIP> <AREA_CODE>401</AREA_CODE> <TIME_ZONE>E</TIME_ZONE> </Table> </NewDataSet> </GetInfoByStateResult> </GetInfoByStateResponse> </soap:Body> </soap:Envelope>
Click the "Raw" vertical tab. You will see the entire HTTP response including header lines:
HTTP/1.1 200 OK Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Encoding: gzip Vary: Accept-Encoding Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Content-Length: 1444 (response XML...)
Table of Contents
SoapUI - Web Service Testing Tool
Mock Web Services - herongyang.com/Service
"SoapResponder" and Web Service Test Tool
"Calculator" for 4 Integer Operations
DataFlex Web Service for Country Information
LatLonListCityNames - Return Latitudes and Longitudes of US Cities
LatLonListZipCode - Return Latitudes and Longitudes of US Zip Code
TempConvert Web Service for Temperature Conversion
NDFDgenByDay - US Weather Forecast by Day
NDFDgen - US-Weather Forecast for a Single Location
Bitcoin Blockchain Data API (or Explorer)
flickr.interestingness.getList - Get Interesting Photos
NumberToWords - Convert Number in Digits to Words
TitleCaseWordsWithToken - Words to Title Case Format
"PUG SOAP" Web Service for PubChem Database
Discontinued: Currency Converter by kowabunga.net
Discontinued: GetCountries - Get All Countries and Territories
Discontinued: GetCurrencies - Get Currencies from All Countries
Discontinued: GetGMTbyCountry - Get GMT Information of a Given Country
Discontinued: GetISD - Get ISD Phone Code of a Given Country
Discontinued: GetCitiesByCountry - Get Cities by Country
►Discontinued: GetInfoByState - Get ZIP Codes of a Given US State
GetInfoByState - Usage Description
GetInfoByState - Request Message Sample
►GetInfoByState - Response Message Sample
Discontinued: GetAirportInformationByCountry - Get Airport Code by Country
Discontinued: GetGeoIP - Get Country by IP Address
Discontinued: ConvertTemp - Convert Temperature Unit
Discontinued: ChangeLengthUnit - Convert Length Unit
Discontinued: ConvertWeight - Convert Weight Unit
Discontinued: ChangeAreaUnit - Convert Area Unit
Discontinued: Code39 - Generate Bar Code Images in Code 39 Format
Discontinued: GenerateBarCode - Generate Bar Code Images
Discontinued: GetMortgagePayment - Calculate Mortgage Payment
Discontinued: ConversionRate - Get Currency Exchange Rate
Discontinued: GetQuote - Get Stock Quote
Discontinued: GetSunSetRiseTime - Get Sunrise and Sunset Time
Discontinued: GetWeatherByZipCode - Get Weather by ZIP Code in US
Discontinued: getTime - Get the Current Time
Discontinued: questionSearch - Search Yahoo! Questions and Answers