removed getGeonetworkCachedServerParameters from HTTP GET
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@130796 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
78a492e843
commit
44eeedec96
|
@ -26,7 +26,7 @@ public interface GeonetworkServiceInterface {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the geonetwork instance.
|
* Gets the geonetwork instance with authenticate = false and LoginLevel = null
|
||||||
*
|
*
|
||||||
* @return the geonetwork instance
|
* @return the geonetwork instance
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
|
|
|
@ -137,13 +137,17 @@ public class GeonetworkResolver extends HttpServlet{
|
||||||
logger.info("SCOPE: " + scopeValue +", Query String: " + req.getQueryString());
|
logger.info("SCOPE: " + scopeValue +", Query String: " + req.getQueryString());
|
||||||
try {
|
try {
|
||||||
|
|
||||||
ServerParameters geonetworkParams = getGeonetworkCachedServerParameters(scopeValue);
|
// ServerParameters geonetworkParams = getGeonetworkCachedServerParameters(scopeValue);
|
||||||
|
GeonetworkServiceInterface gntwAccess = new GeonetworkAccessParameter(scopeValue, null);
|
||||||
|
GeonetworkInstance gnInstance = gntwAccess.getGeonetworkInstance();
|
||||||
HTTPCallsUtils httpUtils = new HTTPCallsUtils();
|
HTTPCallsUtils httpUtils = new HTTPCallsUtils();
|
||||||
|
Configuration config = gnInstance.getGeonetworkPublisher().getConfiguration();
|
||||||
|
String geonetworkUrl = config.getGeoNetworkEndpoint();
|
||||||
// boolean authorized = GNAuthentication.login(httpUtils, geonetworkParams.getUrl(), geonetworkParams.getUser(), geonetworkParams.getPassword());
|
// boolean authorized = GNAuthentication.login(httpUtils, geonetworkParams.getUrl(), geonetworkParams.getUser(), geonetworkParams.getPassword());
|
||||||
// logger.trace("Authorized on "+geonetworkParams +" ? "+authorized);
|
// logger.trace("Authorized on "+geonetworkParams +" ? "+authorized);
|
||||||
String newQueryString = purgeScopeFromQueryString(scopeValue, req.getQueryString());
|
String newQueryString = purgeScopeFromQueryString(scopeValue, req.getQueryString());
|
||||||
logger.trace("Purged query string from "+scopeValue+" is: "+newQueryString);
|
logger.trace("Purged query string from "+scopeValue+" is: "+newQueryString);
|
||||||
String baseURL = remainValue==null ||remainValue.isEmpty()?geonetworkParams.getUrl()+"/"+CSW_SERVER:geonetworkParams.getUrl()+"/"+CSW_SERVER+remainValue;
|
String baseURL = remainValue==null ||remainValue.isEmpty()?geonetworkUrl+"/"+CSW_SERVER:geonetworkUrl+"/"+CSW_SERVER+remainValue;
|
||||||
logger.trace("New base URL "+baseURL);
|
logger.trace("New base URL "+baseURL);
|
||||||
newQueryString = purgeRemainFromQueryString(remainValue, newQueryString);
|
newQueryString = purgeRemainFromQueryString(remainValue, newQueryString);
|
||||||
logger.trace("Purged query string from "+remainValue+" is: "+newQueryString);
|
logger.trace("Purged query string from "+remainValue+" is: "+newQueryString);
|
||||||
|
|
Loading…
Reference in New Issue