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/portlets/user/data-miner-manager@142799 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
843733bae1
commit
d4d7da6c67
|
@ -733,8 +733,8 @@ public class SClient4WPS extends SClient {
|
|||
throw new Exception("Invalid processLocation: " + processUrl);
|
||||
}
|
||||
|
||||
String equivalentRequest = extractEquivalentRequestForComputation(operator,
|
||||
equivalentRequestMap);
|
||||
String equivalentRequest = extractEquivalentRequestForComputation(
|
||||
operator, equivalentRequestMap);
|
||||
|
||||
ComputationId computationId = new ComputationId(id, processUrl,
|
||||
operator.getId(), operator.getName(), equivalentRequest);
|
||||
|
@ -753,18 +753,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);
|
||||
logger.error(
|
||||
"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;
|
||||
}
|
||||
|
||||
|
@ -1288,7 +1301,6 @@ public class SClient4WPS extends SClient {
|
|||
throw new Exception("Invalid processLocation: " + processUrl);
|
||||
}
|
||||
|
||||
|
||||
String equivalentRequest = extractEquivalentRequestForResubmit(
|
||||
computationProperties, equivalentRequestMap);
|
||||
|
||||
|
@ -1311,16 +1323,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);
|
||||
logger.error(
|
||||
"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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue