diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java index 1aba957f9befabe705247ac6a07a846c2fb7bdb8..3be36fd622bde97412daacf3752c6b4bcb3f6c43 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java @@ -31,7 +31,6 @@ import ch.systemsx.cisd.common.exceptions.InvalidSessionException; import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream; import ch.systemsx.cisd.openbis.dss.client.api.v1.IDataSetDss; import ch.systemsx.cisd.openbis.dss.client.api.v1.IDssComponent; -import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.DataStoreApiUrlUtilities; import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.FileInfoDssDTO; import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric; import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO; @@ -435,7 +434,7 @@ class AuthenticatedState extends AbstractDssComponentState */ private String getDataStoreUrlFromDataStore(DataStore dataStore) { - return DataStoreApiUrlUtilities.getDataStoreUrlFromDataStore(dataStore); + return dataStore.getDownloadUrl(); } @Override diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServer.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServer.java index c38094d80dee3284ee39b6587a6da08f6b2c6fc7..6d592a2d23d27e9d3b0907fb703904300ffe4279 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServer.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServer.java @@ -200,9 +200,9 @@ public class DataStoreServer /** * Initialize RPC service interfaces */ - // TODO: The registration process here needs to be made cleaner -- perhaps by using Spring and - // the dssApplicationContext.xml more effectively, or perhaps by using annotations and - // reflection. + // TODO 2010-06-01, CR : The registration process here needs to be made cleaner. + // Perhaps by using Spring and the dssApplicationContext.xml more effectively, or perhaps by + // using annotations and reflection. private static void initializeRpcServices(final Context context, final ApplicationContext applicationContext, final ConfigParameters configParameters) { @@ -214,14 +214,24 @@ public class DataStoreServer // Export the spring bean to the world by wrapping it in an HttpInvokerServlet String rpcV1Suffix = "/rmi-dss-api-v1"; - String rpcV1Path = rpcV1Suffix; + String rpcV1Path = "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME + rpcV1Suffix; context.addServlet(new ServletHolder(new HttpInvokerServlet(v1ServiceExporter, rpcV1Path)), rpcV1Path); - // Inform the name server about the services I export - // N.b. In the future, this could be done using spring instead of programmatically HttpInvokerServiceExporter nameServiceExporter = ServiceProvider.getRpcNameServiceExporter(); + String nameServerPath = + "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME + + IRpcServiceNameServer.PREFFERED_URL_SUFFIX; + context.addServlet(new ServletHolder(new HttpInvokerServlet(nameServiceExporter, + nameServerPath)), nameServerPath); + + RpcServiceInterfaceVersionDTO nameServerVersion = + new RpcServiceInterfaceVersionDTO(IRpcServiceNameServer.PREFFERED_SERVICE_NAME, + IRpcServiceNameServer.PREFFERED_URL_SUFFIX, 1, 0); + + // Inform the name server about the services I export + // N.b. In the future, this could be done using spring instead of programmatically RpcServiceNameServer rpcNameServer = (RpcServiceNameServer) nameServiceExporter.getService(); @@ -229,17 +239,7 @@ public class DataStoreServer new RpcServiceInterfaceVersionDTO(DssServiceRpcGeneric.DSS_SERVICE_NAME, rpcV1Suffix, 1, 0); rpcNameServer.addSupportedInterfaceVersion(v1Interface); - - String nameServerPath = IRpcServiceNameServer.PREFFERED_URL_SUFFIX; - RpcServiceInterfaceVersionDTO nameServerVersion = - new RpcServiceInterfaceVersionDTO(IRpcServiceNameServer.PREFFERED_SERVICE_NAME, - IRpcServiceNameServer.PREFFERED_URL_SUFFIX, 1, 0); - rpcNameServer.addSupportedInterfaceVersion(nameServerVersion); - - context.addServlet(new ServletHolder(new HttpInvokerServlet(nameServiceExporter, - nameServerPath)), nameServerPath); - } private static void registerPluginServlets(Context context, List<PluginServlet> pluginServlets)