US Government Web Services and XML Data Sources
USGovXMLIcon.JPG
  Index   About   Contact   Help
XML Data Sources

US Government Web Services and XML Data Sources

Welcome to USGovXML. USGovXML is an index to publically available web services and XML data sources that are provided by the US government. USGovXML documents, in one place and in a uniform manner, the web services and XML data sources that are provided by the US government.

USGovXML includes source code snippets to help developers better understand how the data sources can be used. The projects in which those snippets were extracted are available for download as zip files. When you click on the Example: link, you will be redirected to a location that contains the zip file. To use these projects, developers will need Visual Studio 2008 (or later), .Net Framework 3.5 (or later) and a connection to the internet.

As a further demonstration of the utility of these data sources, some of them have been used to create mobile applets which you can access from your SmartPhone! These applets can be viewed in your mobile browser at the following URL: www.USGovXML.com/mobile. They are best viewed using IE Mobile on a Windows Mobile 6.1 platform (or later).

Another site that you may want to visit is Data.gov. The purpose of Data.gov is to "increase public access to high value, machine readable datasets generated by the Executive Branch of the Federal Government".

Terms You Need To Know

The ubiquity of the internet, its open standards and information sharing technologies make it the ideal vehicle for the exchange of information between the government, its business partners and the general public. Some of the technologies being used to facilitate the exchange of information are XML, REST, XQuery, RSS and Web Services.

Term Description
REST Representational State Transfer. Used in this site to refer to the embedding of xml data in a URL.
RSS Really Simple Syndication. It is an XML-based format for distributing and aggregating Web content. When an RSS file is viewed in an RSS reader (i.e. a browser), the information that it contains will be formatted for display. However, the RSS file can be consumed and processed programatically just as any XML file can be consumed and processed. A comprehensive listing of RSS feeds from the US Government is available at USA.gov.
SOAP Simple Object Access Protocol. It is an XML based protocol for exchanging messages between web services.
WSDL Web Services Description Language. It is an XML based language for defining the web service’s interface as well as its implementation characteristics.
XQuery A language for querying xml documents.
XML eXtensible Markup Language. It is a universal format for structured documents and data on the web.

XML in a Nutshell

XML is a technique for organizing data. The primary characteristic of XML is that the name of the data is encoded along with the data. The following example will illustrate how the name John Doe might be coded in XML:

    <name>John Doe</name>

The data, John Doe, has been enclosed between <name> and </name>. Together, <name> and </name> are referred to as a tag. Thus we say, XML data is coded as tag/value pairs. In our example, <name></name> is the tag and John Doe is the value.

Note that the only difference between the opening tag (<name>) and the closing tag (</name>) is the slash ( / ). The slash is critical and is used to denote the end of the data.

XML also supports the nesting of tag/value pairs as the following example will illustrate:

    <name>
        <firstName>John</firstName>
        <lastName>Doe</lastName>
    </name>

The <firstName> and <lastName> tags have been concatenated and nested within the <name> tag. The nesting and concatenation of tag/value pairs allows complex data structures to be represented in a way that would be very difficult in other data formatting techniques such as fixed record length or comma delimited.

Just as with other data formatting techniques, applications must agree on the structure of the xml file (i.e. document). If an application created an xml document as per the first example and passed it to an application that expected an xml document as per the second example, the application receiving the xml document would not be able to process the data correctly. Therefore, for applications to interoperate using XML documents, they must agree upon an xml document structure. To ensure that an xml document conforms to the agreed upon standard, it can be validated against an XML schema.

Among other things, the XML schema identifies the structure of the xml document, its tags and the type of the data (i.e. numeric, date, string, etc.) associated with each tag. By having a reference point with which to compare an incoming document, the application receiving the document can validate that it conforms to the standard before it begins to process it.

In its entirety, XML is a very broad topic with many books being written about it. To delve any deeper into XML is well beyond the scope of this site.

Web Services in a Nutshell

A web service is an application that provides functionality to remote applications (i.e. client) over the internet. The packet of data being exchanged between the web service and the client is called a message. The structure of the message is XML and the messaging protocol is SOAP. Messages are communicated between the web service and the client via the HTTP communications protocol. Because HTTP is also the same protocol for information exchange between web browsers and web servers, HTTP/SOAP messages can generally be exchanged between the web service and its client without additional firewall considerations.

A WSDL file is an XML file that is used to document the functionality (aka operations) that a web service provides, the data that is required to execute each of its functions, the data that is returned from the service, the URL of the service, etc.. With this information, a software developer can properly build a request message and know where to send it. The developer will also know the structure of any data being returned by the service.

 

Load and stress tested with SiteBlaster

© 2008, 2009 USGovXML. All rights reserved. Terms of Use Contact