|
|
|
@ -6,24 +6,36 @@
|
|
|
|
|
|
|
|
|
|
<property name="addonShortName" value="Soap"/>
|
|
|
|
|
<property name="addonVersion" value="0.1"/>
|
|
|
|
|
|
|
|
|
|
<property name="addonLongName" value="${addonShortName}Addon"/>
|
|
|
|
|
<property name="addonArchive" location="${release}/${addonLongName}_${addonVersion}.tgz"/>
|
|
|
|
|
|
|
|
|
|
<target name="compile">
|
|
|
|
|
<javac srcdir="${src}/de/anomic/soap/" destdir="${build}" source="${javacSource}" target="${javacTarget}" debug="true" debuglevel="lines,vars,source">
|
|
|
|
|
<classpath>
|
|
|
|
|
<pathelement location="${build}" />
|
|
|
|
|
<property name="clientStub" location="${release}/SOAP_CLIENT" />
|
|
|
|
|
<property name="clientStubSrc" location="${clientStub}/source" />
|
|
|
|
|
<property name="clientStubBuild" location="${clientStub}/classes" />
|
|
|
|
|
|
|
|
|
|
<!-- defining the classpath that should be used for compiling -->
|
|
|
|
|
<path id="soap.class.path">
|
|
|
|
|
<pathelement location="${build}" />
|
|
|
|
|
|
|
|
|
|
<!-- all needed libs -->
|
|
|
|
|
<pathelement location="${libx}/axis.jar" />
|
|
|
|
|
<pathelement location="${libx}/axis-ant.jar" />
|
|
|
|
|
<pathelement location="${libx}/commons-discovery.jar" />
|
|
|
|
|
<pathelement location="${libx}/commons-logging.jar" />
|
|
|
|
|
<pathelement location="${libx}/jaxrpc.jar" />
|
|
|
|
|
<pathelement location="${libx}/saaj.jar" />
|
|
|
|
|
<pathelement location="${libx}/wsdl4j.jar" />
|
|
|
|
|
</classpath>
|
|
|
|
|
<pathelement location="${libx}/axis.jar" />
|
|
|
|
|
<pathelement location="${libx}/axis-ant.jar" />
|
|
|
|
|
<pathelement location="${libx}/commons-discovery.jar" />
|
|
|
|
|
<pathelement location="${libx}/commons-logging.jar" />
|
|
|
|
|
<pathelement location="${libx}/jaxrpc.jar" />
|
|
|
|
|
<pathelement location="${libx}/saaj.jar" />
|
|
|
|
|
<pathelement location="${libx}/wsdl4j.jar" />
|
|
|
|
|
</path>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="compile">
|
|
|
|
|
<javac srcdir="${src}/de/anomic/soap/"
|
|
|
|
|
destdir="${build}"
|
|
|
|
|
source="${javacSource}"
|
|
|
|
|
target="${javacTarget}"
|
|
|
|
|
debug="true"
|
|
|
|
|
debuglevel="lines,vars,source"
|
|
|
|
|
classpathref="soap.class.path">
|
|
|
|
|
</javac>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
@ -58,6 +70,60 @@
|
|
|
|
|
|
|
|
|
|
<target name="dist" depends="compile,zip" description="Compile and zip the addon"/>
|
|
|
|
|
|
|
|
|
|
<target name="genClientStubFiles">
|
|
|
|
|
<!-- ensure that the temp directory exists -->
|
|
|
|
|
<mkdir dir="${clientStubSrc}"/>
|
|
|
|
|
|
|
|
|
|
<!-- define the foreach task -->
|
|
|
|
|
<taskdef name="foreach" classname="org.apache.axis.tools.ant.foreach.ForeachTask" classpathref="soap.class.path"/>
|
|
|
|
|
|
|
|
|
|
<!-- loop through the wsdl files -->
|
|
|
|
|
<foreach target="genClientStubFileFromWSDL">
|
|
|
|
|
<param name="wsdlFileName">
|
|
|
|
|
<fileset dir="${src}/de/anomic/soap/services/" includes="*.wsdl"/>
|
|
|
|
|
</param>
|
|
|
|
|
</foreach>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<!-- generates client stub classes for a soap service -->
|
|
|
|
|
<target name="genClientStubFileFromWSDL" description="Generate YaCy SOAP client stub java files from wsdl">
|
|
|
|
|
<!-- define the wasdl2java task -->
|
|
|
|
|
<taskdef name="axis-wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" classpathref="soap.class.path"/>
|
|
|
|
|
|
|
|
|
|
<axis-wsdl2java
|
|
|
|
|
output="${clientStubSrc}"
|
|
|
|
|
url="file:///${wsdlFileName}" >
|
|
|
|
|
<mapping
|
|
|
|
|
namespace="http://axis.apache.org/ns/interop"
|
|
|
|
|
package="interop" />
|
|
|
|
|
</axis-wsdl2java>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="compileClientStubClasses" depends="genClientStubFiles" description="Compile YaCy SOAP client stube classes">
|
|
|
|
|
<mkdir dir="${clientStubBuild}"/>
|
|
|
|
|
<javac srcdir="${clientStubSrc}"
|
|
|
|
|
destdir="${clientStubBuild}"
|
|
|
|
|
source="${javacSource}"
|
|
|
|
|
target="${javacTarget}"
|
|
|
|
|
debug="true"
|
|
|
|
|
debuglevel="lines,vars,source"
|
|
|
|
|
classpathref="soap.class.path">
|
|
|
|
|
</javac>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="buildClientStubJar" depends="compileClientStubClasses">
|
|
|
|
|
<!-- delete old jar file -->
|
|
|
|
|
<delete file="${}/yacySoapClient.jar" />
|
|
|
|
|
|
|
|
|
|
<!-- copy all source and class files into the jar -->
|
|
|
|
|
<jar destfile="${clientStub}/yacySoapClient.jar" basedir="${clientStub}/">
|
|
|
|
|
<fileset dir="${clientStubSrc}"/>
|
|
|
|
|
<fileset dir="${clientStubBuild}"/>
|
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
|
|
<!-- remove old temp directories -->
|
|
|
|
|
<delete dir="${clientStubSrc}"/>
|
|
|
|
|
<delete dir="${clientStubBuild}"/>
|
|
|
|
|
</target>
|
|
|
|
|
</project>
|
|
|
|
|
|
|
|
|
|