Documentation for library

Jun 25, 2008 at 10:11 PM
Hi, I'm interested in trying to use java to connect to healthvault.
I downloaded the initial version of the library.. There were 2 folders 'sdk' and 'ui'...
Can anyone please let me know where to start.. Is there any documentation on how to use this library?
How do I test the connection to healthvault using Java?

Thanks much,

Jul 1, 2008 at 9:41 PM
Edited Jul 1, 2008 at 9:43 PM
We are also just getting started.......sdk is the java version of the .net library. ui has web pages for testing (based on apache wicket). Creating java docs of sdk helped a lot. To test connection, set up your environment and create class:

The HVAccessor is a convenience class for sending requests to HealthVault and receiving the responses. Most of the details are hidden from the user. The sequence goes like this:

 Request request = new Request();
//populate request here
 Connection con = ConnectionFactory.getConnection();
HVAccessor accessor = new HVAccessor();
accessor.send(request, con);
Response response = accessor.getResponse();

Jul 7, 2008 at 10:20 PM
Edited Jul 14, 2008 at 6:14 PM
The source code provided comes in to libraries:  sdk and ui.  The sdk provides the barebones underlying connection and authentication facilities.  The ui provides a simple sample app demonstrating how you can use the sdk. 

The source builds with maven.  With maven you can build a jar of the sdk library, a war of the web app, build the javadoc, and/or create a project for your IDE such as eclipse.  The default build is configured with private keys to authenticate in the PPE environment. 

> cd sdk
> mvn install
> cd ../ui
> mvn package

> cd sdk
> mvn javadoc:javadoc
> cd ui
> mvn javadoc:javadoc

Create Eclipse environment
> cd sdk
> mvn eclipse:eclipse
> cd ui
> mvn eclipse:eclipse
Now import projects into Eclipse: File-->Import.
In Project-->Properties, configure the M2_REPO variable to point at your maven repository.  This is probably in <user_home>/.m2/repository.

You can run the web app directly from within Eclipse.  Select the UI project, the Run As-->Java Application.  Otherwise, take the war produced from your build above located at ui/target/jwildcat-ui.*.*-SNAPSHOT.war and install it in your servlet container. 

The application is responsible for marshaling and unmarshaling the <info> section in each HV Request.  You can find detailed schemas for each method here:

A nice little how-to included in the download would certainly be nice...