This project has moved. For the latest updates, please go here.
1
Vote

Web Services: WaterML 2 GetValues method has error

description

When I use the WateML2 GetValues() method and I specify the startDate and endDate, the WaterML 2 document has an error. It doesn't contain any data after the xml declaration.

For example see the url:
http://worldwater.byu.edu/app/index.php/RushValley/services/cuahsi_1_1.asmx/GetValues?location=default:Ru4BNMA&variable=default:SRS_Nr_NDVI_eighthundred&startDate=2014-06-01&endDate=2015-03-18

comments

xenomorph1030 wrote Apr 2, 2015 at 1:38 PM

I dug into the code and it looks like it is expecting the inputted value to be a datetime, not just a date. If the start/end date is not supplied, it defaults to the database which is a datetime. I took your URL and tried the following: http://worldwater.byu.edu/app/index.php/RushValley/services/cuahsi_1_1.asmx/GetValues?location=default:Ru4BNMA&variable=default:SRS_Nr_NDVI_eighthundred&startDate=2014-06-01%2000:00:00&endDate=2015-03-18%2023:59:59

That seems to work, though I think that should happen programmatically. Honestly, the code needs to be cleaned up (application/helpers/hydroservices_helper.php).