Why am I getting an HTTP 502 (Bad Gateway) error when trying to make calls to the AWDB Web Service from a .NET application?
A
By default, .NET applications include the “HTTP” header “Expect: 100-continue”. This header causes the AWDB Web Service to return the HTTP 502 (Bad Gateway) error. This can be resolved by telling the .NET application to not include this HTTP header when making requests to the web service. Adding the following line will prevent the header from being included in requests to the AWDB Web Service. Ensure that this is set before any calls are made to the web service.
How do I determine the current version number of the AWDB Web Service?
A
To determine the currently-deployed version number and build date of the AWDB Web Service, go to https://wcc.sc.egov.usda.gov/awdbWebService/version.html. The url will return a path containing the version number and the build date
Q
I've written some calls to the AWDB Web Service. Is there a way to test these?
A
Yes. Use the AWDB Web Service Test Toolto run any methods of the Web Service, set the SOAP request, SOAP response, and see the actual data returned. This is a powerful tool that lets users look at data or test the Web Service to ensure it returns what is wanted before implementing the calls in code.
Q
I want to be sure I'm using the latest version of AWDB Web Service WSDL file. Where is it located?
The 'getHourlyData' method has parameters for 'beginDate' and 'endDate', as well as 'beginHour' and 'endHour'. The 'beginDate' and 'endDate' can start and end on a specific hour. Therefore, if you want to collect hourly data from 22:00 yesterday to 4:00 today, you can set the beginDate to 'YYYY-mm-01 22:00' to 'YYYY-mm-02 04:00' and leave the 'beginHour' and 'endHour'parameters blank (or null)
Q
How do I get hourly data for a specific hour over a date range?
A
The 'getHourlyData' method has parameters for 'beginDate' and 'endDate', as well as 'beginHour' and 'endHour'. The purpose of the'beginHour' and 'endHour' parameters are to return a subset of data for each day requested. Therefore, if you wanted to collect data for a specific hour or range of hours for every day between your begin and end dates, you would specify the beginHour and endHour parameters. For example, if you wanted the 00:00 hour data for each day from July 1 through July 4, you would set the beginDate to '2015-07-01', the endDate to '2015-07-04', the beginHour to '00:00', and the endHour to '00:00