locked
HV raw xml : The XML request format does not match the format required by the method RRS feed

  • Question

  • Hello,

    I am developing a lab application using healthvault platform. I am not using any SDK.

    I am trying to consume raw xml apis.

    Please help me with the following : 

    #1. Where can I find latest document for xml api? I found this link which does not have "CreateAuthenticatedToken version-2"

    https://developer.healthvault.com/Methods

    .NET SDK is using V-2.  Please help me find correct api/document.

    #2. How to use the returned "shared-secret"? Do I need to encrypt/decypt the shared-secret when using it as key for HMAC , or I can use it as is.

    I am able to use "CreateAuthenticatedToken version-2" and I am receiving 

    <response><status><code>0</code></status><wc:info xmlns:wc="urn:com.microsoft.wc.methods.response.CreateAuthenticatedSessionToken2"><token app-id="xxxxxxxx" app-record-auth-action="NoActionRequired">AiAAAMlJAVVHjCpNjtamDmlzT5/LbN6BifPOrUfPcPEOkD/fOXFcOjys4PaRwUyoR7avZMAAAADbAIEn4He5nuCiC8HPN0GjMqzbLqsG9nEM6mWWRKXdBf8eEmdu/laRkTK94pwdFOmq8MhnZdfOz4akvKB81kP0vypbZhK9Kup5+LZhW08165Poz0lI+h+9xwxB7k3HhRTXuAiWyz1rj9vqXnCvSugVUIRMRIAA7DOMh3NPOg3/jSi7P7JsRG+K0g6W4MsezX4QhAVZ3hidZedBmdYoa3yABP/lF0+/jQSFULaVRJQZ3K0tFXOJtwNBgQuKLePAB9QgAAAAZY/SfcT+3oPP5mSv6+mhrfM2x9jpFOK9+S5HSFEfcP4gAAAAZY/SfcT+3oPP5mSv6+mhrfM2x9jpFOK9+S5HSFEfcP4=</token><shared-secret>2+koSN5nB+yEdLtnfxdlp+79ijBcgCIVIiOYIMYcNmocWKsjLR0ych7dRtGh4YtyGqSoAN6OsDXBy7fAno6D7w==</shared-secret></wc:info></response>

    #3. When I use shared-secret as is, I am getting error :The XML request format does not match the format required by the method

    Here is sample request.

    <wc-request:request xmlns:wc-request="urn:com.microsoft.wc.request"><auth><hmac-data algName="HMACSHA256">uT9+jupB2d8z4wGVW7GA4SwEQnCCFXyl3cac4LtcO0A=</hmac-data></auth><header><method>GetPersonInfo</method><method-version>1</method-version><auth-session><auth-token>AiAAAMlJAVVHjCpNjtamDmlzT5/LbN6BifPOrUfPcPEOkD/fOXFcOjys4PaRwUyoR7avZMAAAADbAIEn4He5nuCiC8HPN0GjMqzbLqsG9nEM6mWWRKXdBf8eEmdu/laRkTK94pwdFOmq8MhnZdfOz4akvKB81kP0vypbZhK9Kup5+LZhW08165Poz0lI+h+9xwxB7k3HhRTXuAiWyz1rj9vqXnCvSugVUIRMRIAA7DOMh3NPOg3/jSi7P7JsRG+K0g6W4MsezX4QhAVZ3hidZedBmdYoa3yABP/lF0+/jQSFULaVRJQZ3K0tFXOJtwNBgQuKLePAB9QgAAAAZY/SfcT+3oPP5mSv6+mhrfM2x9jpFOK9+S5HSFEfcP4gAAAAZY/SfcT+3oPP5mSv6+mhrfM2x9jpFOK9+S5HSFEfcP4=</auth-token><user-auth-token>AiAAAMlJAVVHjCpNjtamDmlzT5/NirGTyTfitxBkkEbbtWJDf7pn/sGmYZfd9RLGNz6bdIAAAAAw4ov9O+pqZWPr3n46eqYUJoz7gmUp1dIDpWIJ4SOS9FNce7mtBW7MFgHq5MSB7+holFJ06WFTCtx7cZdVU9Yypu+1+HydANpa50JzbH4D106d3SuRO8P5e6vSPEIwjqWzsV38psnZ8twO1so3glUQnjgN0HWEJIGEkN6SspM2MSAAAAAkr/hZF1p9CHqDRyk059odTyVMKFOYet4hwVNiVepUhyAAAAAkr/hZF1p9CHqDRyk059odTyVMKFOYet4hwVNiVepUhw==</user-auth-token></auth-session><culture-code>en-US</culture-code><msg-time>2015-04-12T21:01:44</msg-time><msg-ttl>1800</msg-ttl><version>1.0.0.0</version><info-hash><hash-data algName="SHA256">ZbR1gwo184c/YSTAFOCI3/p39GNdgAzv8BcW6yK9Ubg=</hash-data></info-hash></header><info /></wc-request:request>

    Here is sample response :

    <?xml version="1.0" encoding="utf-8"?><response><status><code>3</code><error><message>The XML request format does not match the format required by the method.</message></error></status></response>


    Monday, April 13, 2015 1:30 AM