fixed this:

java.lang.IllegalArgumentException: Invalid uri 'http://geonetwork.d4science.org/geonetwork/srv/en/xml.metadata.get?uuid=EMODnet Human Activities Fisheries: Monthly first sales': Invalid query


git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@152663 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-09-05 10:36:06 +00:00
parent 65fca70e19
commit 87db1a1acf
1 changed files with 9 additions and 1 deletions

View File

@ -17,7 +17,9 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -328,7 +330,13 @@ public class GetResponseRecordFilter {
String ownerName = null;
HTTPCallsUtils httpCall = new HTTPCallsUtils();
String queryURL = geonetworkURL.endsWith("/")?geonetworkURL:geonetworkURL+"/";
queryURL+=XML_METADATA_GET_SERVICE+"?uuid="+fileIdentifier;
try {
queryURL+=XML_METADATA_GET_SERVICE+"?uuid="+URLEncoder.encode(fileIdentifier, "UTF-8");
}
catch (UnsupportedEncodingException e1) {
queryURL+=XML_METADATA_GET_SERVICE+"?uuid="+fileIdentifier;
}
HttpResponse response;
try {
logger.trace("Performing query: "+queryURL);