Re: The query you send to NBN produce no results
I had a response from Jonathan Cooper about some of the stuff I posted previously and the reason he found that some of the exceptions I am getting was that the particular query I was running didn't produce anything. There is nothing on the NBN Gateway for species x at location y.
I replied saying:
I think there ought to be a distinction between an error - i.e. the request XML you sent is in some way incorrect, and a failure to find anything, i.e. the syntax of the request was correct but produced no result. The latter case needs to return something valid which flags "result set empty" rather than throwing an exception.
The best way to tackle this would seem to be having some specified value (e.g. "NULL") which is used as the item values in the response XML when the result set was empty. The client would then have a valid reposnse to parse but would need to test for the known no-reponse value when generating HTML.
Jon's reponse was:
Yes, I'll have a chat with Richard. I agree, no data found isn't an exception. We need to sort out how to handle it.
Stuart