<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reviving The Health Revolution &#187; Open Source</title>
	<atom:link href="http://healthblog.vitraag.com/topics/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://healthblog.vitraag.com</link>
	<description>A view from inside the HealthVault</description>
	<lastBuildDate>Tue, 27 Jul 2010 18:12:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enhanced HealthVault Java Library!</title>
		<link>http://healthblog.vitraag.com/2009/12/enhanced-healthvault-java-library/</link>
		<comments>http://healthblog.vitraag.com/2009/12/enhanced-healthvault-java-library/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 03:54:23 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/2009/12/enhanced-healthvault-java-library/</guid>
		<description><![CDATA[The first release (R1.0) of HealthVault Java Library has been very successful and is being extensively used by HealthVault partners. This library provides basic capabilities to authenticate and exchange XML with HealthVault platform.
Over last few months, thanks to Rob, Siddhartha &#38; Ali we have gained some momentum in developing this library. The current beta release [...]]]></description>
			<content:encoded><![CDATA[<p>The first release (<a href="http://healthvaultjavalib.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35488">R1.0</a>) of <a href="http://healthvaultjavalib.codeplex.com/">HealthVault Java Library</a> has been very successful and is being extensively used by HealthVault partners. This library provides basic capabilities to authenticate and exchange XML with HealthVault platform.</p>
<p>Over last few months, thanks to Rob, Siddhartha &amp; Ali we have gained some momentum in developing this library. The current beta release (<a href="http://healthvaultjavalib.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35562">JAXB integration</a>) includes beginnings of an object model for HealthVault methods and types.&#160; Kudos to Rob for some great work here.</p>
<p>If you are already using the community supported HealthVault Java Library, I would encourage you to<strong> try</strong>&#160; the new <a href="http://healthvaultjavalib.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35562">JAXB Integration release</a>. It will be great to get your feedback before we make this work as our core development codebase. If you are new to working with HealthVault from Java please follow the <a href="http://healthvaultjavalib.codeplex.com/wikipage?title=Getting%20Started&amp;referringTitle=Home">getting started guide</a>.</p>
<p><strong>Looking forward to comments, feedback and contributions!</strong></p>
<p><a href="http://healthvaultjavalib.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35562"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://healthblog.vitraag.com/wp-content/uploads/2009/12/image1.png" width="199" height="96" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/12/enhanced-healthvault-java-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with HealthVault XML APIs</title>
		<link>http://healthblog.vitraag.com/2009/03/working-with-healthvault-xml-apis/</link>
		<comments>http://healthblog.vitraag.com/2009/03/working-with-healthvault-xml-apis/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 23:58:31 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=79</guid>
		<description><![CDATA[Last year I did an N-part series about working with HealthVault XML APIs. It was implemented with ruby on UBuntu Linux system using OpenSSL. I got time to go mark all those articles with next links and I thought i would summarize the series here:

Part 1:  Working with certificates using OpenSSL 
Part 2:  [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I did an N-part series about working with HealthVault XML APIs. It was implemented with ruby on UBuntu Linux system using OpenSSL. I got time to go mark all those articles with next links and I thought i would summarize the series here:</p>
<ol>
<li>Part 1: <a href="http://healthblog.vitraag.com/2008/03/openssl-and-working-with-healthvault/"> Working with certificates using OpenSSL </a></li>
<li>Part 2: <a href="http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/"> Talking to HealthVault anonymously </a></li>
<li>Part 3: <a href="http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/"></a><a href="http://healthblog.vitraag.com/2008/04/long-tail-tale-getting-an-auth-token-sure-openhealthvault-can/">Authenticating your application with HealthVault</a></li>
<li>Part 4: <a href="http://healthblog.vitraag.com/2008/06/doing-user-authentication-with-healthvault/">Authenticating the user in context of your application with HealthVault</a></li>
<li>Part 5: <a href="http://healthblog.vitraag.com/2008/06/lighting-it-up/"> Putting it all together</a></li>
<li>Part 6: <a href="http://healthblog.vitraag.com/2008/08/putthings-for-offline-access/">Doing offline access with HealthVault</a></li>
</ol>
<p>Related Post:</p>
<ul>
<li><a href="http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/">Looking at XML over the wire using HealthVault .NET SDK</a></li>
</ul>
<p>One of our partners has also implemented <a href="http://blogs.msdn.com/familyhealthguy/archive/2008/07/15/super-simple-connectivity-with-dopu.aspx">Drop Off Pick Up</a> solution in ruby using the above articles. Hopefully sometime in near future, I&#8217;ll convince them to do a blog post about the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2009/03/working-with-healthvault-xml-apis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Well you can SVN on CodePlex now!</title>
		<link>http://healthblog.vitraag.com/2008/09/well-you-can-svn-on-codeplex-now/</link>
		<comments>http://healthblog.vitraag.com/2008/09/well-you-can-svn-on-codeplex-now/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 20:48:39 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=42</guid>
		<description><![CDATA[So CodePlex  launched support for TortoiseSVN, more details about it are here. In the past there have been a couple of HealthVault projects which chose to do something else since SVN was not available on CodePlex, so this is a really great news. The SVN support is through SVN Bridge &#8211; essentially CodePlex is [...]]]></description>
			<content:encoded><![CDATA[<p>So <a href="http://www.codeplex.com/">CodePlex </a> launched support for TortoiseSVN, more details about it are <a href="http://blogs.msdn.com/codeplex/archive/2008/09/14/codeplex-launches-support-for-tortoisesvn.aspx">here</a>. In the past there have been a couple of HealthVault projects which chose to do something else since SVN was not available on CodePlex, so this is a really great news. The SVN support is through SVN Bridge &#8211; essentially CodePlex is now hosting a bridge server which will let you talk to the native TFS project using a SVN client. Well &#8211; may be you can check out the <a href="http://www.codeplex.com/HealthVaultD2C">HealthVaultD2C </a>sample using TortoiseSVN now <img src='http://healthblog.vitraag.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/09/well-you-can-svn-on-codeplex-now/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PutThings for OfflineAccess</title>
		<link>http://healthblog.vitraag.com/2008/08/putthings-for-offline-access/</link>
		<comments>http://healthblog.vitraag.com/2008/08/putthings-for-offline-access/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 16:46:57 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=40</guid>
		<description><![CDATA[Folks trying to talk through raw xml layer with HealthVault have asked this a few times &#8211; so i thought I&#8217;ll put it up here, thanks to Rob for digging the XML.
The key to do a PutThings for an application in offline mode is the following snippet in the auth-session:

11111111-1111-1111-1111-111111111111

An application with OfflineAccess is ready [...]]]></description>
			<content:encoded><![CDATA[<p>Folks trying to talk through raw xml layer with <a href="http://en.wikipedia.org/wiki/Microsoft_HealthVault" title="Microsoft HealthVault" rel="wikipedia" class="zem_slink">HealthVault</a> have asked this a few times &#8211; so i thought I&#8217;ll put it up here, thanks to Rob for digging the XML.</p>
<p>The key to do a PutThings for an application in offline mode is the following snippet in the auth-session:</p>
<pre name="code" class="html"><offline-person-info>
<offline-person-id>11111111-1111-1111-1111-111111111111</offline-person-id>
</offline-person-info></pre>
<p>An application with OfflineAccess is ready to publish data in a users record once it successfully does the CreateAuthenticateSession call. Here is a sample PutThings call:</p>
<pre name="code" class="html"><wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
<auth>
<hmac-data algname="HMACSHA1">Ax4hxwu+7BAkrH62g8tUvjNzpEQ=</hmac-data>
</auth>
<header>
<method>PutThings</method>
<method-version>1</method-version>
<record-id>22210250-3d35-4170-bffa-514e12e7f925</record-id>
<auth-session>
<auth-token>ASAAAEJsFrdImoBPhEuDFRUObCKOvcbsicri3tSAaYRo+dQIg1Rsl9/Au7pM2YYfTdN2z0VlRnz4G5iCaSjXIFQGiG98qmaKy8IMt63b1FMahGKC13JVjpBA7LOAvKgpOkv7GJm7xrUlEyQWwSL39dzMTcuiyLB12hugNYIBB9r8pYOJhlLcD/Y0lEDHMTH+XbqZXSdF0SAoq60OWEXkPhTeaKrN8fNq</auth-token>
<offline-person-info><offline-person-id>11111111-1111-1111-1111-111111111111</offline-person-id>
</offline-person-info>
<language>en</language>
<country>US</country>
<msg-time>2008-08-13T00:24:58.126-07:00</msg-time>
<msg-ttl>60</msg-ttl>
<version>0.0.0.1</version>
<info-hash>
<hash-data algname="SHA1">v08Nd7MFCdO8aDwIOFJvU/0TpWw=</hash-data>
</info-hash>
</auth-session>
<info>
<thing>
<type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id>
<data-xml>
<weight>
<when><date><y>2008</y><m>8</m><d>13</d></date><time><h>0</h><m>24</m><s>58</s></time></when><value><kg>777</kg><display units="lb" units-code="lb">777</display></value>
</weight>
<common></common>
</data-xml>
</thing>
</info>
</header>

</wc-request:request></pre>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/7b7dc416-c01b-4627-9d38-76d92da8418c/" title="Zemified by Zemanta"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=7b7dc416-c01b-4627-9d38-76d92da8418c" alt="Reblog this post [with Zemanta]"></a></div>
<p>Related Article: <a href="http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/"> Whats Under the hood of HealthVault SDK</a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/08/putthings-for-offline-access/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lighting it up!</title>
		<link>http://healthblog.vitraag.com/2008/06/lighting-it-up/</link>
		<comments>http://healthblog.vitraag.com/2008/06/lighting-it-up/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 10:24:19 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=34</guid>
		<description><![CDATA[Alrite now that you have the firewood (application auth token) and the firestarter (user auth token) how can we start the fire (get details user&#8217;s record).
Well first of all congratulations! most of the hard part is done!! Just a few more nitty gritty tricks though! In order to get the details about a user&#8217;s health [...]]]></description>
			<content:encoded><![CDATA[<p>Alrite now that you have the firewood (application auth token) and the firestarter (user auth token) how can we start the fire (get details user&#8217;s record).</p>
<p>Well first of all congratulations! most of the hard part is done!! Just a few more nitty gritty tricks though! In order to get the details about a user&#8217;s health record, you need to use a method <strong>GetPersonInfo</strong>.</p>
<p>The XML for GetPersonInfo look like this:</p>
<pre name="code" class="html">
<wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
<auth>
  <hmac-data algName="HMACSHA1">da9WYaQGEoseAYDOhJv2cwNIEVg=</hmac-data>
</auth>
<header>
<method>GetPersonInfo</method>
<method-version>1</method-version>
<auth-session>
<auth-token>ASAAADNt1Jwbx85MgH9vkWzAINBxBWQFCtQ+osTzGw/I0Ty27OhKFCXUb83dxI5/M2mtGYymc1gKx6qwsWEtw31ZV/tyscJwmc5dNT2o2nYJcFTf1vfi/L4R5V68ckxFrd48Rz4jhU9Yg6lDhNTymCsJSDiVJCKLqKwcHcr/QSTsytRpVXBK7LpAVBicjC3OPGCEg4XE/UGwM7ZDAXlR4AR+emiHBaPOzSQD9iYMYxAyDBYZPde8N+rDv58zFw9pjDLJJIwvhXOOLahhFvX/n5DqwAb+BpdTlE19x5P/B67kKie/zDtEYWHEXHMhX+KNdvrxdm17l5pwt8JShIGimbXgAcZEFTiPVOW77mCgDxpc0U2ykcG7RVqXKTA3Gqt42OZf9aCuzq/J0wHOTLQvdx1ZYVOxo7+1TpMaW+13Fz5/jgOHR7hJZ/DPUIcKfCYdHS7phQ3r60nOReUl2qeq7rDvDmGQBWPjcCrT7CuQRSgZlyUpAav4DiFJtKh9U5DbJ5VW80dUAqcxamulklTxSR75Sb6v0X4T8B2zbfmVl+HtcupUIuz66Q==</auth-token>
<user-auth-token>ASAAAE57vlXwS8VDupO6/FSWlMZR+OL02JQyhWvlesegc/J6f7XGgJq4xRW1WIWc7ZXufY9U1cAFeQMDF9pAvmNG1/1KGlp7FFFBdrUMk7gJLPpdTYkQeDMdp8UXcXNht+U6hJzpI7plchQKvpBMFeBj1XMOC15fLXRyfRFpD3RaIF66awgUVw==</user-auth-token>
</auth-session>
<language>en</language>
<country>US</country>
<msg-time>2008-06-01T02:44:16.73Z</msg-time>
<msg-ttl>1800</msg-ttl>
<version>0.9.1712.2902</version>
<info-hash>
<hash-data algName="SHA1">1mWxpY+leClypXQzPvDBLFIBDpI=</hash-data>
</info-hash>
</header>
<info/>
</wc-request:request>
</pre>
<p>So now do we go about concoting the seemingly complicated xml above. Well we already have the token and wctoken from our previous CreateAuthenticatedSession and Shell -redirect. Use the token for the auth-token in line 9 and the wctoken as user-token in line 10.</p>
<p>Most of the elements in the header section are straight forward. The one to comment about is hash-data (line 18). The hash in this case is SHA-1 hash of the info section. Matter of fact our info section is empty so that make sure that the SHA-1 hash is done right. In ruby i do it the following way (using OpenSSL):</p>
<pre name="code" class="ruby">
  def self.doSha1(text)
    Base64.encode64(OpenSSL::Digest::SHA1.digest(text)).chomp
  end
</pre>
<p>Now the interesting part &#8211; whats this auth on line 2? Well auth is a HMAC of header (line 5-20) section. Remember we generated the shared secret in CreateAutheticatedSession method? Now use that secret to do a HMAC digest for the header. In ruby i do it the following way:</p>
<pre name="code" class="ruby">
  def self.doHmac(secret, payload)
    key = Base64.decode64(secret)
    hashmac = OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1.new(key), key, payload)
    Base64.encode64(hashmac).chomp
  end
</pre>
<p>secret is the shared secret used for createauthenticationtoken.</p>
<p>Now the fun part,caveats:</p>
<ul>
<li>Don&#8217;t leave any white spaces between you xml tags. HealthVault behaves weird sometime when their is white space.</li>
<li>If you are getting an error saying code 3 (which implied invalid xml) and you are sure that your xml is correct, then most likely your auth section or your hash-data section are not proper. Which in turn implies that your HMAC-ing or SHA-1 hashing is a little off. The best way to actually resolve this is to first write tiny parts which make sure that the HMAC /SHA-1 is same for a known successfully call. You can get the xml for such a call from HealthVault SDK, the process is described <a href="http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/">here</a>. However for ease of testing i&#8217;m appending know good calls below.
</ul>
<p><strong>PLEASE NOTE</strong>: Remove all the white-space between tags before testing your crypto functions to match the result seen here. I have put the white space for readability.</p>
<p>CreateAuthenticatedSessionToken (for SharedSecret)</p>
<pre name="code" class="html">
<wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
<header>
<method>CreateAuthenticatedSessionToken</method>
<method-version>1</method-version>
<app-id>05a059c9-c309-46af-9b86-b06d42510550</app-id>
<language>en</language>
<country>US</country>
<msg-time>2008-06-01T02:44:16.21Z</msg-time>
<msg-ttl>1800</msg-ttl>
<version>0.9.1712.2902</version>
</header>
<info>
<auth-info>
<app-id>05a059c9-c309-46af-9b86-b06d42510550</app-id>
<credential><appserver>
<sig digestMethod="SHA1" sigMethod="RSA-SHA1" thumbprint="50054D4FAEE16F69AAF66B7596ED30F9922B949E">b2uCbONZDGj8jDYhz3e5PcJfugPQTHOsOvpZ6kA9uG5XzQXV+EHtXtTDAbwHbFyNozC1uR7uZwgi44pfgw4NyQp8LO2PwI9E7pOx/Ho7+6siY41sjI5+frhq2fcj8iljpG8EK07WGDuf4JeFg5yc8IWjHHtUwabpdPVJWYLi18+Gk7AaFfCuM1iQwFbBSWWMyckCe3V48JaCZcNVcS/XuJJovFdsM9QnZ1CwrQaaBB/evf1u1YGM3fXpVeCjVWPXpHiu3WWVVsJ5aURtCzGvXJe9R7Gh10sYDSG6wC/CJvcBSJlRCpacA1qds2gcMCBwO+iDCPY3I15+FbM0E9D+Qw==</sig>
<content>
<app-id>05a059c9-c309-46af-9b86-b06d42510550</app-id>
<shared-secret><hmac-alg algName="HMACSHA1">RXziN4RDYIu89cu+cOp4POLhKUCSUb0sPsV9yaz8m6BfJxjpDNUBRUF5MU3OJMJ7DH0FPXg8HFuahbvSz1HxG1Q6MlahpHAmUkXNBJ0zcrKvcH3+NiS3qD26FkpLXsvzjNv/QSxwqRMpYnDhY11RkUkOvz2M2Ybg9H5aEe7RpfYCYwEAudpj05J2KEFMP2WO1Q6Kz8hjIhf2QdswgzvLueUQ2ajG8Al9DvpGWLKl4dGNqnY1/FUnJOZq/nPivTYHYOcH/qpC5euWIt7bU6hXRehAIC9IYTbHG32jLBoIxhM79Wtj2sRdn4j3SBk/QVqQNXyPrAgFIzmtR7CSaN393A==</hmac-alg>
</shared-secret></content>
</appserver></credential></auth-info></info></wc-request:request>
</pre>
<p>Successful GetPersonInfo using the above SharedSecret:</p>
<pre name="code" class="html">
<wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
<auth><hmac-data algName="HMACSHA1">da9WYaQGEoseAYDOhJv2cwNIEVg=</hmac-data></auth>
<header><method>GetPersonInfo</method>
<method-version>1</method-version>
<auth-session>
<auth-token>ASAAADNt1Jwbx85MgH9vkWzAINBxBWQFCtQ+osTzGw/I0Ty27OhKFCXUb83dxI5/M2mtGYymc1gKx6qwsWEtw31ZV/tyscJwmc5dNT2o2nYJcFTf1vfi/L4R5V68ckxFrd48Rz4jhU9Yg6lDhNTymCsJSDiVJCKLqKwcHcr/QSTsytRpVXBK7LpAVBicjC3OPGCEg4XE/UGwM7ZDAXlR4AR+emiHBaPOzSQD9iYMYxAyDBYZPde8N+rDv58zFw9pjDLJJIwvhXOOLahhFvX/n5DqwAb+BpdTlE19x5P/B67kKie/zDtEYWHEXHMhX+KNdvrxdm17l5pwt8JShIGimbXgAcZEFTiPVOW77mCgDxpc0U2ykcG7RVqXKTA3Gqt42OZf9aCuzq/J0wHOTLQvdx1ZYVOxo7+1TpMaW+13Fz5/jgOHR7hJZ/DPUIcKfCYdHS7phQ3r60nOReUl2qeq7rDvDmGQBWPjcCrT7CuQRSgZlyUpAav4DiFJtKh9U5DbJ5VW80dUAqcxamulklTxSR75Sb6v0X4T8B2zbfmVl+HtcupUIuz66Q==</auth-token>
<user-auth-token>ASAAAE57vlXwS8VDupO6/FSWlMZR+OL02JQyhWvlesegc/J6f7XGgJq4xRW1WIWc7ZXufY9U1cAFeQMDF9pAvmNG1/1KGlp7FFFBdrUMk7gJLPpdTYkQeDMdp8UXcXNht+U6hJzpI7plchQKvpBMFeBj1XMOC15fLXRyfRFpD3RaIF66awgUVw==</user-auth-token>
</auth-session>
<language>en</language><country>US</country><msg-time>2008-06-01T02:44:16.73Z</msg-time>
<msg-ttl>1800</msg-ttl><version>0.9.1712.2902</version><info-hash><hash-data algName="SHA1">1mWxpY+leClypXQzPvDBLFIBDpI=</hash-data></info-hash>
</header>
<info />
</wc-request:request>
</pre>
<p>Sweet!!! you wanna check out th lighted application? Well its <a href="http://openhealthvault.vitraag.com">live&#8230;</a> (Please Note: it will prompt you yo sign in with HealthVault id, its still rough around edges and doesn&#8217;t deal with corner cases).</p>
<p>So lets see your LAMPR application lighted up soon.. </p>
<p>Next time: <a href="http://healthblog.vitraag.com/2008/08/putthings-for-offline-access/">How to do offline access and use PutThings </a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/06/lighting-it-up/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Doing User Authentication with HealthVault</title>
		<link>http://healthblog.vitraag.com/2008/06/doing-user-authentication-with-healthvault/</link>
		<comments>http://healthblog.vitraag.com/2008/06/doing-user-authentication-with-healthvault/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 09:46:50 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=33</guid>
		<description><![CDATA[My previous post with regards to writing the HealthVault Ruby Library demonstrated how one goes about authentication their application with HealthVault. Now that you have successfully gotten HealthVault to trust your application how do you make sure that the user who logs in is a valid user. In the HealthVault lingo this is called user [...]]]></description>
			<content:encoded><![CDATA[<p>My previous post with regards to writing the HealthVault Ruby Library demonstrated how one goes about authentication their application with HealthVault. Now that you have successfully gotten HealthVault to trust your application how do you make sure that the user who logs in is a valid user. In the HealthVault lingo this is called user authentication. </p>
<p>To successfully do a user authentication, an application must:</p>
<ul>
<li>Redirect the user to HealthVault shell sign-in page.</li>
<li>Receive a token identifying the current user on a pre-registered URL with HealthVault, and use that token to do any user related transactions with HealthVault hence onwards. This token is valid for 20 minutes.</li>
</ul>
<p>Now, in code it looks like follows lets assume that you application has a pre-registered URL of http://localhost:3000/healthvault/redirect. When a user wants to login, you actually redirect them to HealthVault shell (http://account.healthvault-ppe.com/redirect.aspx) in the following way:</p>
<pre name="code" class="html">
redirect_to "https://account.healthvault-ppe.com/redirect.aspx?target=AUTH&#038;targetqs=?appid=05a059c9-c309-46af-9b86-b06d42510550%26redirect%3dhttp%253a%252f%252flocalhost%253a3000%252fhealthvault%252fredirect"
</pre>
<p>Note the parameters <strong>target, appid &#038; redirect</strong> in the above URL.</p>
<p>The above redirection once successful will send the user to the page http://localhost:3000/healthvault/redirect. On this page you should read the wctoken from the URL query-string. In ruby I do this the following way:</p>
<pre name="code" class="ruby">
  def redirect
    if (request.query_parameters["target"] == "AppAuthSuccess")
      session[:wctoken] = request.query_parameters["wctoken"]
      redirect_to :controller => 'healthvault', :action => 'index'
    end
  end
</pre>
<p>Voila!! you have the much needed wctoken. In the next article we will what can we do with this magic wctoken!</p>
<p>Next time: <a href="http://healthblog.vitraag.com/2008/06/lighting-it-up/">Putting it all together! </a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/06/doing-user-authentication-with-healthvault/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Curious about whats under the HealthVault SDK&#8217;s hood?</title>
		<link>http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/</link>
		<comments>http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 09:23:54 +0000</pubDate>
		<dc:creator>vaibhavb</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://healthblog.vitraag.com/?p=32</guid>
		<description><![CDATA[HealthVault SDK provides a very useful feature to check under its hood! One can turn-on the tracing for the SDK very easily. The trace log is very helpful for

Debugging the SDK
Looking at the raw-xml exchanged between your application and HealthVault platform. The Raw XML in turn is very useful if you are:

Trying to write-xml in [...]]]></description>
			<content:encoded><![CDATA[<p>HealthVault SDK provides a very useful feature to check under its hood! One can turn-on the tracing for the SDK very easily. The trace log is very helpful for</p>
<ul>
<li>Debugging the SDK</li>
<li>Looking at the raw-xml exchanged between your application and HealthVault platform. The Raw XML in turn is very useful if you are:
<ul>
<li>Trying to write-xml in the thing types </li>
<li>Trying to write a HealthVault wrapper library in you favorite language</li>
<li> Just curious to look under the hood:)</li>
</ul>
</li>
</ul>
<p>To look at the trace log add the following in configuration section of your web.config. One you run you application with settings below, a sdk.log file will be generated in the base directory of the website. You can also provide an absolute path for sdk.log to a directory where you web process has a write access.</p>
<pre name="code" class="xml">
  <system.diagnostics>
    <sources>
      <source name="HealthVaultTraceSource" switchName="HealthVaultTraceSourceSwitch"
        switchType="System.Diagnostics.SourceSwitch" >
<listeners>
          <add name="fileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="sdk.log" />
          <remove name ="Default" />
        </listeners>
      </source>
    </sources>
    <switches>
      <!-- You can set the level at which tracing is to occur -->
      <add name="HealthVaultTraceSourceSwitch" value="All" />
      <!-- You can turn tracing off -->
      <!--add name="HealthVaultTraceSourceSwitch" value="Off" -->
    </switches>
  </system.diagnostics>
</pre>
<p>NOTE: In case the file doesn&#8217;t get generated, make sure your web process has write access to the directory sdk.log is getting generated in.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/06/curious-about-whats-under-the-healthvault-sdks-hood/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Long Tail Tale &#8211; Getting an Auth Token, sure OpenHealthVault can!</title>
		<link>http://healthblog.vitraag.com/2008/04/long-tail-tale-getting-an-auth-token-sure-openhealthvault-can/</link>
		<comments>http://healthblog.vitraag.com/2008/04/long-tail-tale-getting-an-auth-token-sure-openhealthvault-can/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 07:02:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://www.healthblog.vitraag.com/?p=29</guid>
		<description><![CDATA[Alrite finally i got the OpenSSL Crypto to work HealthVault. It took some Ninja hacking and quite a lot of debugging to figure out what was going wrong with signing of a xml for getting an authentication token from HealthVault. Turns out that my signing code was dead on but HealthVault didn&#8217;t quite like the [...]]]></description>
			<content:encoded><![CDATA[<p>Alrite finally i got the OpenSSL Crypto to work HealthVault. It took some Ninja hacking and quite a lot of debugging to figure out what was going wrong with signing of a xml for getting an authentication token from HealthVault. Turns out that my signing code was dead on but HealthVault didn&#8217;t quite like the white space in the &#8220;content&#8221; section. I wont belabor you more but the short of the long is that now OpenHealthVault can talk to HealthVault and get itself authenticated. As usual the code is at <a href="http://svn.vitraag.com/openhealthvault">http://svn.vitraag.com/openhealthvault</a> and the application in action is at <a href="http://openhealthvault.vitraag.com">http://openhealthvault.vitraag.com</a>. Well now its time to get a user to be authenticated with HealthVault Shell and the Rails goodies, I expect these to flow rather smoothly.</p>
<p>Next part : <a href="http://healthblog.vitraag.com/2008/06/doing-user-authentication-with-healthvault/"> Doing User Authentication </a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/04/long-tail-tale-getting-an-auth-token-sure-openhealthvault-can/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Microsoft and Opensource &#8211; a new age</title>
		<link>http://healthblog.vitraag.com/2008/04/microsoft-and-opensource-a-new-age/</link>
		<comments>http://healthblog.vitraag.com/2008/04/microsoft-and-opensource-a-new-age/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 18:29:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.healthblog.vitraag.com/?p=28</guid>
		<description><![CDATA[This post by John Lam, highlights the change of tide at Microsoft. The company is actively trying to court opensource, notable measures in this direction are:

See the code &#8211; Opensourcing .NET framework
Resources for interoperating &#8211; The Opensource interoperability lab
Support opensource &#8211; The Dynamic Languages Runtime

Well, you might argue that these are tactical moves and not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iunknown.com/2008/03/open-source-amb.html">This </a>post by John Lam, highlights the change of tide at Microsoft. The company is actively trying to court opensource, notable measures in this direction are:</p>
<ul>
<li>See the code &#8211; Opensourcing <a href="http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx">.NET framework</a></li>
<li>Resources for interoperating &#8211; The Opensource interoperability lab</li>
<li>Support opensource &#8211; The <a href="http://blogs.msdn.com/mmaly/archive/2008/03/23/dlr-beta-1.aspx">Dynamic Languages Runtime</a></li>
</ul>
<p>Well, you might argue that these are tactical moves and not a strategy. I let that be dictated by time and persuasion &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/04/microsoft-and-opensource-a-new-age/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talking to the public methods of healthvault platform</title>
		<link>http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/</link>
		<comments>http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 16:58:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HealthVault]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://www.healthblog.vitraag.com/?p=27</guid>
		<description><![CDATA[My last post explained a little about challenges of OpenSSL to achieve the healthvault signing for opensource LAMP/R platforms. In this post i&#8217;m showing below an actual snippet for talking to the public methods of healthvault platform.

      
        GetServiceDefinition
     [...]]]></description>
			<content:encoded><![CDATA[<p>My last post explained a little about challenges of OpenSSL to achieve the healthvault signing for opensource LAMP/R platforms. In this post i&#8217;m showing below an actual snippet for talking to the public methods of healthvault platform.</p>
<pre class="html" name="code">
      <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request">
        <method>GetServiceDefinition</method>
        <method-version>1</method-version>
        <app-id>05a059c9-c309-46af-9b86-b06d42510550</app-id>
        <language>en</language>
        <country>US</country>
        <msg-time>2010-01-01T00:00:00Z</msg-time>
        <msg-ttl>36000</msg-ttl>
        <version>0.0.0.1</version>
        <info></info>
    </wc-request:request>
</pre>
<p>Sean is starting a <a href="http://www.familyhealthguy.com/2008/03/my-new-playground.html">series</a> detailing his adventure with healthvault .NET applcations. In the same spirit i&#8217;m going to build the ruby on rails application and library through a series of posts here. The application is live at <a href="http://openhealthvault.vitraag.com/">http://openhealthvault.vitraag.com</a> and the source code is in the SVN repository at <a href="http://svn.vitraag.com/openhealthvault">http://svn.vitraag.com/openhealthvault</a>.</p>
<p>Next part: <a href="http://healthblog.vitraag.com/2008/04/long-tail-tale-getting-an-auth-token-sure-openhealthvault-can/">Getting the Auth Token</a></p>
]]></content:encoded>
			<wfw:commentRss>http://healthblog.vitraag.com/2008/04/talking-to-the-public-methods-of-healthvault-platform/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
