HVRequestException and Status Codes

Mar 10, 2011 at 3:26 PM

Hi Rob,

I had a quick question around how HVRequestException and Status Codes are handled in SimpleRequestTemplate (JAXB package).

When I make a request using simpleRequestTemplate.makeRequest(<parameters>), and I deliberately revoked access, I get a "null" object as the GetThingsResponse. What I am looking for is one of 2 things

    a. throw an HVRequestException with status code set to the "Status Code" received from the XML response (which I can see is available in the logs).

    b. Alternately, the response code set in the getThingsResponse object returned - with the response code set to the error code received from the logs.

I see neither happening as a result of the makeRequest() call.

Is there something that I am missing - or is this functionality yet to be implemented and I need to handle the XML response on my own.

Please let me know as soon as possible.



Mar 11, 2011 at 6:54 PM
Edited Mar 11, 2011 at 10:07 PM

Hi Shyam,

This behavior changed (for the worse) on the trunk somewhere along the line after releasing 1.1.  I noticed it while working on the 1.2 release and fixed it.  The good news is that 1.2 is out and you can download it from the downloads page.  The exception should be propagated as you expect.  It was being erroneously swallowed.  The official 1.1 release was ok too, just the code from the trunk had this problem.