May 18, 2011 at 4:27 PM
Edited May 18, 2011 at 7:46 PM
This type of question that isn't directly related to the Java SDK is better asked at the HealthVault forums
here. They have a number of people that can answer questions.
That said, the actionqs parameter will be appended to your redirect URL in it's entirety. You can include a path and/or query parameters. I bolded your actionqs parameter below:
Query string parameters are separated by the "&" character. Url parsing treats the string
myParamTwo=MyValueTwo as a separate query string parameter to the redirect.aspx page and is not releated to the actionqs paramter.
My suggestion is to use the following pseudo-logic: Note the use of Url encoding.
String actionqsString = URLEncoder.encode("/a/path/to/somewhere?myParamOne=MyValueOne&myParamTwo=MyValueTwo");
String targetqsString = URLEncoder.encode("appid=blablabla&redirect=http://localhost:8080/myapp&actionqs=" + actionqsString);
String redirectString = "https://account.healthvault-ppe.com/redirect.aspx?target=AUTH&targetqs?" + targetqsString;
In the end you will be redirected to "http://localhost:8080/myapp/a/path/to/somewhere?myParamOne=MyValueOne&myParamTwo=MyValueTwo".
To be fair, HealthVault redirects you to your redirect url with target=AppAuthSuccess&actionqs=%2fa%2fpath%2fto%2fsomewhere%3fmyParamOne%3dMyValueOne%26myParamTwo%3dMyValueTwo&wctoken=ADAC64...
Typically, your action page will parse the actionqs and forward the parameters along. Many action pages issue a redirect to the final destination.