git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@211 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
19cf6a6a3a
commit
f84ab38293
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="src/|build/" kind="src" path=""/>
|
||||
<classpathentry excluding="src/|build/|schema/|etc/" kind="src" path=""/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/CONTAINERLIB"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/GCUBE_CORE"/>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
package = org.gcube.informationsystem.registry
|
||||
package.dir = org/gcube/informationsystem/registry
|
||||
lib.dir = SERVICELIBS/GCUBE_ISREGISTRY
|
||||
wsdl.1 = RegistryFactory
|
||||
wsdl.2 = Registry
|
||||
|
345
build.xml
345
build.xml
|
@ -1,85 +1,76 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Ant buildfile for GCUBE Services
|
||||
<!-- Ant buildfile for GCUBE Services
|
||||
|
||||
Version 0.5
|
||||
|
||||
REQUIRED INPUT PROPERTIES
|
||||
|
||||
This buildfile assumes that the following properties have been defined in a "build.properties" file
|
||||
in the configuration directory of the service (or else using the -D flag on the command line).
|
||||
|
||||
|
||||
|
||||
Version 0.2
|
||||
|
||||
|
||||
|
||||
REQUIRED INPUT PROPERTIES (NO DEFAULTS AVAILABLE)
|
||||
|
||||
This buildfile assumes that the following properties have been defined (using the -D
|
||||
flag, or placing them in a separate "build.properties" file). Note that some of these
|
||||
properties make sense _relative_ to other properties for which this buildfile
|
||||
provides sensible default values (see below)
|
||||
|
||||
wsdl.<n>: Filename of the <n>-th wsdl file associated with the service. The script assumes up to 6 wsdls (wsdl.1, wsdl.2, wsdl.3,...).
|
||||
Further wsdls require a simple script extension (see guidelines at end of script).
|
||||
package: Root package of the service implementation: includes code and configuration.
|
||||
package.dir: Directory corresponding to $package, relative to ${base.dir} (same as ${package} but with directory separators instead of dots).
|
||||
package: Root package of the service implementation: it should be the first package in the
|
||||
implementation hierarchy which uniquely identifies the implementation.
|
||||
lib.dir: Root directory where auxiliary jar files are located. Ideally outside ${base.dir} as not needed for remote build and dynamic deployment.
|
||||
|
||||
OPTIONAL INPUT PROPERTIES (DEFAULT AVAILABLE)
|
||||
|
||||
base.dir: Root directory of the service. Defaults to ".").
|
||||
schema.dir.name: Name of the ${base.dir }subdirectory which contains the wsdl(s). Defaults to "schema".
|
||||
etc.dir.name: Name of the directory which contains the configuration (other than WSSD and JNDI). Defaults to "etc".
|
||||
stubs.dir.name: Name of the ${package.dir} subdirectory which contains auxiliary files and resources for stubs. Defaults to "stubs".
|
||||
garname: Unique name of the GAR file to be generated. Defaults to ${package}.
|
||||
wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the "name" attributed of the
|
||||
"definitions" root element of the corresponding WSDL file.
|
||||
The order imposed over port-type serves only to distinguish build properties and
|
||||
and has no particular semantics otherwise.
|
||||
This script supports by default up to 6 wsdls (wsdl.1, wsdl.2, wsdl.3,...).
|
||||
Further wsdls require a simple script extension (see guidelines at end of script).
|
||||
<wsdl>.<n>.namespace: Namespace of the <n>-th port-type of the service, as defined in the "targetNamespace" attribute
|
||||
of the "definitions" root element of the corresponding WSDL file.
|
||||
The order imposed over port-type serves only to distinguish build properties and
|
||||
and has no particular semantics otherwise.
|
||||
|
||||
-->
|
||||
|
||||
<project default="service" name="GCUBE Service Buildfile">
|
||||
|
||||
<!-- environment -->
|
||||
<property environment="env" />
|
||||
|
||||
<!-- container -->
|
||||
<property name="container.dir" location="${env.GLOBUS_LOCATION}" />
|
||||
<property name="build.packages" location="${container.dir}/share/globus_wsrf_common/build-packages.xml" />
|
||||
<property name="build.stubs" location="${container.dir}/share/globus_wsrf_tools/build-stubs.xml" />
|
||||
<!-- external environment -->
|
||||
<property name="container.dir" value="${env.GLOBUS_LOCATION}" />
|
||||
<property name="container.schema.dir" location="${container.dir}/share/schema" />
|
||||
<property name="build.packages" location="${container.dir}/share/gcore_tools/build-packages.xml" />
|
||||
<property name="build.stubs" location="${container.dir}/share/gcore_tools/build-stubs.xml" />
|
||||
|
||||
<!-- property files (will override defaults).-->
|
||||
<property file="build.properties" />
|
||||
<property file="${user.home}/build.properties" />
|
||||
<!-- load non-standard tasks -->
|
||||
<taskdef resource="ise/antelope/tasks/antlib.xml">
|
||||
<classpath>
|
||||
<pathelement location="${container.dir}/lib/AntelopeTasks_3.4.2.jar"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<!-- building environment -->
|
||||
<!-- discriminate between local and remote build -->
|
||||
<var name="etics.build" value="${env.ETICSBUILD}" />
|
||||
|
||||
<if name="etics.build" value="true">
|
||||
<else>
|
||||
<var name="etics.build" value="false"/>
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<!-- service-specific locations -->
|
||||
<property name="build.location" location="${env.BUILD_LOCATION}" />
|
||||
|
||||
<!-- service defaults -->
|
||||
<property name="service.dir" location="." />
|
||||
<property name="schema.dir.name" value="schema" />
|
||||
<property name="etc.dir.name" value="etc" />
|
||||
<property name="stubs.dir.name" value="stubs" />
|
||||
|
||||
|
||||
<property name="schema.dir" location="${service.dir}/${schema.dir.name}"/>
|
||||
<property name="etc.dir.name" value="etc" />
|
||||
<property name="etc.dir" value="${service.dir}/${etc.dir.name}" />
|
||||
<available file="${etc.dir}" property="etc.dir.present"/>
|
||||
<mkdir dir="${etc.dir}" /><!-- no effect if already exists -->
|
||||
|
||||
<property name="stubs.dir" value="${service.dir}/${package.dir}/${stubs.dir.name}" />
|
||||
<available file="${stubs.dir}" property="stubs.dir.present"/>
|
||||
<mkdir dir="${stubs.dir}" /> <!-- no effect if already exists -->
|
||||
<!-- load input properties -->
|
||||
<property file="${etc.dir}/build.properties" />
|
||||
|
||||
<stringutil property="package.dir" string="${package}"><!-- derive package.dir from ${package} -->
|
||||
<replace regex="\." replacement="/"/>
|
||||
</stringutil>
|
||||
|
||||
<property name="lib.location" value="${build.location}/${lib.dir}" />
|
||||
<available file="${lib.location}" property="lib.location.present"/>
|
||||
<mkdir dir="${lib.location}" /> <!-- no effect if already exists -->
|
||||
|
||||
<property name="mappings.file" value="${service.dir}/namespace2package.mappings" />
|
||||
|
||||
|
||||
<!-- input summary -->
|
||||
<echo message="INPUTS:" level="info"/>
|
||||
<echo message="Service Package = ${package}" level="info"/>
|
||||
<echo message="Service Directory = ${service.dir}/${package.dir}" level="info"/>
|
||||
<echo message="Schema Directory = ${schema.dir}" level="info"/>
|
||||
<echo message="Stubs Aux Directory = ${stubs.dir}" level="info"/>
|
||||
<echo message="Configuration Directory = ${etc.dir}" level="info"/>
|
||||
<echo message="Lib Aux Directory = ${lib.location}" level="info"/>
|
||||
|
||||
<property name="stubs.dir.name" value="stubs" /> <!-- auxiliary stub classes -->
|
||||
<property name="stubs.dir" value="${service.dir}/${package.dir}/${stubs.dir.name}" />
|
||||
<available file="${stubs.dir}" property="stubs.dir.present"/>
|
||||
|
||||
<!-- file defaults -->
|
||||
<property name="garname" value="${package}"/>
|
||||
|
@ -87,34 +78,16 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<property name="jarfile" value="${package}.jar" />
|
||||
<property name="jarfile.stubs" value="${package}.stubs.jar" />
|
||||
|
||||
|
||||
<!-- output summary -->
|
||||
<echo message="OUTPUTS:" level="info"/>
|
||||
<echo message="Service GAR = ${garfile}" level="info"/>
|
||||
<echo message="Service JAR = ${jarfile}" level="info"/>
|
||||
<echo message="Stubs' JAR = ${jarfile.stubs}" level="info"/>
|
||||
|
||||
<!-- Build defaults -->
|
||||
<!-- temporary build locations -->
|
||||
<property name="build.dir" location="${service.dir}/../build" />
|
||||
<property name="build.class.dir" location="${build.dir}/classes" />
|
||||
<property name="build.lib.dir" location="${build.dir}/lib" />
|
||||
<property name="build.schema.dir" location="${build.dir}/schema" />
|
||||
<property name="build.schema.service.dir" location="${build.schema.dir}/${package}" />
|
||||
|
||||
<property name="build.stubs.dir" location="${build.dir}/stubs-${package}" />
|
||||
<property name="build.stubs.src.dir" location="${build.stubs.dir}/src" />
|
||||
<property name="build.stubs.class.dir" location="${build.stubs.dir}/classes" />
|
||||
|
||||
|
||||
<!-- build profile -->
|
||||
<echo message="BUILD PROFILE:" level="info"/>
|
||||
<echo message="Directory = ${build.dir}" level="info"/>
|
||||
<echo message="Class Directory = ${build.class.dir}" level="info"/>
|
||||
<echo message="Lib Directory = ${build.lib.dir}" level="info"/>
|
||||
<echo message="Stubs Directory = ${build.stubs.dir}" level="info"/>
|
||||
<echo message="Stubs Class Directory = ${build.stubs.class.dir}" level="info"/>
|
||||
<echo message="Stubs Source Directory = ${build.stubs.src.dir}" level="info"/>
|
||||
|
||||
<!-- misc defaults -->
|
||||
<property name="java.debug" value="on" />
|
||||
<property name="java.deprecation" value="off" />
|
||||
|
@ -129,8 +102,6 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<fileset dir="${etc.dir}" id="garetc" />
|
||||
<property name="garetc.id" value="garetc" />
|
||||
|
||||
|
||||
|
||||
<!-- startup tasks -->
|
||||
<target name="stubs" depends="clean,deployStubs" description="generates, builds, jars and deploy stubs">
|
||||
</target>
|
||||
|
@ -141,12 +112,24 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<!-- initialisation tasks -->
|
||||
<target name="init" description="creates build structures">
|
||||
|
||||
<!-- input summary -->
|
||||
<echo message="Root Package -> ${package}" level="info"/>
|
||||
<echo message="Interfaces -> ${schema.dir}" level="info"/>
|
||||
<echo message="Auxiliary Stubs -> ${stubs.dir}" level="info"/>
|
||||
<echo message="Configuration -> ${etc.dir}" level="info"/>
|
||||
<echo message="External dependencies -> ${lib.location}" level="info"/>
|
||||
|
||||
<!-- output summary -->
|
||||
<echo message="Service Gar -> ${garfile}" level="info"/>
|
||||
<echo message="Service Jar -> ${jarfile}" level="info"/>
|
||||
<echo message="Stubs Jar -> ${jarfile.stubs}" level="info"/>
|
||||
|
||||
<!-- create temporary build folders -->
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.class.dir}" />
|
||||
<delete dir="${build.lib.dir}" />
|
||||
<mkdir dir="${build.lib.dir}" />
|
||||
<mkdir dir="${build.schema.service.dir}" />
|
||||
|
||||
<mkdir dir="${build.stubs.dir}" />
|
||||
<mkdir dir="${build.stubs.src.dir}" />
|
||||
<mkdir dir="${build.stubs.class.dir}"/>
|
||||
|
@ -162,172 +145,184 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<copy toDir="${build.schema.service.dir}">
|
||||
<fileset dir="${schema.dir}"/>
|
||||
</copy>
|
||||
|
||||
<if name="etics.build" value="false">
|
||||
<!-- Populates library folder -->
|
||||
<copy toDir="${build.lib.dir}">
|
||||
<fileset dir="${lib.location}">
|
||||
<exclude name="${jarfile.stubs}" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</if>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- wsdl specific tasks. Clone for each additional wsdl, if required -->
|
||||
<target name="processWSDL.1" depends="init" if="wsdl.1" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.1}'s WSDL:" level="debug"/>
|
||||
<target name="processWSDL.1" depends="init" if="wsdl.1.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.1.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.1}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.1}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.1}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.1.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.1.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.1.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.1}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.1}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.1.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.1.name}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="processWSDL.2" depends="init" if="wsdl.2" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.2}'s WSDL:" level="debug"/>
|
||||
<target name="processWSDL.2" depends="init" if="wsdl.2.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.2.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.2}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.2}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.2}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.2.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.2.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.2.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.2}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.2}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.2.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.2.name}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="processWSDL.3" depends="init" if="wsdl.3" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.3}'s WSDL:" level="debug"/>
|
||||
<target name="processWSDL.3" depends="init" if="wsdl.3.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.3.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.3}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.3}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.3}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.3.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.3.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.3.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.3}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.3}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.3.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.3.name}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="processWSDL.4" depends="init" if="wsdl.4" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.4}'s WSDL:" level="debug"/>
|
||||
<target name="processWSDL.4" depends="init" if="wsdl.4.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.4.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.4}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.4}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.4}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.4.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.4.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.4.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.4}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.4}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.4.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.4.name}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="processWSDL.5" depends="init" if="wsdl.5" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.5}'s WSDL:" level="debug"/>
|
||||
<target name="processWSDL.5" depends="init" if="wsdl.5.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.5.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.5}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.5}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.5}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.5.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.5.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.5.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.5}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.5}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.5.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.5}.name" />
|
||||
</ant>
|
||||
</target>
|
||||
<target name="processWSDL.6" depends="init" if="wsdl.6" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.6}'s WSDL:" level="debug"/>
|
||||
|
||||
<target name="processWSDL.6" depends="init" if="wsdl.6.name" description="Flattens wsdl and generate bindings">
|
||||
<echo message="PROCESSING ${wsdl.6.name}'s WSDL:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="flatten">
|
||||
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
|
||||
<property name="wsdl.source" value="${wsdl.6}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.6}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.6}PortType" />
|
||||
<property name="wsdl.source" value="${wsdl.6.name}.wsdl" />
|
||||
<property name="wsdl.target" value="${wsdl.6.name}_flattened.wsdl" />
|
||||
<property name="wsdl.porttype" value="${wsdl.6.name}PortType" />
|
||||
</ant>
|
||||
<ant antfile="${build.stubs}" target="generateBinding">
|
||||
<property name="source.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="target.binding.dir" value="${build.schema.service.dir}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.6}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.6}" />
|
||||
<property name="porttype.wsdl" value="${wsdl.6.name}_flattened.wsdl" />
|
||||
<property name="binding.root" value="${wsdl.6}.name" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="generateStubs.1" depends="mergePackageMapping" if="wsdl.1" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.1}'s STUBS:" level="debug"/>
|
||||
<target name="generateStubs.1" if="wsdl.1.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.1.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.1.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.1.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.1}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.1.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.2" depends="mergePackageMapping" if="wsdl.2" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.2}'s STUBS:" level="debug"/>
|
||||
<target name="generateStubs.2" if="wsdl.2.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.2.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.2.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.2.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.2}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.2.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.3" depends="mergePackageMapping" if="wsdl.3" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.3}'s STUBS:" level="debug"/>
|
||||
<target name="generateStubs.3" if="wsdl.3.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.3.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.3.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.3.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.3}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.3.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.4" depends="mergePackageMapping" if="wsdl.4" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.4}'s STUBS:" level="debug"/>
|
||||
<target name="generateStubs.4" if="wsdl.4.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.4.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.4.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.4.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.4}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.4.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.5" depends="mergePackageMapping" if="wsdl.5" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.5}'s STUBS:" level="debug"/>
|
||||
<target name="generateStubs.5" if="wsdl.5.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.5.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.5.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.5.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.5}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.5.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
<target name="generateStubs.6" depends="mergePackageMapping" if="wsdl.6" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.6}'s STUBS:" level="debug"/>
|
||||
|
||||
<target name="generateStubs.6" if="wsdl.6.name" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.6.name}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.6.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.6.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.6}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.6.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
|
@ -335,14 +330,13 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<target name="processWSDLs" depends="processWSDL.1,processWSDL.2,processWSDL.3,processWSDL.4,processWSDL.5,processWSDL.6" description="generate bindings for all porttypes" />
|
||||
<target name="generateStubs" depends="generateStubs.1,generateStubs.2,generateStubs.3,generateStubs.4,generateStubs.5,generateStubs.6" description="generate stub classes for all porttypes" />
|
||||
|
||||
|
||||
<!-- Service Build tasks -->
|
||||
<target name="buildService" depends="processWSDLs" description="compiles service implementation">
|
||||
<if name="etics.build" value="false">
|
||||
<javac srcdir="${package.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
|
||||
<classpath>
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="**/*.jar" />
|
||||
<exclude name="**/${jarfile}" />
|
||||
</fileset>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
|
@ -350,6 +344,17 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
<else>
|
||||
<javac srcdir="${package.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
|
||||
<classpath>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
<exclude name="${jarfile}" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<target name="jarService" depends="buildService" description="jars service implementation">
|
||||
|
@ -371,15 +376,12 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<reference refid="${garetc.id}" />
|
||||
</ant>
|
||||
<delete dir="tmp" />
|
||||
<if name="etics.build" value="false">
|
||||
<move file="${package}.gar" toDir="${build.location}"/>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<!-- Stub Build tasks -->
|
||||
<target name="mergePackageMapping" description="merge service namespace mappings file with global one">
|
||||
<ant antfile="${build.stubs}" target="mergePackageMapping">
|
||||
<property name="mapping.src" location="${mappings.file}" />
|
||||
<property name="mapping.dst" location="${build.dir}/namespace2package.mappings" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="buildStubs" depends="processWSDLs,generateStubs" description="build service stubs">
|
||||
<echo message="BUILDING ${wsdl.1}'s STUBS:" level="debug"/>
|
||||
|
@ -393,6 +395,8 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
<if name="stubs.dir.present">
|
||||
<if name="etics.build" value="false">
|
||||
<javac srcdir="${stubs.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile additional stub classes and resources">
|
||||
<include name="**/*.java" />
|
||||
<classpath>
|
||||
|
@ -409,13 +413,28 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
<else>
|
||||
<javac srcdir="${stubs.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile additional stub classes and resources">
|
||||
<include name="**/*.java" />
|
||||
<classpath>
|
||||
<pathelement path="${build.stubs.class.dir}"/>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
<exclude name="${jarfile.stubs}" />
|
||||
<exclude name="${jarfile}" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
</else>
|
||||
</if>
|
||||
<copy toDir="${build.stubs.class.dir}/${package.dir}/${stubs.dir.name}" overwrite="true">
|
||||
<fileset dir="${stubs.dir}" casesensitive="yes">
|
||||
<exclude name="**/*.java" />
|
||||
<exclude name="**/*.class" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy toDir="${build.stubs.class.dir}/${package.dir}/${stubs.dir.name}/bindings" overwrite="false">
|
||||
</if>
|
||||
<copy toDir="${build.stubs.class.dir}/META-INF" overwrite="false">
|
||||
<fileset dir="${etc.dir}" casesensitive="yes" />
|
||||
</copy>
|
||||
</target>
|
||||
|
@ -425,13 +444,15 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
</target>
|
||||
|
||||
<target name="deployStubs" depends="jarStubs" description="deploy stub jar">
|
||||
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${container.dir}/lib"/>
|
||||
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${lib.location}"/>
|
||||
<if name="etics.build" value="false">
|
||||
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${container.dir}/lib"/>
|
||||
<copy toDir="${container.dir}/lib">
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
|
@ -485,6 +506,7 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<delete dir="${build.dir}" />
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Task Templates for additional wsdls: for each one, clone, decomment, and replace <n> with wsdl number -->
|
||||
|
||||
|
||||
|
@ -508,10 +530,11 @@ garname: Unique name of the GAR file to be generated. Defaults to ${package}
|
|||
<target name="generateStubs.<n>" depends="mergePackageMapping" if="wsdl.<n>" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.<n>}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mapping.file" location="${build.dir}/namespace2package.mappings" />
|
||||
<property name="mapping.fromNamespace" value="${wsdl.<n>.namespace}" />
|
||||
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.<n>.name}" />
|
||||
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
|
||||
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
|
||||
<property name="wsdl.file" value="${wsdl.<n>}_service.wsdl" />
|
||||
<property name="wsdl.file" value="${wsdl.<n>.name}_service.wsdl" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
package = org.gcube.informationsystem.registry
|
||||
lib.dir = SERVICELIBS/GCUBE_ISREGISTRY
|
||||
wsdl.1.name = RegistryFactory
|
||||
wsdl.1.namespace=http://gcube-system.org/namespaces/informationsystem/registry
|
||||
wsdl.2.name = Registry
|
||||
wsdl.2.namespace=http://gcube-system.org/namespaces/informationsystem/registry
|
|
@ -9,6 +9,13 @@
|
|||
type="java.lang.String"
|
||||
override="false" />
|
||||
|
||||
<environment
|
||||
name="securityManagerClass"
|
||||
value="org.gcube.common.core.security.GCUBESimpleServiceSecurityManager"
|
||||
type="java.lang.String"
|
||||
override="false" />
|
||||
|
||||
|
||||
</service>
|
||||
|
||||
<service name="gcube/informationsystem/registry/Registry">
|
||||
|
@ -43,7 +50,7 @@
|
|||
</parameter>
|
||||
<parameter>
|
||||
<name>fileName</name>
|
||||
<value>@config.dir@/registration.xml</value>
|
||||
<value>registration.xml</value>
|
||||
</parameter>
|
||||
</resourceParams>
|
||||
</resource>
|
||||
|
@ -106,7 +113,7 @@
|
|||
</parameter>
|
||||
<parameter>
|
||||
<name>fileName</name>
|
||||
<value>@config.dir@/registrationFactory.xml</value>
|
||||
<value>registrationFactory.xml</value>
|
||||
</parameter>
|
||||
</resourceParams>
|
||||
</resource>
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<deployment name="defaultServerConfig"
|
||||
xmlns="http://xml.apache.org/axis/wsdd/"
|
||||
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<service name="gcube/informationsystem/registry/Registry" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.gcube.informationservice.registry.impl.core.Registry"/>
|
||||
<wsdlFile>share/schema/org.gcube.informationsystem.registry/Registry_service.wsdl</wsdlFile>
|
||||
<parameter name="allowedMethods" value="*"/>
|
||||
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
|
||||
<parameter name="scope" value="Application"/>
|
||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider DestroyProvider GetCurrentMessageProvider "/>
|
||||
<parameter name="loadOnStartup" value="false"/>
|
||||
|
||||
</service>
|
||||
|
||||
|
||||
<!-- Factory service -->
|
||||
<service name="gcube/informationsystem/registry/RegistryFactory" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.gcube.informationsystem.registry.impl.core.RegistryFactory"/>
|
||||
<wsdlFile>share/schema/org.gcube.informationsystem.registry/RegistryFactory_service.wsdl</wsdlFile>
|
||||
<parameter name="allowedMethods" value="*"/>
|
||||
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
|
||||
<parameter name="scope" value="Application"/>
|
||||
<parameter name="instance" value="gcube/informationsystem/registry/Registry"/>
|
||||
<parameter name="providers" value="GCUBEProvider SubscribeProvider GetCurrentMessageProvider"/>
|
||||
<parameter name="loadOnStartup" value="true"/>
|
||||
|
||||
</service>
|
||||
|
||||
</deployment>
|
|
@ -5,6 +5,7 @@
|
|||
<Profile>
|
||||
<Class>InformationSystem</Class>
|
||||
<Name>IS-Registry</Name>
|
||||
<Version>1.0</Version>
|
||||
<Packages>
|
||||
<Main>
|
||||
<Name>IS-Registry-Service</Name>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
http\://gcube-system.org/namespaces/informationsystem/registry=org.gcube.informationsystem.registry.stubs
|
||||
http\://gcube-system.org/namespaces/informationsystem/registry/bindings=org.gcube.informationsystem.registry.stubs.bindings
|
||||
http\://gcube-system.org/namespaces/informationsystem/registry/service=org.gcube.informationsystem.registry.stubs.service
|
||||
http\://gcube-system.org/namespaces/informationsystem/registry/common=org.gcube.informationsystem.registry.stubs
|
|
@ -3,6 +3,12 @@ package org.gcube.informationsystem.registry.impl.core;
|
|||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
|
||||
/**
|
||||
* Stateful port-type context for <em>gcube/informationsystem/registry/RegistryFactory</em>
|
||||
*
|
||||
* @author Manuele Simi (CNR)
|
||||
*
|
||||
*/
|
||||
public class FactoryContext extends GCUBEStatefulPortTypeContext{
|
||||
|
||||
static private final String PORTTYPE_NAME = "gcube/informationsystem/registry/RegistryFactory";
|
||||
|
|
|
@ -3,6 +3,12 @@ package org.gcube.informationsystem.registry.impl.core;
|
|||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
|
||||
/**
|
||||
* Stateful port-type context for <em>gcube/informationsystem/registry/Registry</em>
|
||||
*
|
||||
* @author Manuele Simi (CNR)
|
||||
*
|
||||
*/
|
||||
public class ProfileContext extends GCUBEStatefulPortTypeContext{
|
||||
|
||||
static private final String PORTTYPE_NAME = "gcube/informationsystem/registry/Registry";
|
||||
|
|
|
@ -9,8 +9,8 @@ import javax.xml.parsers.DocumentBuilder;
|
|||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
|
||||
import org.gcube.common.core.is.publisher.ISPublisher;
|
||||
import org.gcube.common.core.is.publisher.ISPublisherException;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisherException;
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.resources.GCUBEHostingNode;
|
||||
import org.gcube.common.core.resources.GCUBEResource;
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.informationsystem.registry.impl.core;
|
|||
|
||||
import org.apache.axis.utils.XMLUtils;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.informationsystem.registry.stubs.GetProfileString;
|
||||
import org.gcube.informationsystem.registry.impl.core.ProfileResource;
|
||||
import org.gcube.informationsystem.registry.stubs.registry.GetProfileString;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.lang.reflect.Method;
|
|||
import java.rmi.RemoteException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.axis.components.uuid.UUIDGen;
|
||||
import org.apache.axis.components.uuid.UUIDGenFactory;
|
||||
|
@ -27,26 +29,24 @@ import org.gcube.common.core.resources.GCUBEService;
|
|||
import org.gcube.common.core.resources.GCUBETransformationProgram;
|
||||
import org.gcube.common.core.resources.GCUBEVRE;
|
||||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.state.GCUBEWSResourceKey;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.common.is.publisher.impl.GCUBEPublisher;
|
||||
import org.gcube.common.is.publisher.impl.GCUBEPublisherException;
|
||||
import org.gcube.common.is.publisher.impl.ProfileManager;
|
||||
import org.gcube.informationsystem.registry.impl.util.ProfileManager;
|
||||
import org.gcube.informationsystem.registry.impl.util.RegistryUtil;
|
||||
import org.gcube.informationsystem.registry.stubs.CreateResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.ProfileAlreadyRegisteredFault;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryProperty;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveResourceResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveScopeInProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.SchemaValidationFault;
|
||||
import org.gcube.informationsystem.registry.stubs.StartRegistration;
|
||||
import org.gcube.informationsystem.registry.stubs.StartRegistrationResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.UpdateProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.UpdateResourceResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.UpdateScopeInProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.UpdateStateMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.service.RegistryServiceAddressingLocator;
|
||||
import org.gcube.informationsystem.registry.stubs.registry.RegistryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.registry.service.RegistryServiceAddressingLocator;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.CreateResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.ProfileAlreadyRegisteredFault;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryProperty;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RemoveResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RemoveResourceResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RemoveScopeInProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.SchemaValidationFault;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.StartRegistrationResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.UpdateProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.UpdateResourceResponse;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.UpdateScopeInProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.UpdateStateMessage;
|
||||
import org.globus.wsrf.ResourceKey;
|
||||
import org.globus.wsrf.security.SecurityManager;
|
||||
import org.oasis.wsrf.lifetime.Destroy;
|
||||
|
@ -79,7 +79,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
/**
|
||||
* Map of registration to Notification
|
||||
*/
|
||||
public static ArrayList notificationMap = new ArrayList<String>();
|
||||
public static List<GCUBEWSResourceKey> notificationMap = Collections.synchronizedList(new ArrayList<GCUBEWSResourceKey>());
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -96,7 +96,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
* @return void
|
||||
* @throws RemoteException Exception
|
||||
*/
|
||||
public StartRegistrationResponse startRegistration(StartRegistration start ) throws GCUBEFault{
|
||||
public org.gcube.informationsystem.registry.stubs.registryfactory.StartRegistrationResponse startRegistration(org.gcube.informationsystem.registry.stubs.registryfactory.StartRegistration start ) throws GCUBEFault{
|
||||
//start registration to broker and new profiles registration
|
||||
logger.debug("Starting profile registration from disk");
|
||||
try {
|
||||
|
@ -187,7 +187,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
|
||||
|
||||
/**
|
||||
* Update Resource Profiles ( in case of an update of an ID not present it simply calls the Create resource method)
|
||||
* Updates Resource Profiles ( in case of an update of an ID not present it simply calls the Create resource method)
|
||||
*
|
||||
*
|
||||
* @param mess Complex Object that contains a String representing the xml profile to update and the diligentID
|
||||
|
@ -267,22 +267,21 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
if( resource == null) return new RemoveResourceResponse();
|
||||
else {
|
||||
logger.debug("Try to remove the resource from the IS-IC");
|
||||
ProfileManager manager;
|
||||
try {
|
||||
manager = new GCUBEPublisher().getProfileManager(null, GHNContext.getContext().getDefaultScope());
|
||||
manager.removeFromDISIC(ID,resource.getType());
|
||||
} catch (GCUBEPublisherException e) {
|
||||
e.printStackTrace();
|
||||
new ProfileManager().removeFromISIC(ID, resource.getType(), ServiceContext.getContext().getCredentials());
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to remove the resource", e);
|
||||
throw ServiceContext.getContext().getDefaultException("", e).toFault("Unable to remove the resource: the remote IS-IC returns an error");
|
||||
}
|
||||
}
|
||||
return new RemoveResourceResponse();
|
||||
}
|
||||
|
||||
try{
|
||||
ProfileResource resource = getProfileResource(ID );
|
||||
resource.removeProfile();
|
||||
RegistryServiceAddressingLocator locator = new RegistryServiceAddressingLocator();
|
||||
RegistryPortType portType = locator.getRegistryPortTypePort(resource.getEPR());
|
||||
|
||||
//destroy resource
|
||||
portType.destroy(new Destroy());
|
||||
|
||||
|
@ -294,7 +293,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
}
|
||||
try {
|
||||
if (type.compareTo(GCUBEHostingNode.TYPE) == 0) {
|
||||
RegistryUtil.unregisterRIRelatedToDHN(ID,this);
|
||||
RegistryUtil.unregisterRIRelatedToGHN(ID,this);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.io.ObjectInputStream;
|
|||
import java.io.ObjectOutputStream;
|
||||
|
||||
import org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryProperty;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryProperty;
|
||||
import org.globus.wsrf.utils.SubscriptionPersistenceUtils;
|
||||
|
||||
public class RegistryFactoryPersistenceDelegate extends GCUBEWSFilePersistenceDelegate<RegistryFactoryResource>{
|
||||
|
|
|
@ -5,10 +5,10 @@ import java.util.ArrayList;
|
|||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.is.publisher.ISPublisher;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||
import org.gcube.common.core.state.GCUBEWSResource;
|
||||
import org.gcube.informationsystem.registry.impl.util.RegistrationThread;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryProperty;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryProperty;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
|
||||
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.is.client.ISClient;
|
||||
import org.gcube.common.core.is.client.queries.GCUBERIsFromClassAndName;
|
||||
import org.gcube.common.core.is.client.queries.GCUBEResourceXPathQuery;
|
||||
import org.gcube.common.core.is.publisher.ISPublisher;
|
||||
import org.gcube.common.core.is.publisher.ISPublisherException;
|
||||
import org.gcube.common.core.informationsystem.client.ISClient;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBERIsFromClassAndName;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBEResourceXPathQuery;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisherException;
|
||||
import org.gcube.common.core.resources.GCUBEHostingNode;
|
||||
import org.gcube.common.core.resources.GCUBEResource;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
|
||||
/**
|
||||
*
|
||||
* IS-Registry service context
|
||||
*
|
||||
* @author Andrea Manzi (ISTI-CNR)
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.gcube.common.core.is.publisher.ISPublisher;
|
||||
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.informationsystem.registry.impl.core.FactoryContext;
|
||||
|
|
|
@ -5,16 +5,17 @@ import java.util.List;
|
|||
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.common.core.is.ISException;
|
||||
import org.gcube.common.core.is.client.ISClient;
|
||||
import org.gcube.common.core.is.client.ISClient.ISInvalidQueryException;
|
||||
import org.gcube.common.core.is.client.ISClient.ISMalformedQueryException;
|
||||
import org.gcube.common.core.is.client.queries.GCUBERIsOnGHNQuery;
|
||||
import org.gcube.common.core.is.client.queries.GCUBEResourceFromIDQuery;
|
||||
import org.gcube.common.core.informationsystem.ISException;
|
||||
import org.gcube.common.core.informationsystem.client.ISClient;
|
||||
import org.gcube.common.core.informationsystem.client.ISClient.ISInvalidQueryException;
|
||||
import org.gcube.common.core.informationsystem.client.ISClient.ISMalformedQueryException;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBERIsOnGHNQuery;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBEResourceFromIDQuery;
|
||||
import org.gcube.common.core.resources.GCUBEResource;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
import org.gcube.informationsystem.registry.impl.core.RegistryFactory;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RemoveResourceMessage;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,7 +57,7 @@ public class RegistryUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Unregister all the RIs hosted on a given gHN
|
||||
*
|
||||
* @param id
|
||||
* @param service
|
||||
|
@ -66,7 +67,7 @@ public class RegistryUtil {
|
|||
* @throws GCUBEFault
|
||||
* @throws RemoteException
|
||||
*/
|
||||
public static void unregisterRIRelatedToDHN(String id ,RegistryFactory service) throws ISMalformedQueryException, ISInvalidQueryException, ISException, GCUBEFault, RemoteException{
|
||||
public static void unregisterRIRelatedToGHN(String id ,RegistryFactory service) throws ISMalformedQueryException, ISInvalidQueryException, ISException, GCUBEFault, RemoteException{
|
||||
RemoveResourceMessage message = null;
|
||||
GCUBERIsOnGHNQuery query= client.getQuery(GCUBERIsOnGHNQuery.class);
|
||||
query.setResourceID(id);
|
||||
|
|
|
@ -8,9 +8,10 @@ import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
|
|||
import org.gcube.common.core.resources.GCUBEService;
|
||||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.service.RegistryFactoryServiceAddressingLocator;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RemoveResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.service.RegistryFactoryServiceAddressingLocator;
|
||||
|
||||
import org.gridforum.jgss.ExtendedGSSCredential;
|
||||
|
||||
public class RegistryRemoveTest {
|
||||
|
@ -32,7 +33,7 @@ public class RegistryRemoveTest {
|
|||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
RemoveResourceMessage message = new RemoveResourceMessage();
|
||||
RemoveResourceMessage message = new org.gcube.informationsystem.registry.stubs.registryfactory.RemoveResourceMessage();
|
||||
|
||||
managerSec.useCredentials(cred);
|
||||
registryFactoryPortType =GCUBERemotePortTypeContext.getProxy(registryFactoryPortType,GCUBEScope.getScope("/gcube/devsec"),managerSec);
|
||||
|
|
|
@ -11,9 +11,9 @@ import org.gcube.common.core.resources.GCUBEService;
|
|||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.security.GCUBESecurityManager;
|
||||
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
|
||||
import org.gcube.informationsystem.registry.stubs.CreateResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.service.RegistryFactoryServiceAddressingLocator;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.CreateResourceMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.service.RegistryFactoryServiceAddressingLocator;
|
||||
import org.gridforum.jgss.ExtendedGSSCredential;
|
||||
|
||||
public class RegistryTest {
|
||||
|
@ -32,9 +32,6 @@ public class RegistryTest {
|
|||
EndpointReferenceType factoryEPR = new EndpointReferenceType();
|
||||
resource.load(fis);
|
||||
//resource.store(fir);
|
||||
|
||||
|
||||
|
||||
RegistryFactoryPortType registryFactoryPortType= null;
|
||||
try {
|
||||
factoryEPR.setAddress(new Address(args[0]));
|
||||
|
|
|
@ -10,9 +10,9 @@ import org.gcube.common.core.contexts.GHNContext;
|
|||
import org.gcube.common.core.resources.GCUBEService;
|
||||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.UpdateProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.service.RegistryFactoryServiceAddressingLocator;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.RegistryFactoryPortType;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.UpdateProfileMessage;
|
||||
import org.gcube.informationsystem.registry.stubs.registryfactory.service.RegistryFactoryServiceAddressingLocator;
|
||||
import org.gridforum.jgss.ExtendedGSSCredential;
|
||||
|
||||
public class RegistryUpdateTest {
|
||||
|
|
Loading…
Reference in New Issue