ref 7167:DataMiner interface should report encoded parameters in the URL

https://support.d4science.org/issues/7167

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/data-miner-manager-cl@142801 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-02-20 16:49:55 +00:00
parent 600e94be77
commit 864d5ab8ea
1 changed files with 38 additions and 11 deletions

View File

@ -871,18 +871,31 @@ public class SClient4WPS extends SClient {
+ "&DataInputs=";
for (String key : equivalentRequestMap.keySet()) {
String value = "";
String keyEncoded = "";
try {
value = URLEncoder.encode(equivalentRequestMap.get(key),
keyEncoded = URLEncoder.encode(key, "UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error(
"Error in equivalent request creation: Unsupported Encoding for parameter="
+ key, e);
break;
}
String valueEncoded = "";
try {
valueEncoded = URLEncoder.encode(equivalentRequestMap.get(key),
"UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error(
"Error in equivalent request creation: Unsupported Encoding for key="
+ key, e);
"Error in equivalent request creation: Unsupported Encoding for value="
+ equivalentRequestMap.get(key)
+ " of parameter=" + key, e);
break;
}
equivalentRequest = equivalentRequest + key + "=" + value + ";";
equivalentRequest = equivalentRequest + keyEncoded + "="
+ valueEncoded + ";";
}
return equivalentRequest;
}
@ -1428,17 +1441,31 @@ public class SClient4WPS extends SClient {
+ computationProperties.get("operator_id") + "&DataInputs=";
for (String key : equivalentRequestMap.keySet()) {
String value = "";
String keyEncoded = "";
try {
value = URLEncoder.encode(equivalentRequestMap.get(key),
keyEncoded = URLEncoder.encode(key, "UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error(
"Error in equivalent request creation: Unsupported Encoding for parameter="
+ key, e);
break;
}
String valueEncoded = "";
try {
valueEncoded = URLEncoder.encode(equivalentRequestMap.get(key),
"UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error(
"Error in equivalent request creation: Unsupported Encoding for key="
+ key, e);
"Error in equivalent request creation: Unsupported Encoding for value="
+ equivalentRequestMap.get(key)
+ " of parameter=" + key, e);
break;
}
equivalentRequest = equivalentRequest + key + "=" + value + ";";
equivalentRequest = equivalentRequest + keyEncoded + "="
+ valueEncoded + ";";
}
return equivalentRequest;
}