Wednesday, November 21, 2012

An Introduction to WaterOneFlow Web Services


A cornerstone of the CUAHSI HIS is a family of unique web services that enable data transmission. Web services are computer applications that interact, and exchange information, with other computers over the internet. The family of web services that has been developed for and employed by HIS is called WaterOneFlow (WOF).

WOF uses a set of functions to query to retrieve information from a HydroServer and the data is returned in a specific type of XML, WaterML, which has been specifically designed to transmit water data across the internet. The functions used are as follows:

Get Sites: Returns sites in a data source including location
Get Site Info: Returns information about any time series located at a specific site such as variables measured, start & end dates of observations, and units.
Get Variable Info: Returns information about a specific times series such as units, value type, data type, and sample medium.
Get Values: Returns values of a specific time series.

An easy way to become acquainted with these web services is by using HydroExcel, which is one of the CUAHSI clients that has been developed for retrieving water data registered in HIS. HydroExcel is Microsoft Excel spreadsheet that  uses VBA macros and an object library called HydroObjects to communicate with and retrieve data from WaterOneFlow web services.

HydroExcel is especially useful if you know what data source you are interested in, but is not as useful if you are trying to search over multiple data sources. When first opening HydroExcel, you are presented with the list of registered data services in HIS Central. To look at data, and metadata, you must simply copy the WSDL Location from a respective service and paste this URL into the WSDL Location box at the top of the Data Source tab.

The Data Source tab of HydroExcel. Be sure to enable macros and to refresh the list of services from HIS Central when the file is first opened.

After pasting the URL for your data source, you can invoke the individual web services by clicking on the buttons on the data source sheet (i.e. Get Sites, Get Variables, etc.). Clicking these will bring you to other sheets in the file where additional functionality is available. 



No comments:

Post a Comment