git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@436 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7774f4ff7a
commit
f468934953
|
@ -0,0 +1,530 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Ant buildfile for GCUBE Services
|
||||
|
||||
Version 0.5
|
||||
|
||||
REQUIRED INPUT PROPERTIES
|
||||
|
||||
This buildfile assumes that the following properties have or may 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).
|
||||
|
||||
package: (mandatory) Root package of the service implementation: it should be the first package in the
|
||||
implementation hierarchy which uniquely identifies the implementation.
|
||||
lib.dir: (mandatory) Root directory where auxiliary jar files are located. Ideally outside ${base.dir} as not needed for remote build and dynamic deployment.
|
||||
wsdl.<n>: (mandatory) 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).
|
||||
namespace.<n>: (mandatory) The <n>-th target namespace of a port-type WSSDL or of auxiliary XSD definition. Again, the over imposed over namespaces
|
||||
serves only to distinguish build properties and has no particular semantics otherwise.
|
||||
package.<n>: (optional) The package name of the stubs generated from WSDL and/or XSD elements in the <n>-th target namespace. If it is specified, it is
|
||||
considered to be relative to ${package}.stubs. If it is omitted, WSLD and XSD elements are placed in $package}.stubs.
|
||||
etics.build: (optional) Set to 'true', it indicates that build structures and procedures
|
||||
should be optimised for remote builds in ETICS. If it is omitted, this buildfile will optimise build structures and procedures
|
||||
for local builds.
|
||||
|
||||
-->
|
||||
|
||||
<project default="deployService" name="GCUBE Service Buildfile">
|
||||
|
||||
<!-- environment -->
|
||||
<property environment="env" />
|
||||
|
||||
<!-- external environment -->
|
||||
<echo message="container.dir ->${env.GLOBUS_LOCATION}" level="info"/>
|
||||
<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" />
|
||||
|
||||
<!-- load non-standard tasks -->
|
||||
<taskdef resource="ise/antelope/tasks/antlib.xml">
|
||||
<classpath>
|
||||
<pathelement location="${container.dir}/lib/AntelopeTasks_3.4.2.jar"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<!-- discriminate between local and remote build -->
|
||||
<property name="etics.build" value="false" />
|
||||
|
||||
<!-- service-specific locations -->
|
||||
<property name="service.dir" location="." />
|
||||
<property name="schema.dir.name" value="schema" />
|
||||
<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}" />
|
||||
<property name="source.dir" value="${service.dir}/src" />
|
||||
|
||||
|
||||
<!-- load input properties -->
|
||||
<property file="${etc.dir}/build.properties" />
|
||||
|
||||
<stringutil property="package.dir" string="${package}"><!-- derive package.dir from ${package} -->
|
||||
<replace regex="\." replacement="/"/>
|
||||
</stringutil>
|
||||
|
||||
<!-- file defaults -->
|
||||
<property name="garname" value="${package}"/>
|
||||
<property name="garfile" value="${garname}.gar"/>
|
||||
<property name="jarfile" value="${package}.jar" />
|
||||
<property name="jarfile.stubs" value="${package}.stubs.jar" />
|
||||
|
||||
<if name="etics.build" value="true">
|
||||
<property name="build.location" location="${service.dir}" />
|
||||
<property name="lib.location" value="${build.location}/lib" />
|
||||
<property name="gar.location" value="${lib.location}"/>
|
||||
<else>
|
||||
<property name="build.location" location="${env.BUILD_LOCATION}" />
|
||||
<property name="lib.location" value="${build.location}/${lib.dir}" />
|
||||
<property name="gar.location" value="${build.location}"/>
|
||||
</else>
|
||||
</if>
|
||||
|
||||
|
||||
<property name="stubs.package" value="${package}.${stubs.dir.name}"/>
|
||||
<property name="stubs.dir.name" value="stubs" /> <!-- auxiliary stub classes -->
|
||||
<property name="stubs.dir" value="${source.dir}/${package.dir}${stubs.dir.name}" />
|
||||
<available file="${stubs.dir}" property="stubs.dir.present"/>
|
||||
|
||||
<!-- temporary build locations -->
|
||||
<property name="build.dir" location="${build.location}/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" />
|
||||
|
||||
<!-- misc defaults -->
|
||||
<property name="java.debug" value="on" />
|
||||
<property name="java.deprecation" value="off" />
|
||||
|
||||
<!-- common filesets -->
|
||||
<fileset dir="${build.lib.dir}" id="garjars" />
|
||||
<property name="garjars.id" value="garjars" />
|
||||
<fileset dir="${build.schema.dir}" id="garschema">
|
||||
<include name="${package}/**" />
|
||||
</fileset>
|
||||
<property name="garschema.id" value="garschema" />
|
||||
<fileset dir="${etc.dir}" id="garetc" />
|
||||
<property name="garetc.id" value="garetc" />
|
||||
|
||||
|
||||
<!-- initialisation tasks -->
|
||||
<target name="init" depends="clean" 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 dependency location, if it does not exist already -->
|
||||
<mkdir dir="${lib.location}" />
|
||||
|
||||
<!-- 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}"/>
|
||||
|
||||
<!-- Populates schema folder -->
|
||||
<copy toDir="${build.schema.dir}">
|
||||
<fileset dir="${container.schema.dir}" casesensitive="yes">
|
||||
<include name="wsrf/**/*" />
|
||||
<include name="ws/**/*" />
|
||||
<include name="gcube/**/**/**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy toDir="${build.schema.service.dir}">
|
||||
<fileset dir="${schema.dir}"/>
|
||||
</copy>
|
||||
|
||||
<!-- Populates library folder -->
|
||||
<copy toDir="${build.lib.dir}">
|
||||
<fileset dir="${lib.location}">
|
||||
<exclude name="${jarfile.stubs}" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
</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"/>
|
||||
<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" />
|
||||
</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}" />
|
||||
</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"/>
|
||||
<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" />
|
||||
</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}" />
|
||||
</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"/>
|
||||
<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" />
|
||||
</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}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="processWSDL.4" depends="init" if="wsdl.4" 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" />
|
||||
</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}" />
|
||||
</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"/>
|
||||
<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" />
|
||||
</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}" />
|
||||
</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"/>
|
||||
<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" />
|
||||
</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}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.1" if="wsdl.1" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.1}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.2" if="wsdl.2" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.2}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.3" if="wsdl.3" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.3}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.4" if="wsdl.4" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.4}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.5" if="wsdl.5" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.5}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="generateStubs.6" if="wsdl.6" description="Generate wsdl stub classes">
|
||||
<echo message="GENERATING ${wsdl.6}'s STUBS:" level="debug"/>
|
||||
<ant antfile="${build.stubs}" target="generateStubs">
|
||||
<property name="mappings" value="${mappings}"/>
|
||||
<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" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- Cross-wsdl tasks. Adds dependencies for each additional wsdl, if required -->
|
||||
<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="generateMappings,generateStubs.1,generateStubs.2,generateStubs.3,generateStubs.4,generateStubs.5,generateStubs.6" description="generate stub classes for all porttypes" />
|
||||
|
||||
<target name="generateMappings">
|
||||
<var name="mappings" value=""/>
|
||||
<if name="namespace.1">
|
||||
<if name="package.1">
|
||||
<var name="package.1" value="${stubs.package}.${package.1}"/>
|
||||
<else>
|
||||
<var name="package.1" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.1}=${package.1} -N${namespace.1}/service=${package.1}.service -N${namespace.1}/bindings=${package.1}.bindings"/>
|
||||
</if>
|
||||
<if name="namespace.2">
|
||||
<if name="package.2">
|
||||
<var name="package.2" value="${stubs.package}.${package.2}"/>
|
||||
<else>
|
||||
<var name="package.2" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.2}=${package.2} -N${namespace.2}/service=${package.2}.service -N${namespace.2}/bindings=${package.2}.bindings"/>
|
||||
</if>
|
||||
<if name="namespace.3">
|
||||
<if name="package.3">
|
||||
<var name="package.3" value="${stubs.package}.${package.3}"/>
|
||||
<else>
|
||||
<var name="package.3" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.3}=${package.3} -N${namespace.3}/service=${package.3}.service -N${namespace.3}/bindings=${package.3}.bindings"/>
|
||||
</if>
|
||||
<if name="namespace.4">
|
||||
<if name="package.4">
|
||||
<var name="package.4" value="${stubs.package}.${package.4}"/>
|
||||
<else>
|
||||
<var name="package.4" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.4}=${package.4} -N${namespace.4}/service=${package.4}.service -N${namespace.4}/bindings=${package.4}.bindings"/>
|
||||
</if>
|
||||
<if name="namespace.5">
|
||||
<if name="package.5">
|
||||
<var name="package.5" value="${stubs.package}.${package.5}"/>
|
||||
<else>
|
||||
<var name="package.5" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.5}=${package.5} -N${namespace.5}/service=${package.5}.service -N${namespace.5}/bindings=${package.5}.bindings"/>
|
||||
</if>
|
||||
<if name="namespace.6">
|
||||
<if name="package.6">
|
||||
<var name="package.6" value="${stubs.package}.${package.6}"/>
|
||||
<else>
|
||||
<var name="package.6" value="${stubs.package}"/></else>
|
||||
</if>
|
||||
<var name="mappings" value="${mappings} -N${namespace.6}=${package.6} -N${namespace.6}/service=${package.6}.service -N${namespace.6}/bindings=${package.6}.bindings"/>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Service tasks -->
|
||||
|
||||
<target name="deployService" depends="garService" description="deploy service gar">
|
||||
<exec executable="${container.dir}/bin/gcore-deploy-service">
|
||||
<arg value="${gar.location}/${package}.gar"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="buildService" depends="processWSDLs" description="compiles service implementation">
|
||||
<javac srcdir="${source.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
|
||||
<classpath>
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
<exclude name="${jarfile}" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="jarService" depends="buildService" description="jars service implementation">
|
||||
<jar jarfile="${build.lib.dir}/${jarfile}" basedir="${build.class.dir}">
|
||||
<include name="${package.dir}/**" />
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="garService" depends="jarService" description="creates service gar">
|
||||
<ant antfile="${build.packages}" target="makeGar">
|
||||
<property name="garserverdeployment.file" value="${etc.dir}/deploy-server.wsdd" />
|
||||
<property name="garserverdeployment_NOSEC.file" value="${etc.dir}/deploy-server.wsdd_NOSEC" />
|
||||
<property name="garclientdeployment.file" value="${etc.dir}/deploy-client.wsdd" />
|
||||
<property name="garclientserverdeployment.file" value="${etc.dir}/deploy-client-server.wsdd" />
|
||||
<property name="garjndiconfigdeployment.file" value="${etc.dir}/deploy-jndi-config.xml" />
|
||||
<property name="gar.id" value="${package}" />
|
||||
<reference refid="${garjars.id}" />
|
||||
<reference refid="${garschema.id}" />
|
||||
<reference refid="${garetc.id}" />
|
||||
</ant>
|
||||
<delete dir="tmp" />
|
||||
<move file="${garfile}" toDir="${gar.location}"/>
|
||||
</target>
|
||||
|
||||
<!-- Stub Build tasks -->
|
||||
|
||||
<target name="buildStubs" depends="processWSDLs,generateStubs" description="build service stubs">
|
||||
<if name="stubs.dir.present">
|
||||
<copy toDir="${build.stubs.src.dir}/${package.dir}/${stubs.dir.name}" overwrite="true">
|
||||
<fileset dir="${stubs.dir}" casesensitive="yes">
|
||||
<exclude name="**/*.class" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</if>
|
||||
<javac srcdir="${build.stubs.src.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile stub classes">
|
||||
<include name="**/*.java" />
|
||||
<classpath>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
<exclude name="${jarfile.stubs}" />
|
||||
<exclude name="${jarfile}" />
|
||||
</fileset>
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="**/*.jar" />
|
||||
<exclude name="**/${jarfile.stubs}" />
|
||||
<exclude name="**/${jarfile}" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
<copy toDir="${build.stubs.class.dir}/META-INF" overwrite="false"><!-- copy configuration info as well -->
|
||||
<fileset dir="${etc.dir}" casesensitive="yes" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="jarStubs" depends="buildStubs" description="jar stub classes">
|
||||
<jar destfile="${build.lib.dir}/${jarfile.stubs}" basedir="${build.stubs.class.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="deployStubs" depends="jarStubs" description="deploy stub jar">
|
||||
<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"/>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<target name="stubs" depends="deployStubs" description="generates, builds, jars and deploy stubs"/>
|
||||
|
||||
<!-- undeployement tasks -->
|
||||
<target name="undeployStubs" description="deploy stub jar">
|
||||
<delete file="${container.dir}/lib/${jarfile.stubs}"/>
|
||||
</target>
|
||||
|
||||
<target name="undeployService" description="undeploy service jar">
|
||||
<exec executable="${container.dir}/bin/gcore-undeploy-service">
|
||||
<arg value="${package}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- javadoc tasks -->
|
||||
<target name="doc">
|
||||
<javadoc access="public" author="true" sourcepath="${service.dir}" packagenames="${package}.*"
|
||||
destdir="doc/api" nodeprecated="false" nodeprecatedlist="false"
|
||||
noindex="false" nonavbar="false" notree="false"
|
||||
source="1.5"
|
||||
splitindex="true"
|
||||
use="true" version="true" failonerror="false">
|
||||
<classpath>
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="**/*.jar" />
|
||||
<exclude name="**/${jarfile}" />
|
||||
</fileset>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<target name="docstubs">
|
||||
<javadoc access="public" author="true" destdir="doc/api" nodeprecated="false"
|
||||
packagenames="${package}.${stubs.dir.name}.*"
|
||||
nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false"
|
||||
source="1.5" sourcepath="${build.stubs.src.dir}"
|
||||
splitindex="true" use="true" version="true"
|
||||
failonerror="false">
|
||||
<classpath>
|
||||
<fileset dir="${lib.location}">
|
||||
<include name="**/*.jar" />
|
||||
<exclude name="**/${jarfile.stubs}" />
|
||||
</fileset>
|
||||
<fileset dir="${container.dir}/lib">
|
||||
<include name="*.jar" />
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${build.dir}" quiet="true"/>
|
||||
<delete dir="${service.dir}/tmp" quiet="true"/>
|
||||
<delete file="${gar.location}/${garfile}" quiet="true"/>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
package = org.gcube.vremanagement.vremodeler
|
||||
lib.dir = Dependencies/VDLModeler
|
||||
wsdl.1 = ModelFactory
|
||||
wsdl.2 = Model
|
||||
namespace.1=http://gcube-system.org/vremanagement/vremodeler
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
|
||||
|
||||
|
||||
<service name="gcube/vdlmanagement/vdlmodeler">
|
||||
|
||||
<environment
|
||||
name="configDir"
|
||||
value="@config.dir@"
|
||||
type="java.lang.String"
|
||||
override="false" />
|
||||
|
||||
<environment
|
||||
name="securityManagerClass"
|
||||
value="org.gcube.common.core.security.GCUBEServiceSecurityManagerImpl"
|
||||
type="java.lang.String"
|
||||
override="false" />
|
||||
|
||||
</service>
|
||||
|
||||
<service name="gcube/vdlmanagement/vdlmodeler/ModelerService">
|
||||
|
||||
<environment
|
||||
name="RPDName"
|
||||
value="ModelerIndexerProperties"
|
||||
type="java.lang.String"
|
||||
override="false"/> >
|
||||
|
||||
<resource name="publicationProfile" type="org.gcube.common.core.state.GCUBEPublicationProfile">
|
||||
<resourceParams>
|
||||
<parameter>
|
||||
<name>factory</name>
|
||||
<value>org.globus.wsrf.jndi.BeanFactory</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>mode</name>
|
||||
<value>pull</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>fileName</name>
|
||||
<value>registration.xml</value>
|
||||
</parameter>
|
||||
</resourceParams>
|
||||
</resource>
|
||||
|
||||
<resource name="home" type="org.gcube.vremanagement.vremodeler.ModelerHome">
|
||||
<resourceParams>
|
||||
<parameter>
|
||||
<name>factory</name>
|
||||
<value>org.globus.wsrf.jndi.BeanFactory</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>resourceClass</name>
|
||||
<value>org.gcube.vremanagement.vremodeler.ModelerResource</value>
|
||||
</parameter>
|
||||
</resourceParams>
|
||||
</resource>
|
||||
|
||||
<environment
|
||||
name="frequentUserLimit"
|
||||
value="3"
|
||||
type="java.lang.Integer"
|
||||
override="false" />
|
||||
</service>
|
||||
|
||||
</jndiConfig>
|
|
@ -0,0 +1,38 @@
|
|||
<?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="acme/sample/stateless" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.acme.sample.stateless.Stateless"/>
|
||||
<wsdlFile>share/schema/org.acme.sample/Stateless_service.wsdl</wsdlFile>
|
||||
<parameter name="allowedMethods" value="*"/>
|
||||
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
|
||||
<parameter name="scope" value="Application"/>
|
||||
<parameter name="loadOnStartup" value="true"/>
|
||||
<!-- <parameter name="securityDescriptor" value="@config.dir@/security_descriptor.xml"/> -->
|
||||
</service>
|
||||
|
||||
<service name="acme/sample/stateful" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.acme.sample.stateful.Service"/>
|
||||
<wsdlFile>share/schema/org.acme.sample/Stateful_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"/>
|
||||
<parameter name="loadOnStartup" value="true"/>
|
||||
<!--<parameter name="securityDescriptor" value="@config.dir@/security_descriptor.xml"/> -->
|
||||
</service>
|
||||
|
||||
<service name="acme/sample/factory" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.acme.sample.stateful.Factory"/>
|
||||
<wsdlFile>share/schema/org.acme.sample/Factory_service.wsdl</wsdlFile>
|
||||
<parameter name="allowedMethods" value="*"/>
|
||||
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
|
||||
<parameter name="scope" value="Application"/>
|
||||
<parameter name="loadOnStartup" value="true"/>
|
||||
<!--<parameter name="securityDescriptor" value="@config.dir@/security_descriptor.xml"/>-->
|
||||
</service>
|
||||
|
||||
</deployment>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ID></ID>
|
||||
<Type>Service</Type>
|
||||
<Profile>
|
||||
<Description>A very simple gCube Service</Description>
|
||||
<Class>Samples</Class>
|
||||
<Name>SampleService</Name>
|
||||
<Version>1.0</Version>
|
||||
<Packages>
|
||||
<Main>
|
||||
<Description>Describes port-types</Description>
|
||||
<Name>Main</Name>
|
||||
<Version>1.0</Version>
|
||||
<Dependencies>
|
||||
<Dependency>
|
||||
<Service>
|
||||
<Class>Samples</Class>
|
||||
<Name>SampleService</Name>
|
||||
</Service>
|
||||
<Package>Stubs</Package>
|
||||
<Version>1.0</Version>
|
||||
<Scope level="GHN"/>
|
||||
<Optional>false</Optional>
|
||||
</Dependency>
|
||||
</Dependencies>
|
||||
<GARArchive>org.acme.sample.gar</GARArchive>
|
||||
<PortType>
|
||||
<Name>acme/sample/stateless</Name>
|
||||
<WSDL/>
|
||||
</PortType>
|
||||
<PortType>
|
||||
<Name>acme/sample/stateful</Name>
|
||||
<WSDL/>
|
||||
</PortType>
|
||||
<PortType>
|
||||
<Name>acme/sample/factory</Name>
|
||||
<WSDL/>
|
||||
</PortType>
|
||||
</Main>
|
||||
<Software>
|
||||
<Description>Describes port-type stubs</Description>
|
||||
<Name>Stubs</Name>
|
||||
<Version>1.0</Version>
|
||||
<Files><File>org.acme.sample.stubs.jar</File></Files>
|
||||
</Software>
|
||||
</Packages>
|
||||
</Profile>
|
||||
</Resource>
|
|
@ -0,0 +1,29 @@
|
|||
<ServiceGroupRegistrationParameters
|
||||
xmlns:sgc="http://mds.globus.org/servicegroup/client"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
|
||||
xmlns:agg="http://mds.globus.org/aggregator/types"
|
||||
xmlns="http://mds.globus.org/servicegroup/client">
|
||||
|
||||
|
||||
<!-- Specifies that the registration will be renewed every 30 seconds -->
|
||||
<RefreshIntervalSecs>60</RefreshIntervalSecs>
|
||||
|
||||
|
||||
<!-- <Content> specifies registration specific information -->
|
||||
<Content xsi:type="agg:AggregatorContent">
|
||||
|
||||
<agg:AggregatorConfig>
|
||||
<agg:GetMultipleResourcePropertiesPollType xmlns:tutorial="http://acme.org/sample">
|
||||
<agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
|
||||
<agg:ResourcePropertyNames>tutorial:Name</agg:ResourcePropertyNames>
|
||||
<agg:ResourcePropertyNames>tutorial:Visits</agg:ResourcePropertyNames>
|
||||
</agg:GetMultipleResourcePropertiesPollType>
|
||||
</agg:AggregatorConfig>
|
||||
|
||||
<agg:AggregatorData/>
|
||||
|
||||
</Content>
|
||||
|
||||
</ServiceGroupRegistrationParameters>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<securityConfig xmlns="http://www.globus.org">
|
||||
|
||||
|
||||
<!--Authorization still not set for this service-->
|
||||
<authz value="none"/>
|
||||
|
||||
<method name="getMultipleResourceProperties">
|
||||
<auth-method>
|
||||
<none/>
|
||||
</auth-method>
|
||||
|
||||
</method>
|
||||
|
||||
<method name="queryResourceProperties">
|
||||
<auth-method>
|
||||
<none/>
|
||||
</auth-method>
|
||||
|
||||
</method>
|
||||
|
||||
<method name="subscribe">
|
||||
<auth-method>
|
||||
<none/>
|
||||
</auth-method>
|
||||
</method>
|
||||
|
||||
<method name="getCurrentMessage">
|
||||
<auth-method>
|
||||
<none/>
|
||||
</auth-method>
|
||||
</method>
|
||||
|
||||
<!--At least GSISecureConversation and all that clients may need to add -->
|
||||
<auth-method>
|
||||
<GSISecureConversation/>
|
||||
</auth-method>
|
||||
|
||||
<!--operates with delegation of caller's credentials-->
|
||||
<run-as>
|
||||
<caller-identity/>
|
||||
</run-as>
|
||||
|
||||
</securityConfig>
|
|
@ -0,0 +1,393 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions name="ModelService"
|
||||
targetNamespace="http://diligentproject.org/namespaces/vdlgeneratorservice/model/ModelService"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
|
||||
xmlns:tns="http://diligentproject.org/namespaces/vdlgeneratorservice/model/ModelService"
|
||||
xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
|
||||
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
|
||||
xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:keepercommon="http://diligentproject.org/namespaces/keeperservice/common"
|
||||
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
|
||||
xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
|
||||
|
||||
<wsdl:import
|
||||
namespace=
|
||||
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
|
||||
location="../../../wsrf/properties/WS-ResourceProperties.wsdl" />
|
||||
|
||||
<wsdl:import
|
||||
namespace=
|
||||
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
|
||||
location="../../../wsrf/lifetime/WS-ResourceLifetime.wsdl" />
|
||||
|
||||
<wsdl:import namespace=
|
||||
"http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
|
||||
location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>
|
||||
|
||||
<!--============================================================
|
||||
|
||||
T Y P E S
|
||||
|
||||
============================================================-->
|
||||
|
||||
|
||||
<types>
|
||||
<xsd:schema targetNamespace="http://diligentproject.org/namespaces/vdlgeneratorservice/model/ModelService"
|
||||
xmlns:tns="http://diligentproject.org/namespaces/vdlgeneratorservice/model/ModelService"
|
||||
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
|
||||
xmlns:keepercommon="http://diligentproject.org/namespaces/keeperservice/common"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://diligentproject.org/namespaces/keeperservice/common" schemaLocation="../../../diligentproject/keeperservice/common/KeeperDataTypes.xsd"/>
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../../../ws/addressing/WS-Addressing.xsd" />
|
||||
|
||||
<!-- REQUESTS AND RESPONSES -->
|
||||
|
||||
<xsd:complexType name="voidType"/>
|
||||
|
||||
<xsd:element name="getVdlModelRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getVdlModelResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:complexType name="vdlRequest">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DLName" type="xsd:string" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element name="DLDescription" type="xsd:string" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element name="DLDesigner" type="xsd:string" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element name="DLManager" type="xsd:string" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element name="StartTime" type="xsd:long" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element name="EndTime" type="xsd:long" minOccurs="1" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="setVdlModelRequestMessage" type="tns:vdlRequest"/>
|
||||
|
||||
<xsd:element name="setVdlModelResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getCollectionRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getCollectionResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:complexType name="collectionArray">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="collectionElement" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="setCollectionRequestMessage" type="tns:collectionArray"/>
|
||||
|
||||
<xsd:element name="setCollectionResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getMDCollectionRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getMDCollectionResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:complexType name="checkedRows">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="checkedRowElement" type="xsd:boolean" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="setMDFormatArgs">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="collectionIDArray" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="mdFormatIDArray" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="checkedArray" type="tns:checkedRows" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="setMDCollectionRequestMessage" type="tns:setMDFormatArgs"/>
|
||||
|
||||
<xsd:element name="setMDCollectionResponseMessage" type="tns:voidType"/>
|
||||
|
||||
|
||||
<xsd:element name="getQualityRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getQualityResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:element name="setQualityRequestMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:element name="setQualityResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="getFunctionalityResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:element name="getFunctionalityRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="setFunctionalityResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:complexType name="functionalityIDArray">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="functionalityIDElement" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="csIDElement" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="setFunctionalityRequestMessage" type="tns:functionalityIDArray"/>
|
||||
|
||||
<xsd:element name="getDHNResponseMessage" type="xsd:string"/>
|
||||
|
||||
<xsd:element name="getDHNRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="setDHNResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:complexType name="DHNArray">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DHNElement" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="setDHNRequestMessage" type="tns:DHNArray"/>
|
||||
|
||||
<xsd:element name="setDLtoPendingStateRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="setDLtoPendingStateResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="deployDLRequestMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="deployDLResponseMessage" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="checkDLStatus" type="tns:voidType"/>
|
||||
|
||||
<xsd:element name="checkDLStatusResp">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="statusList" type="keepercommon:PackageInfoStatus" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="serviceList" type="keepercommon:ServiceInfoStatus" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<!--RESOURCE PROPERTIES -->
|
||||
|
||||
<xsd:element name="Id" type="xsd:string"/>
|
||||
|
||||
<xsd:element name="ModelProperties">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="tns:Id" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--============================================================
|
||||
|
||||
M E S S A G E S
|
||||
|
||||
============================================================-->
|
||||
|
||||
<message name="GetVDLModelInputMessage">
|
||||
<part name="request" element="tns:getVdlModelRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetVDLModelOutputMessage">
|
||||
<part name="response" element="tns:getVdlModelResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetVDLModelInputMessage">
|
||||
<part name="request" element="tns:setVdlModelRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetVDLModelOutputMessage">
|
||||
<part name="response" element="tns:setVdlModelResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="GetCollectionInputMessage">
|
||||
<part name="request" element="tns:getCollectionRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetCollectionOutputMessage">
|
||||
<part name="response" element="tns:getCollectionResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetCollectionInputMessage">
|
||||
<part name="request" element="tns:setCollectionRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetCollectionOutputMessage">
|
||||
<part name="response" element="tns:setCollectionResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="GetMDCollectionInputMessage">
|
||||
<part name="request" element="tns:getMDCollectionRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetMDCollectionOutputMessage">
|
||||
<part name="response" element="tns:getMDCollectionResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetMDCollectionInputMessage">
|
||||
<part name="request" element="tns:setMDCollectionRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetMDCollectionOutputMessage">
|
||||
<part name="response" element="tns:setMDCollectionResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="GetQualityInputMessage">
|
||||
<part name="request" element="tns:getQualityRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetQualityOutputMessage">
|
||||
<part name="response" element="tns:getQualityResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetQualityInputMessage">
|
||||
<part name="request" element="tns:setQualityRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetQualityOutputMessage">
|
||||
<part name="response" element="tns:setQualityResponseMessage"/>
|
||||
</message>
|
||||
|
||||
|
||||
<message name="GetFunctionalityInputMessage">
|
||||
<part name="request" element="tns:getFunctionalityRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetFunctionalityOutputMessage">
|
||||
<part name="response" element="tns:getFunctionalityResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetFunctionalityInputMessage">
|
||||
<part name="request" element="tns:setFunctionalityRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetFunctionalityOutputMessage">
|
||||
<part name="response" element="tns:setFunctionalityResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="GetDHNInputMessage">
|
||||
<part name="request" element="tns:getDHNRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetDHNOutputMessage">
|
||||
<part name="response" element="tns:getDHNResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetDHNInputMessage">
|
||||
<part name="request" element="tns:setDHNRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetDHNOutputMessage">
|
||||
<part name="response" element="tns:setDHNResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="SetDLtoPendingStateInputMessage">
|
||||
<part name="request" element="tns:setDLtoPendingStateRequestMessage"/>
|
||||
</message>
|
||||
<message name="SetDLtoPendingStateOutputMessage">
|
||||
<part name="response" element="tns:setDLtoPendingStateResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="DeployDLInputMessage">
|
||||
<part name="request" element="tns:deployDLRequestMessage"/>
|
||||
</message>
|
||||
<message name="DeployDLOutputMessage">
|
||||
<part name="response" element="tns:deployDLResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<message name="CheckDLStatusInputMessage">
|
||||
<part name="request" element="tns:checkDLStatus"/>
|
||||
</message>
|
||||
<message name="CheckDLStatusOutputMessage">
|
||||
<part name="response" element="tns:checkDLStatusResp"/>
|
||||
</message>
|
||||
|
||||
|
||||
<!--============================================================
|
||||
|
||||
P O R T T Y P E
|
||||
|
||||
============================================================-->
|
||||
|
||||
<portType name="ModelPortType"
|
||||
wsdlpp:extends="wsrpw:GetResourceProperty
|
||||
wsrpw:GetMultipleResourceProperties
|
||||
wsrpw:SetResourceProperties
|
||||
wsrpw:QueryResourceProperties
|
||||
wsrlw:ImmediateResourceTermination
|
||||
diligent:DiligentProviderPortType"
|
||||
wsrp:ResourceProperties="tns:ModelProperties" >
|
||||
|
||||
<operation name="setDLModel">
|
||||
<input message="tns:SetVDLModelInputMessage"/>
|
||||
<output message="tns:SetVDLModelOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getDLModel">
|
||||
<input message="tns:GetVDLModelInputMessage"/>
|
||||
<output message="tns:GetVDLModelOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
|
||||
<operation name="getCollection">
|
||||
<input message="tns:GetCollectionInputMessage"/>
|
||||
<output message="tns:GetCollectionOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setCollection">
|
||||
<input message="tns:SetCollectionInputMessage"/>
|
||||
<output message="tns:SetCollectionOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getMetadataRelatedToCollection">
|
||||
<input message="tns:GetMDCollectionInputMessage"/>
|
||||
<output message="tns:GetMDCollectionOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setMetadataRelatedToCollection">
|
||||
<input message="tns:SetMDCollectionInputMessage"/>
|
||||
<output message="tns:SetMDCollectionOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
|
||||
|
||||
<operation name="getQuality">
|
||||
<input message="tns:GetQualityInputMessage"/>
|
||||
<output message="tns:GetQualityOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setQuality">
|
||||
<input message="tns:SetQualityInputMessage"/>
|
||||
<output message="tns:SetQualityOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getFunctionality">
|
||||
<input message="tns:GetFunctionalityInputMessage"/>
|
||||
<output message="tns:GetFunctionalityOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setFunctionality">
|
||||
<input message="tns:SetFunctionalityInputMessage"/>
|
||||
<output message="tns:SetFunctionalityOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getDHNs">
|
||||
<input message="tns:GetDHNInputMessage"/>
|
||||
<output message="tns:GetDHNOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setDHNs">
|
||||
<input message="tns:SetDHNInputMessage"/>
|
||||
<output message="tns:SetDHNOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="setDLtoPendingState">
|
||||
<input message="tns:SetDLtoPendingStateInputMessage"/>
|
||||
<output message="tns:SetDLtoPendingStateOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="deployDL">
|
||||
<input message="tns:DeployDLInputMessage"/>
|
||||
<output message="tns:DeployDLOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="checkDLStatus">
|
||||
<input message="tns:CheckDLStatusInputMessage"/>
|
||||
<output message="tns:CheckDLStatusOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
</portType>
|
||||
|
||||
|
||||
|
||||
</definitions>
|
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions name="ModelFactory"
|
||||
targetNamespace="http://gcube-system.org/namespaces/vremanagement/vremodeler"
|
||||
xmlns:tns="http://gcube-system.org/namespaces/vremanagement/vremodeler"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:corefaults="http://gcube-system.org/namespaces/common/core/faults"
|
||||
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" >
|
||||
|
||||
<import namespace="http://gcube-system.org/namespaces/common/core/faults" location="../gcube/common/core/faults/GCUBEFaults.wsdl"/>
|
||||
|
||||
|
||||
<!--============================================================
|
||||
|
||||
T Y P E S
|
||||
|
||||
============================================================-->
|
||||
|
||||
<types>
|
||||
<xsd:schema targetNamespace="http://gcube-system.org/namespaces/vremanagement/vremodeler"
|
||||
xmlns:tns="http://gcube-system.org/namespaces/vremanagement/vremodeler">
|
||||
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd" />
|
||||
|
||||
<!-- REQUESTS AND RESPONSES -->
|
||||
|
||||
|
||||
<xsd:element name="createResource">
|
||||
<xsd:complexType/>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="createResourceResponse" type="wsa:EndpointReferenceType"/>
|
||||
|
||||
|
||||
<xsd:element name="getAllDLsMessageResponse" type="xsd:string"/>
|
||||
<xsd:element name="getAllDLsMessageRequest" type="coretypes:VOID"/>
|
||||
|
||||
|
||||
|
||||
<xsd:element name="initDBRequestMessage" type="coretypes:VOID"/>
|
||||
|
||||
<xsd:element name="initDBResponseMessage" type="coretypes:VOID"/>
|
||||
|
||||
<xsd:element name="removeDLRequestMessage" type="xsd:string"/>
|
||||
|
||||
|
||||
<xsd:element name="removeDLResponseMessage" type="coretypes:VOID"/>
|
||||
|
||||
<xsd:element name="getExistingNamesResponseMessage">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="names" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="getExistingNamesRequestMessage" type="coretypes:VOID"/>
|
||||
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
|
||||
|
||||
<!--============================================================
|
||||
|
||||
M E S S A G E S
|
||||
|
||||
============================================================-->
|
||||
<message name="CreateResourceRequest">
|
||||
<part name="request" element="tns:createResource"/>
|
||||
</message>
|
||||
<message name="CreateResourceResponse">
|
||||
<part name="response" element="tns:createResourceResponse"/>
|
||||
</message>
|
||||
<message name="GetAllDLsRequest">
|
||||
<part name="request" element="tns:getAllDLsMessageRequest"/>
|
||||
</message>
|
||||
<message name="GetAllDLsResponse">
|
||||
<part name="response" element="tns:getAllDLsMessageResponse"/>
|
||||
</message>
|
||||
<message name="InitDBInputMessage">
|
||||
<part name="request" element="tns:initDBRequestMessage"/>
|
||||
</message>
|
||||
<message name="InitDBOutputMessage">
|
||||
<part name="response" element="tns:initDBResponseMessage"/>
|
||||
</message>
|
||||
<message name="RemoveDLInputMessage">
|
||||
<part name="request" element="tns:removeDLRequestMessage"/>
|
||||
</message>
|
||||
<message name="RemoveDLOutputMessage">
|
||||
<part name="response" element="tns:removeDLResponseMessage"/>
|
||||
</message>
|
||||
<message name="GetExistingNamesInputMessage">
|
||||
<part name="request" element="tns:getExistingNamesRequestMessage"/>
|
||||
</message>
|
||||
<message name="GetExistingNamesOutputMessage">
|
||||
<part name="response" element="tns:getExistingNamesResponseMessage"/>
|
||||
</message>
|
||||
|
||||
<!--============================================================
|
||||
|
||||
P O R T T Y P E
|
||||
|
||||
============================================================-->
|
||||
|
||||
<portType name="ModelFactoryPortType">
|
||||
<operation name="createResource">
|
||||
<input message="tns:CreateResourceRequest"/>
|
||||
<output message="tns:CreateResourceResponse"/>
|
||||
</operation>
|
||||
<operation name="getAllDLs">
|
||||
<input message="tns:GetAllDLsRequest"/>
|
||||
<output message="tns:GetAllDLsResponse"/>
|
||||
</operation>
|
||||
|
||||
<operation name="initDB">
|
||||
<input message="tns:InitDBInputMessage"/>
|
||||
<output message="tns:InitDBOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="getExistingNamesDLs">
|
||||
<input message="tns:GetExistingNamesInputMessage"/>
|
||||
<output message="tns:GetExistingNamesOutputMessage"/>
|
||||
</operation>
|
||||
|
||||
<operation name="removeDL">
|
||||
<input message="tns:RemoveDLInputMessage"/>
|
||||
<output message="tns:RemoveDLOutputMessage"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
|
||||
|
||||
</definitions>
|
|
@ -10,7 +10,7 @@ import java.sql.SQLException;
|
|||
import java.sql.Statement;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.diligentproject.vdlgeneratorservice.model.impl.ModelService;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -19,9 +19,7 @@ import org.diligentproject.vdlgeneratorservice.model.impl.ModelService;
|
|||
*/
|
||||
public class DBInterface {
|
||||
|
||||
|
||||
private static Log logger =LogFactory.getLog(ModelService.class.getName());
|
||||
|
||||
|
||||
private static Connection conn;
|
||||
|
||||
private static String dbFile = System.getenv("GLOBUS_LOCATION") + File.separator + "etc" + File.separator + "org_diligentproject_vdlgeneratorservice_model" + File.separator + "hsqldb" + File.separator + "vdldb";
|
||||
|
@ -68,7 +66,7 @@ public class DBInterface {
|
|||
st = conn.createStatement(); // statement objects can be reused with
|
||||
st.executeUpdate(query);
|
||||
st.close();
|
||||
}catch(SQLException e){logger.error("error executing Query");throw new RemoteException("error creating SQL statement",e);}
|
||||
}catch(SQLException e){logger.error("error executing Query", e);throw new RemoteException("error creating SQL statement",e);}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,10 +13,14 @@ import javax.naming.NamingException;
|
|||
import javax.xml.namespace.QName;
|
||||
import javax.xml.rpc.server.ServiceLifecycle;
|
||||
|
||||
import org.apache.axis.components.uuid.UUIDGen;
|
||||
import org.apache.axis.components.uuid.UUIDGenFactory;
|
||||
import org.apache.axis.message.addressing.AttributedURI;
|
||||
import org.apache.axis.message.addressing.EndpointReferenceType;
|
||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.common.core.porttypes.GCUBEStartupPortType;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.globus.wsrf.Constants;
|
||||
import org.globus.wsrf.NoResourceHomeException;
|
||||
import org.globus.wsrf.ResourceContext;
|
||||
|
@ -39,18 +43,23 @@ import org.apache.commons.logging.LogFactory;
|
|||
|
||||
public class ModelFactoryService extends GCUBEStartupPortType{
|
||||
|
||||
private GCUBELog logger = new GCUBELog(this);
|
||||
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
||||
|
||||
@Override
|
||||
protected GCUBEServiceContext getServiceContext() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
protected ServiceContext getServiceContext() {
|
||||
return ServiceContext.getContext();
|
||||
}
|
||||
|
||||
/* Implementation of createResource Operation */
|
||||
public CreateResourceResponse createResource(CreateResource request) throws RemoteException {
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
public EndpointReferenceType createResource(CreateResource request) throws GCUBEFault {
|
||||
String id=uuidGen.nextUUID();
|
||||
ModelerResource mr;
|
||||
try{
|
||||
ModelerContext pctx= ModelerContext.getPortTypeContext();
|
||||
mr=(ModelerResource)pctx.getWSHome().create(pctx.makeKey(id), id);
|
||||
return mr.getEPR();
|
||||
}catch (Exception e){logger.error("error creating resource",e); throw new GCUBEFault(e);}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,25 +1,33 @@
|
|||
package org.gcube.vremanagement.vremodeler.impl;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEPortTypeContext;
|
||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
|
||||
public class ModelerContext extends GCUBEPortTypeContext{
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
|
||||
public class ModelerContext extends GCUBEStatefulPortTypeContext{
|
||||
|
||||
public static String FREQUENT_USER_LIMIT_JNDI_NAME = "frequentUserLimit";
|
||||
|
||||
private static ModelerContext cache = new ModelerContext();
|
||||
|
||||
private ModelerContext(){}
|
||||
|
||||
@Override
|
||||
public String getJNDIName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return "gcube/vdlmanagement/vdlmodeler/ModelerService";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespace() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GCUBEServiceContext getServiceContext() {
|
||||
return null;
|
||||
}
|
||||
public ServiceContext getServiceContext() {
|
||||
return ServiceContext.getContext();
|
||||
}
|
||||
|
||||
public static ModelerContext getPortTypeContext() {
|
||||
return cache;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package org.gcube.vremanagement.vremodeler.impl;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
import org.gcube.common.core.state.GCUBEWSHome;
|
||||
|
||||
public class ModelerHome extends GCUBEWSHome{
|
||||
|
||||
@Override
|
||||
public GCUBEStatefulPortTypeContext getPortTypeContext() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
public ModelerContext getPortTypeContext() {
|
||||
return ModelerContext.getPortTypeContext();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.gcube.vremanagement.vremodeler.impl;
|
||||
|
||||
public class ModelerResource {
|
||||
import org.gcube.common.core.state.GCUBEWSResource;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
|
||||
public class ModelerResource extends GCUBEWSResource {
|
||||
|
||||
@Override
|
||||
protected void initialise(Object... arg0) throws ResourceException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,21 @@ import org.gcube.common.core.contexts.GCUBEServiceContext;
|
|||
|
||||
public class ServiceContext extends GCUBEServiceContext{
|
||||
|
||||
@Override
|
||||
protected String getJNDIName() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
/** Single context instance, created eagerly */
|
||||
private static ServiceContext cache = new ServiceContext();
|
||||
|
||||
/** Returns cached instance */
|
||||
public static ServiceContext getContext() {return cache;}
|
||||
|
||||
/** Prevents accidental creation of more instances */
|
||||
private ServiceContext(){};
|
||||
|
||||
/** {@inheritDoc} */
|
||||
protected String getJNDIName() {return "gcube/vdlmanagement/vdlmodeler";}
|
||||
|
||||
protected void onReady() throws Exception{
|
||||
logger.info("ready event invoked on " + this.getName());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue