ref 13024: DataMiner - The service must support the https protocol
https://support.d4science.org/issues/13024 Updated DataMiner now support https git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/wps@174937 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d1ec871c00
commit
f2ffbba298
|
@ -25,6 +25,7 @@
|
|||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
|
|
27
.project
27
.project
|
@ -5,11 +5,31 @@
|
|||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>de.walware.statet.r.builders.RSupport</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>de.walware.docmlet.tex.builders.Tex</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
|
@ -17,7 +37,14 @@
|
|||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
<nature>de.walware.statet.base.StatetNature</nature>
|
||||
<nature>de.walware.statet.r.RNature</nature>
|
||||
<nature>de.walware.docmlet.tex.natures.Tex</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="src/main/webapp"/>
|
||||
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
|
@ -1,5 +1,8 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="wps">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="dataminer-1.5.6-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/dataminer/dataminer">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="wps"/>
|
||||
<property name="java-output-path" value="/wps/target/classes"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
|
@ -0,0 +1,7 @@
|
|||
<root>
|
||||
<facet id="jst.jaxrs">
|
||||
<node name="libprov">
|
||||
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
|
||||
</node>
|
||||
</facet>
|
||||
</root>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.8"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="jst.jaxrs" version="2.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
|
@ -0,0 +1 @@
|
|||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1 @@
|
|||
Window
|
|
@ -0,0 +1,2 @@
|
|||
disabled=06target
|
||||
eclipse.preferences.version=1
|
|
@ -1,7 +1,12 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-1-3"
|
||||
date="2018-12-13">
|
||||
<Change>Added https support [ticket #13024]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-1-0"
|
||||
date="2017-09-24">
|
||||
<Change>Dynamic adding, removing and updating of algorithms added</Change>
|
||||
<Change>Dynamic adding, removing and updating of algorithms added
|
||||
</Change>
|
||||
<Change>Moved to SocialNetworkingService 2.0</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-0-0"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||
version="2.4">
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
<display-name>52°North Web Processing Service, Git:
|
||||
1665e1b7b2188755161d4f0f3a6acf562d0444e1 @ 2015-03-21 00:30:20
|
||||
</display-name>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.data-analysis</groupId>
|
||||
<artifactId>wps</artifactId>
|
||||
<version>1.1.2-SNAPSHOT</version>
|
||||
<version>1.1.3-SNAPSHOT</version>
|
||||
<name>WPS</name>
|
||||
|
||||
<parent>
|
||||
|
|
|
@ -29,7 +29,8 @@ public class GetCapabilitiesBuilder {
|
|||
public String getClassification(String algorithmName, ConfigurationManager configManager) throws Exception {
|
||||
// get algorithms classification:
|
||||
LOGGER.debug("Searching for a classification of " + algorithmName);
|
||||
HashMap<String, List<String>> algorithmsClassification = ProcessorsFactory.getAllFeaturesUser(configManager.getConfig());
|
||||
HashMap<String, List<String>> algorithmsClassification = ProcessorsFactory
|
||||
.getAllFeaturesUser(configManager.getConfig());
|
||||
String rightClassification = "Others";
|
||||
for (String classification : algorithmsClassification.keySet()) {
|
||||
List<String> algorithms = algorithmsClassification.get(classification);
|
||||
|
@ -45,19 +46,22 @@ public class GetCapabilitiesBuilder {
|
|||
public String buildGetCapabilities(Map<String, String[]> parameters) throws Exception {
|
||||
|
||||
LinkedHashMap<String, Object> basicInputs = new LinkedHashMap<String, Object>();
|
||||
//DONE get scope and username from SmartGears to build the get capabilities
|
||||
/* OLD CODE
|
||||
if (parameters != null) {
|
||||
if (parameters.get(ConfigurationManager.scopeParameter) != null)
|
||||
basicInputs.put(ConfigurationManager.scopeParameter, parameters.get(ConfigurationManager.scopeParameter)[0]);
|
||||
if (parameters.get(ConfigurationManager.usernameParameter) != null)
|
||||
basicInputs.put(ConfigurationManager.usernameParameter, parameters.get(ConfigurationManager.usernameParameter)[0]);
|
||||
} else {// case for testing purposes only
|
||||
if (AbstractEcologicalEngineMapper.simulationMode){
|
||||
basicInputs.put(ConfigurationManager.scopeParameter, ConfigurationManager.defaultScope);
|
||||
basicInputs.put(ConfigurationManager.usernameParameter, ConfigurationManager.defaultUsername);
|
||||
}
|
||||
}
|
||||
// DONE get scope and username from SmartGears to build the get
|
||||
// capabilities
|
||||
/*
|
||||
* OLD CODE if (parameters != null) { if
|
||||
* (parameters.get(ConfigurationManager.scopeParameter) != null)
|
||||
* basicInputs.put(ConfigurationManager.scopeParameter,
|
||||
* parameters.get(ConfigurationManager.scopeParameter)[0]); if
|
||||
* (parameters.get(ConfigurationManager.usernameParameter) != null)
|
||||
* basicInputs.put(ConfigurationManager.usernameParameter,
|
||||
* parameters.get(ConfigurationManager.usernameParameter)[0]); } else
|
||||
* {// case for testing purposes only if
|
||||
* (AbstractEcologicalEngineMapper.simulationMode){
|
||||
* basicInputs.put(ConfigurationManager.scopeParameter,
|
||||
* ConfigurationManager.defaultScope);
|
||||
* basicInputs.put(ConfigurationManager.usernameParameter,
|
||||
* ConfigurationManager.defaultUsername); } }
|
||||
*/
|
||||
ConfigurationManager configManager = new ConfigurationManager();
|
||||
TokenManager tokenm = new TokenManager();
|
||||
|
@ -70,38 +74,43 @@ public class GetCapabilitiesBuilder {
|
|||
basicInputs.put(ConfigurationManager.tokenParameter, token);
|
||||
|
||||
configManager.configAlgorithmEnvironment(basicInputs);
|
||||
LOGGER.debug("Initializing Capabilities Skeleton in scope " + configManager.getScope() + " with user " + configManager.getUsername());
|
||||
LOGGER.debug("Initializing Capabilities Skeleton in scope " + configManager.getScope() + " with user "
|
||||
+ configManager.getUsername());
|
||||
InputStream is = this.getClass().getClassLoader().getResourceAsStream("templates/wpsCapabilitiesSkeleton.xml");
|
||||
String stringTemplate = IOUtils.toString(is, "UTF-8");
|
||||
|
||||
// TODO: GET HOSTNAME AND PORT from container
|
||||
String protocol = WPSConfig.getInstance().getWPSConfig().getServer().getProtocol();
|
||||
String host = WPSConfig.getInstance().getWPSConfig().getServer().getHostname();
|
||||
String port = WPSConfig.getInstance().getWPSConfig().getServer().getHostport();
|
||||
stringTemplate = stringTemplate.replace("#HOST#", host).replace("#PORT#", port);
|
||||
stringTemplate = stringTemplate.replace("#PROTOCOL#", protocol).replace("#HOST#", host).replace("#PORT#", port);
|
||||
|
||||
LOGGER.debug("Host: " + host + " Port: " + port);
|
||||
LOGGER.debug("Protocol: "+protocol);
|
||||
LOGGER.debug("Host: " + host);
|
||||
LOGGER.debug("Port: " + port);
|
||||
|
||||
LinkedHashMap<String, String> allalgorithms = new LinkedHashMap<String, String>();
|
||||
/*
|
||||
String packageS = "org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses";
|
||||
List<Class<?>> classes = null;
|
||||
try{
|
||||
LOGGER.debug("Taking classes from /classes");
|
||||
classes = GetCapabilitiesChecker.find(packageS);
|
||||
}catch(Exception e){
|
||||
LOGGER.debug("Taking classes from the Jar");
|
||||
classes=GetCapabilitiesChecker.getClassesInSamePackageFromJar(packageS);
|
||||
}*/
|
||||
|
||||
LOGGER.info("using classloader class {} ",Thread.currentThread().getContextClassLoader().getClass().getSimpleName());
|
||||
* String packageS =
|
||||
* "org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses";
|
||||
* List<Class<?>> classes = null; try{
|
||||
* LOGGER.debug("Taking classes from /classes"); classes =
|
||||
* GetCapabilitiesChecker.find(packageS); }catch(Exception e){
|
||||
* LOGGER.debug("Taking classes from the Jar");
|
||||
* classes=GetCapabilitiesChecker.getClassesInSamePackageFromJar(
|
||||
* packageS); }
|
||||
*/
|
||||
|
||||
LOGGER.info("using classloader class {} ",
|
||||
Thread.currentThread().getContextClassLoader().getClass().getSimpleName());
|
||||
|
||||
Set<Class<?>> algorithmsClass = GcubeAlgorithmRepository.getAllAlgorithms();
|
||||
|
||||
LOGGER.info("class found with annotation Algorithm are {}", algorithmsClass.size());
|
||||
|
||||
for (Class<?> classfind : algorithmsClass) {
|
||||
org.n52.wps.algorithm.annotation.Algorithm algorithmInfo = classfind.getAnnotation(org.n52.wps.algorithm.annotation.Algorithm.class);
|
||||
org.n52.wps.algorithm.annotation.Algorithm algorithmInfo = classfind
|
||||
.getAnnotation(org.n52.wps.algorithm.annotation.Algorithm.class);
|
||||
if (algorithmInfo != null) {
|
||||
LOGGER.debug("Retrieving local declared Algorithm: " + algorithmInfo.title());
|
||||
allalgorithms.put(algorithmInfo.title(), classfind.getName());
|
||||
|
@ -116,7 +125,8 @@ public class GetCapabilitiesBuilder {
|
|||
|
||||
// TO eliminate duplicate coming from IS
|
||||
Set<String> algorithmsSet = new HashSet<String>(algorithmsInScope);
|
||||
algorithmsSet.addAll(dialoguer.getPrivateAlgorithmsInScope(AuthorizationProvider.instance.get().getClient().getId()));
|
||||
algorithmsSet.addAll(
|
||||
dialoguer.getPrivateAlgorithmsInScope(AuthorizationProvider.instance.get().getClient().getId()));
|
||||
|
||||
for (String algorithmInScope : algorithmsSet) {
|
||||
String classAlgorithm = allalgorithms.get(algorithmInScope);
|
||||
|
@ -124,7 +134,8 @@ public class GetCapabilitiesBuilder {
|
|||
LOGGER.debug("Approving " + classAlgorithm + " to capabilities ");
|
||||
String algorithmTitle = getClassification(algorithmInScope, configManager) + ":" + algorithmInScope;
|
||||
// String algorithmTitle = algorithmInScope;
|
||||
capabilities.append(processString.replace("#TITLE#", algorithmTitle).replace("#CLASS#", classAlgorithm));
|
||||
capabilities
|
||||
.append(processString.replace("#TITLE#", algorithmTitle).replace("#CLASS#", classAlgorithm));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,6 +144,4 @@ public class GetCapabilitiesBuilder {
|
|||
return stringTemplate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@ demonstration - D4Science (grant no. 212488), D4Science-II (grant no.
|
|||
(grant no. 283644);
|
||||
* the H2020 research and innovation programme - BlueBRIDGE (grant no. 675680),
|
||||
EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant
|
||||
no. 654119), SoBigData (grant no. 654024), AGINFRA PLUS (grant no. 731001).
|
||||
no. 654119), SoBigData (grant no. 654024);
|
||||
|
||||
|
||||
Version
|
||||
--------------------------------------------------
|
||||
|
||||
1.1.1-SNAPSHOT (2018-10-12)
|
||||
1.1.3-SNAPSHOT (2018-12-17)
|
||||
|
||||
Please see the file named "changelog.xml" in this directory for the release notes.
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-1-3"
|
||||
date="2018-12-13">
|
||||
<Change>Added https support [ticket #13024]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-1-0"
|
||||
date="2017-09-24">
|
||||
<Change>Dynamic adding, removing and updating of algorithms added</Change>
|
||||
<Change>Dynamic adding, removing and updating of algorithms added
|
||||
</Change>
|
||||
<Change>Moved to SocialNetworkingService 2.0</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.data-analysis.wps.1-0-0"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<baseDirectory>/</baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>/home/lucio/workspace/imarine/wps/distro</directory>
|
||||
<directory>/home/giancarlo/workspaceDataMinerService/wps/distro</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useDefaultExcludes>true</useDefaultExcludes>
|
||||
<includes>
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
<Packages>
|
||||
<Software>
|
||||
<Name>wps</Name>
|
||||
<Version>1.1.1-SNAPSHOT</Version>
|
||||
<Version>1.1.3-SNAPSHOT</Version>
|
||||
<MavenCoordinates>
|
||||
<groupId>org.gcube.data-analysis</groupId>
|
||||
<artifactId>wps</artifactId>
|
||||
<version>1.1.1-SNAPSHOT</version>
|
||||
<version>1.1.3-SNAPSHOT</version>
|
||||
</MavenCoordinates>
|
||||
<Files>
|
||||
<File>wps.jar</File>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||
version="2.4">
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
<display-name>52°North Web Processing Service, Git:
|
||||
1665e1b7b2188755161d4f0f3a6acf562d0444e1 @ 2015-03-21 00:30:20
|
||||
</display-name>
|
||||
|
|
Loading…
Reference in New Issue