Getting HVUncategorizedException

Jul 8, 2010 at 7:59 AM

Hi,

I am trying to call webservice "GetApplicationSettings" from sample java program.

This is my java code:-

        Request request = new Request();
        request.setOfflineUserId("49068346-fd2e-4a4c-8d1a-307da2f923ea");
        request.setMethodName("GetApplicationSettings");
        Connection connection = ConnectionFactory.getConnection();
        HVAccessor accessor = new HVAccessor();
        accessor.send(request, connection);

I have done following steps:-

I Have created one application throgh https://config.healthvault-ppe.com/

Set application's type as default.

Put this application Id in "hv-application.properties" file.

Then after clicking on that application id link, I go to the Admin tabs of application, from there I have copied the personId, set above OfflineUserId to that Id.

I am getting following exception:-

Exception in thread "main" com.microsoft.hsg.HVException: com.microsoft.hsg.HVUncategorizedException
    at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:68)
    at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:79)
    at com.microsoft.hsg.TrialConnection.main(TrialConnection.java:62)
Caused by: com.microsoft.hsg.HVUncategorizedException
    at com.microsoft.hsg.DefaultResponseCodeTranslator.translate(DefaultResponseCodeTranslator.java:33)
    at com.microsoft.hsg.DefaultResponseStrategy.checkResponseCode(DefaultResponseStrategy.java:74)
    at com.microsoft.hsg.DefaultResponseStrategy.doWithResponse(DefaultResponseStrategy.java:65)
    at com.microsoft.hsg.HVAccessor$1$1.handleResponse(HVAccessor.java:94)
    at com.microsoft.hsg.URLConnectionTransport.doRequest(URLConnectionTransport.java:48)
    at com.microsoft.hsg.Connection.makeRequest(Connection.java:177)
    at com.microsoft.hsg.Connection.send(Connection.java:142)
    at com.microsoft.hsg.HVAccessor$1.send(HVAccessor.java:91)
    at com.microsoft.hsg.SimpleSendStrategy.doWithSender(SimpleSendStrategy.java:20)
    at com.microsoft.hsg.HVAccessor.send(HVAccessor.java:89)
    at com.microsoft.hsg.ApplicationAuthenticator.authenticate(ApplicationAuthenticator.java:143)
    at com.microsoft.hsg.ApplicationAuthenticator.authenticate(ApplicationAuthenticator.java:130)
    at com.microsoft.hsg.Connection.authenticate(Connection.java:163)
    at com.microsoft.hsg.Connection.authenticate(Connection.java:172)
    at com.microsoft.hsg.ConnectionFactory.getConnection(ConnectionFactory.java:62)
    ... 2 more

This is my request

<wc-request:request xmlns:wc-request='urn:com.microsoft.wc.request'>
<header>
<method>GetApplicationSettings</method>
<method-version>1</method-version>
<auth-session>
<auth-token>ASAAANeb1fWNPOxNji2ueEn2x+u7nGt0kSREvFO9qD25K+fjeX9xxXGErSnzarFx/HeBiGa0tbJJlO7YMXkTrSzgdAYPW8nr4IHbDHx4KmP3scpPT7n6QwgHBziy1rjJxESzC/RPdqGaA75bk+0G+HZr6M2nfCE71iM/gAdGAQUxwxBquFaUN8H/Ye7pfcMTvEnEuntKZl9eGLXDvLyV+i4ntVzrA3cF
</auth-token>
<offline-person-info><offline-person-id>49068346-fd2e-4a4c-8d1a-307da2f923ea</offline-person-id></offline-person-info>
<language>en</language>
<country>US</country>
<msg-time>2010-07-08T10:36:25+05:30</msg-time>
<msg-ttl>180000</msg-ttl>
<version>0.0.0.1</version>
<info-hash><hash-data algName='SHA1'>+FS0rMnT//A9dC7u3XviYXiUM24=</hash-data></info-hash>
</auth-session>
</header>
</wc-request:request>

I have tried to call other webservices like putThings, getpersonInfo, I am getting same error. Please let me know, what could be the reason for this?

Thanks..

Coordinator
Jul 13, 2010 at 7:37 AM

Hi manjiri,

I'm glad to see you making progress from your previous question. 

When did you download the SDK? 

There are two pieces of information that should help you out.  The exception should contain a string that tells you what went wrong.  It also contains an error code if it cannot translate the error code to a specific exception.  Both of these pieces of information are in the XML response.

Did you follow the directions here to create your own application and establish the public/private key pair?  It is essential that your client application and HealthVault's data store are in sync w.r.t your keys.

Another note, the online (web application) samples will be easier for you to code.  They automatically take care of person-id and record-id issues.  Offline applications are more advanced and require a little more understanding how HealthVault works.  The developer forums on msdn can help you there.  Each application has it's own view of a person's id and their own view of a record id so you cannot use a person-id and record-id from a different application (e.g. Application Configuration Center).

--Rob