I have requirement to upload audio file (.mp3 ) to microsoft healthvault using Java API.
Currently there is no sample or snippet available on web to show how exactly this requirement can be met.
Issue is Java library allows only uploading of file schema and not actual contents
there are only three set options in java library for file
- CodableValue (contentType)
there is no option to set actual content or content path in java
In C#, its available as
Microsoft.Health.ItemTypes.File file = File.CreateFromFilePath(@"C:\My Pictures\picture.jpg”, new CodableValue("image/jpg"));
I tried to add set option for path (in XML payload of file ) but I got error response XML from healthvault system
Then I went with second approach wherein I tried to upload File Schema + Blob carrying file content data using version 2 API since version 1 doesn’t supports
blobPayload under thing packet
This time file got uploaded and got listed under uploaded files head but it was again lacking blob contents since while uploading I specified typeId for file and not for Blob (which I didn’t find in API docs)
I am stuck in getting file uploaded with data on healt vault system and there is no working sample available on web for this.
Can anybody provide help on this ? Thanks in advance