axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r265721 - in /webservices/axis/trunk/c: build/serviceInitialize.xml services.xml
Date Thu, 01 Sep 2005 13:39:10 GMT
Author: dicka
Date: Thu Sep  1 06:39:02 2005
New Revision: 265721

URL: http://svn.apache.org/viewcvs?rev=265721&view=rev
Log:
Updating scripts for testing server-side to use similar structure as used by client-side testing.

Modified:
    webservices/axis/trunk/c/build/serviceInitialize.xml
    webservices/axis/trunk/c/services.xml

Modified: webservices/axis/trunk/c/build/serviceInitialize.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build/serviceInitialize.xml?rev=265721&r1=265720&r2=265721&view=diff
==============================================================================
--- webservices/axis/trunk/c/build/serviceInitialize.xml (original)
+++ webservices/axis/trunk/c/build/serviceInitialize.xml Thu Sep  1 06:39:02 2005
@@ -1,124 +1,92 @@
 <project>
-	<target name="decideserverproperties">
-	<if>
-		<isset property="windows"/>
-		<then>
-			<echo message="we are in windows"/>
-			<property name="ps" value="\"/>
-			<property name="parserliblocation" value="${env.XERCES_HOME}/bin/${xerces.xmlParserLibrary}${librarySuffix}"/>
-			<property name="serverwsddfile" value="${basedir}/build/server.wsdd.win32" />
-			<condition property="parserspecificlibname" value="${xml4c.xmlParserLibraryName}">
-				<equals arg1="${xmlParser.xml4c}" arg2="true" />
-			</condition>
-			<condition property="parserspecificlibname" value="${xerces.xmlParserLibraryName}"
>
-				<equals arg1="${xmlParser.xerces}" arg2="true" />	
-			</condition>
-
-
-			<!-- environment variables start from here in pairs -->
-			<property name="serverenv.env1" value="AXISCPP_DEPLOY" />
-			<property name="serverenv.env1.value" value="${basedir}\..\..\..\Axis"/>
-			<property name="serverenv.env2" value="PATH"/>
-			<property name="serverenv.env2.value" 
-				value="${java.library.path};${basedir}\..\..\..\Axis\lib"/>
-
-			<!-- The path to axiscpp.conf -->
-			<property name="axiscppconffile" value="${basedir}\..\..\..\Axis\axiscpp.conf" />
-			<property name="serverwsddpath" value="${basedir}\..\..\..\Axis\conf\server.wsdd"/>
-			<property name="deploymentconfdir" value="conf"/>
-
-			<if>
-			<istrue value="${server.apache1}"/>
-				<then>
-					<property name="serverexecutable" value="${env.APACHE_HOME}\apache"/>
-					<property name="startargs" value="-k start"/>
-					<property name="stopargs" value=" -k stop"/>
-
-				</then>
-				<else>
-					<if>
-					<istrue value="${server.apache2}"/>
-					<then>
-						<property name="serverexecutable" value="${env.APACHE2_HOME}\bin\apache"/>
-						<property name="startargs" value=" "/>
-					</then>
-					<elseif>
-						<istrue value="${server.simpleaxisserver}"/>
-						<then>
-						<property name="serverexecutable" 
-							value="${basedir}/../../../obj/bin/${simpleAxisServerExecutableName}${executableSuffix}"/>
-						<property name="startargs" value=" ${testPort}"/>
-						</then>
-					</elseif>
-					</if>
-				</else>
-			</if>
-
-
-		</then>
-		<elseif>
-		<isset property="linux"/>
-		<then>
-			<echo message="we are in linux" />
-			<property name="ps" value="/"/>
-			<property name="parserliblocation" value="${env.XERCES_HOME}/lib/lib${xerces.xmlParserLibrary}${librarySuffix}"/>
-			<property name="serverwsddfile" value="${basedir}/build/server.wsdd.linux" />
-
-
-
-			<condition property="parserspecificlibname" value="lib${xml4c.xmlParserLibraryName}">
-				<equals arg1="${xmlParser.xml4c}" arg2="true" />
-			</condition>
-			<condition property="parserspecificlibname" value="lib${xerces.xmlParserLibraryName}"
>
-				<equals arg1="${xmlParser.xerces}" arg2="true" />	
-			</condition>
+    <target name="decideserverproperties">
 
-
-
-
-
-
-			<!-- environment variables start from here in pairs -->
-			<property name="serverenv.env1" value="AXISCPP_DEPLOY" />
-			<property name="serverenv.env1.value" value="${basedir}/../../../Axis"/>
-			<property name="serverenv.env2" value="LD_LIBRARY_PATH"/>
-			<property name="serverenv.env2.value"
-				value="${basedir}/../../../Axis/lib:${basedir}/../../../Axis/webservices:${env.LD_LIBRARY_PATH}"/>
-			<!-- The path to axiscpp.conf -->
-			<property name="axiscppconffile" value="${basedir}/../../../Axis/etc/axiscpp.conf"
/>
-			<property name="serverwsddpath" value="${basedir}/../../../Axis/etc/server.wsdd"/>
-			<property name="deploymentconfdir" value="etc"/>
-
-			<if>
-			<istrue value="${server.apache1}"/>
-				<then>
-					<property name="serverexecutable" value="${env.APACHE_HOME}/bin/apachectl"/>
-					<property name="startargs" value=" start"/>
-					<property name="stopargs" value=" stop"/>
-
-				</then>
-				<else>
-					<if>
-					<istrue value="${server.apache2}"/>
-					<then>
-						<property name="serverexecutable" value="${env.APACHE2_HOME}/bin/apachectl"/>
-						<property name="startargs" value=" start"/>
-						<property name="stopargs" value=" stop"/>
-					</then>
-					<elseif>
-						<istrue value="${server.simpleaxisserver}"/>
-						<then>
-						<property name="serverexecutable" 
-							value="${basedir}/../../../obj/bin/${simpleAxisServerExecutableName}${executableSuffix}"/>
-						<property name="startargs" value=" ${testPort}"/>
-						</then>
-					</elseif>
-					</if>
-				</else>
-			</if>
-	</then>
-		</elseif>
-	</if>
-
-	</target>
+        <property name="wsdd.file" value="${dir.test.generated}${file.separator}server${file.separator}server.wsdd"
/>
+        
+        <if>
+            <isset property="windows" />
+            <then>
+                <echo message="we are in windows" />
+
+                <!-- environment variables start from here in pairs -->
+                <property name="serverenv.env" value="PATH" />
+                <property name="serverenv.env.value" value="${java.library.path};${dir.libraries}"
/>
+
+                <!-- The path to axiscpp.conf -->
+                <!-- Set location of axiscpp.conf file -->
+                <condition property="axiscppconffile" value="${axiscpp_deploy}/server/axiscpp.conf">
+                    <isset property="windows" />
+                </condition>
+                <condition property="axiscppconffile" value="${axiscpp_deploy}/server/etc/axiscpp.conf">
+                    <not>
+                        <isset property="windows" />
+                    </not>
+                </condition>
+
+                <if>
+                    <istrue value="${server.apache1}" />
+                    <then>
+                        <property name="serverexecutable" value="${env.APACHE_HOME}\apache"
/>
+                        <property name="startargs" value="-k start" />
+                        <property name="stopargs" value=" -k stop" />
+
+                    </then>
+                    <else>
+                        <if>
+                            <istrue value="${server.apache2}" />
+                            <then>
+                                <property name="serverexecutable" value="${env.APACHE2_HOME}\bin\apache"
/>
+                                <property name="startargs" value=" " />
+                            </then>
+                            <elseif>
+                                <istrue value="${server.simpleaxisserver}" />
+                                <then>
+                                    <property name="serverexecutable" value="${dir.release}/bin/${simpleAxisServerExecutableName}${executableSuffix}"
/>
+                                    <property name="startargs" value=" ${testPort}" />
+                                </then>
+                            </elseif>
+                        </if>
+                    </else>
+                </if>
+            </then>
+            <elseif>
+                <isset property="linux" />
+                <then>
+                    <echo message="we are in linux" />
+
+                    <!-- environment variables start from here in pairs -->
+                    <property name="serverenv.env" value="LD_LIBRARY_PATH" />
+                    <property name="serverenv.env.value" value="${dir.libraries}:${basedir}/../../../Axis/webservices:${env.LD_LIBRARY_PATH}"
/>
+                    <!-- The path to axiscpp.conf -->
+                    <property name="axiscppconffile" value="${basedir}/../../../Axis/etc/axiscpp.conf"
/>
+
+                    <if>
+                        <istrue value="${server.apache1}" />
+                        <then>
+                            <property name="serverexecutable" value="${env.APACHE_HOME}/bin/apachectl"
/>
+                            <property name="startargs" value=" start" />
+                            <property name="stopargs" value=" stop"/>
+                        </then>
+                        <else>
+                            <if>
+                                <istrue value="${server.apache2}"/>
+                                <then>
+                                    <property name="serverexecutable" value="${env.APACHE2_HOME}/bin/apachectl"/>
+                                    <property name="startargs" value=" start"/>
+                                    <property name="stopargs" value=" stop"/>
+                                </then>
+                                <elseif>
+                                    <istrue value="${server.simpleaxisserver}"/>
+                                    <then>
+                                        <property name="serverexecutable" value="${dir.release}/bin/${simpleAxisServerExecutableName}${executableSuffix}"/>
+                                        <property name="startargs" value=" ${testPort}"/>
+                                    </then>
+                                </elseif>
+                            </if>
+                        </else>
+                    </if>
+                </then>
+            </elseif>
+        </if>
+    </target>
 </project>

Modified: webservices/axis/trunk/c/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/services.xml?rev=265721&r1=265720&r2=265721&view=diff
==============================================================================
--- webservices/axis/trunk/c/services.xml (original)
+++ webservices/axis/trunk/c/services.xml Thu Sep  1 06:39:02 2005
@@ -1,261 +1,258 @@
 <project name="services" default="deployServices">
 
-
-	<import file="${basedir}/build/buildInitialize.xml"/>
-	<import file="${basedir}/build/testInitialize.xml"/>
-	<import file="${basedir}/build/serviceInitialize.xml"/>
-
-	<target name="prepareDeployment" depends="initialize, decideserverproperties">
-
-	<delete dir="${basedir}/../../../Axis"/>
-	<copy todir="${basedir}/../../../Axis" >
-		<fileset dir="${basedir}/deploy"/>
-	</copy>
-
-	<copy todir="${basedir}/../../../Axis/lib">
-		<fileset dir="${basedir}/../../../obj/bin/">
-			<include name="${libraryPrefix}${serverEngineLibraryName}${librarySuffix}"/>
-			<include name="${libraryPrefix}${HTTP.ChannelLibraryName}${librarySuffix}"/>
-			<include name="${libraryPrefix}${transportLibraryName}${librarySuffix}"/>
-		</fileset>
-	</copy>
-
-	<copy file="${parserliblocation}" 
-		todir="${basedir}/../../../Axis/lib"/>
-	<copy file="${basedir}/../../../obj/bin/${parserspecificlibname}${librarySuffix}" 
-		tofile="${basedir}/../../../Axis/lib/${libraryPrefix}${xmlParserLibraryName}${librarySuffix}"
/>
-
-
-	<echo file="${axiscppconffile}"># The comment character is '#'
-#Available directives are as follows
-#(Some of these directives may not be implemented yet)
+    <import file="${basedir}/build/buildInitialize.xml" />
+    <import file="${basedir}/build/testInitialize.xml" />
+    <import file="${basedir}/build/serviceInitialize.xml" />
+
+    <target name="createConfigurationFile" depends="initialize, decideserverproperties">
+        <!-- Select which parser library to use -->
+        <condition property="ClientParserLib" value="${libraryPrefix}${xml4c.xmlParserLibraryName}${librarySuffix}">
+            <istrue value="${testconf.client.parser.xml4c}"/>
+        </condition>
+        <condition property="ClientParserLib" value="${libraryPrefix}${xerces.xmlParserLibraryName}${librarySuffix}">
+            <istrue value="${testconf.client.parser.xerces}"/>
+        </condition>
+
+        <dirname file="${axiscppconffile}" property="axisCPPConfFilePath"/>
+        <mkdir dir="${axisCPPConfFilePath}"/>
+        <echo file="${axiscppconffile}"># The comment character is '#'
+# Available directives are as follows
 #
-#WSDDFilePath:The path to the server wsdd
-#LogPath:The path to the axis log 
-#ClientLogPath:The path to the axis client log
-#ClientWSDDFilePath:The path to the client wsdd
-#Transport_http:The HTTP transport library
-#Transport_smtp:The SMTP transport library
-#XMLParser:The xml parser library
-#NodeName:Node name
-#ListenPort:Listening port
+# WSDDFilePath:       The path to the server wsdd
+# LogPath:            The path to the axis log 
+# XMLParser:          The xml parser library
+# NodeName:           Node name
+# ListenPort:         Listening port
 #
-LogPath:${basedir}${ps}..${ps}..${ps}..${ps}Axis${ps}log${ps}server.log
-WSDDFilePath:${serverwsddpath}
-Transport_http:${basedir}${ps}..${ps}..${ps}..${ps}Axis${ps}lib${ps}${libraryPrefix}${HTTP.transportLibraryName}${librarySuffix}
-XMLParser:${basedir}${ps}..${ps}..${ps}..${ps}Axis${ps}lib${ps}${libraryPrefix}${xmlParserLibraryName}${librarySuffix}
-Channel_HTTP:${basedir}${ps}..${ps}..${ps}..${ps}Axis${ps}lib${ps}${libraryPrefix}${HTTP.ChannelLibraryName}${librarySuffix}
-	</echo>
-
-<!--	<copy file="${serverwsddfile}" 
-			tofile="${serverwsddpath}"/> -->
-
-
-	</target>
-
-
-	<target name="runserver" depends="initialize, decideserverproperties">
-	<exec executable="${serverexecutable}" spawn="true">
-		<arg line="${startargs}" />
-		<env key="${serverenv.env1}" value="${serverenv.env1.value}"/>
-		<env key="${serverenv.env2}" value="${serverenv.env2.value}" />
-	</exec>
-	</target>
-
-
-	<target name="stopserver" depends="initialize, decideserverproperties">
-	<!-- This is necessary since stoppping apache2 is a problem sometimes. 
-		The user will have to manually stop the server in this case.-->
-	<if>
-	<isset property="stopargs"/>
-	<then>
-	<exec executable="${serverexecutable}" >
-		<arg line="${stopargs}" />
-		<env key="${serverenv.env1}" value="${serverenv.env1.value}"/>
-		<env key="${serverenv.env2}" value="${serverenv.env2.value}" />
-	</exec>
-	<sleep seconds="3"/>
-	</then>
-	<else>
-	<echo message="WARNING!"/>
-	<echo message="this script can't stop this server (${serverexecutable}). 
-			If the server is started stop it yourself and then run ant again"/>
-	</else>
-	</if>
-	</target>
-
-
-	<target name="deployServices" depends="initialize, stopserver, prepareDeployment, startWSDDFile,
buildServices, endWSDDFile, runserver"
-	 	description="Build and deploy services for tests"/>
+ClientLogPath:${dir.test.generated}/ServerLog.taw
+WSDDFilePath:${wsdd.file}
+Transport_http:${dir.libraries}/${libraryPrefix}${HTTP.transportLibraryName}${librarySuffix}
+Channel_HTTP:${dir.libraries}/${libraryPrefix}${HTTP.ChannelLibraryName}${librarySuffix}
+XMLParser:${dir.libraries}/${ClientParserLib}
+</echo>
+    </target>
 
 
-	<target name="startWSDDFile">
-<echo file="${basedir}/build/server.wsdd">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+    <target name="runserver" depends="initialize, decideserverproperties">
+        <exec executable="${serverexecutable}" spawn="false">
+            <arg line="${startargs}" />
+            <env key="AXISCPP_DEPLOY" value="${axiscpp_deploy}/server" />
+            <env key="${serverenv.env}" value="${serverenv.env.value}" />
+        </exec>
+    </target>
+
+
+    <target name="stopserver" depends="initialize, decideserverproperties">
+        <!-- This is necessary since stoppping apache2 is a problem sometimes. 
+			The user will have to manually stop the server in this case.-->
+        <if>
+            <isset property="stopargs" />
+            <then>
+                <exec executable="${serverexecutable}">
+                    <arg line="${stopargs}" />
+                    <env key="${serverenv.env1}"
+                         value="${serverenv.env1.value}" />
+                    <env key="${serverenv.env2}"
+                         value="${serverenv.env2.value}" />
+                </exec>
+                <sleep seconds="3" />
+            </then>
+            <else>
+                <echo message="WARNING!" />
+                <echo message="this script can't stop this server (${serverexecutable}).

+				If the server is started stop it yourself and then run ant again" />
+            </else>
+        </if>
+    </target>
+
+
+    <target name="deployServices"
+            depends="initialize, stopserver, createConfigurationFile, startWSDDFile, buildServices,
endWSDDFile, runserver"
+            description="Build and deploy services for tests" />
+
+
+    <target name="startWSDDFile">
+        <dirname file="${wsdd.file}" property="WSDDFilePath"/>
+        <mkdir dir="${WSDDFilePath}"/>
+        <echo file="${wsdd.file}">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:C="http://xml.apache.org/axis/wsdd/providers/C"
xmlns:CPP="http://xml.apache.org/axis/wsdd/providers/CPP"&gt;
 
 &lt;globalConfiguration&gt;
 &lt;/globalConfiguration&gt;
 </echo>
-	</target>
-
-
-	<target name="endWSDDFile">
-	<echo file="${basedir}/build/server.wsdd" append="true">&lt;/deployment&gt;</echo>
-	<move file="${basedir}/build/server.wsdd" todir="${basedir}/../../../Axis/conf"/>
-	</target>
+    </target>
 
 
-	<target name="buildServices" depends="initialize, setServiceList">
-		<foreach target="buildService" param="service_property" inheritall="true">
-			<path refid="service_properties"/>
-		</foreach>
-	</target>
+    <target name="endWSDDFile">
+        <echo file="${wsdd.file}" append="true">&lt;/deployment&gt;</echo>
+    </target>
+
+
+    <target name="buildServices" depends="initialize, setServiceList">
+        <foreach target="buildService"
+                 param="service_property"
+                 inheritall="true">
+            <path refid="service_properties" />
+        </foreach>
+    </target>
+    <target name="setServiceList"
+            depends="setListType,setIndividual,setFromList,setAll" />
+    <target name="setListType">
+        <condition property="allService">
+            <and>
+                <not>
+                    <isset property="service.name" />
+                </not>
+                <not>
+                    <isset property="service.list" />
+                </not>
+            </and>
+        </condition>
+    </target>
 
 
-
-	<target name="setServiceList" depends="setListType,setIndividual,setFromList,setAll"/>
-
-	<target name="setListType">
-		<condition property="allService">
-			<and>
-				<not>
-					<isset property="service.name"/>
-				</not>
-				<not>
-					<isset property="service.list"/>
-				</not>
-			</and>
-		</condition>
-	</target>
-
-	<!--
+    <!--
 	  Create a list of just 1 Service from command line parameter -Dservice.name=
 	  -->
-	<target name="setIndividual" if="service.name">
-		<echo message="setIndividual ${service.name}"/>
-		<path id="service_properties">
-			<fileset dir="${dir.autotests}/tests/server" includes="${service.name}.xml"/>
-		</path>
-	</target>
+    <target name="setIndividual" if="service.name">
+        <echo message="setIndividual ${service.name}" />
+        <path id="service_properties">
+            <fileset dir="${dir.autotests}/tests/server"
+                     includes="${service.name}.xml" />
+        </path>
+    </target>
 
 
-	<!--
+    <!--
 	  Create a list of Services from a properties file unless an individual Service has been
specified too
 	  -->
-	<target name="setFromList" if="service.list" unless="service.name">
-		<echo message="setFromList ${service.list}"/>
-		<path id="service_properties">
-			<fileset dir="${dir.autotests}/tests/server" includesfile="${service.list}"/>
-		</path>
-	</target>
+    <target name="setFromList" if="service.list" unless="service.name">
+        <echo message="setFromList ${service.list}" />
+        <path id="service_properties">
+            <fileset dir="${dir.autotests}/tests/server"
+                     includesfile="${service.list}" />
+        </path>
+    </target>
 
-	<!--
+
+    <!--
 	  Create a list of all the Services
 	  -->
-	<target name="setAll" if="allService">
-		<echo message="setAll ${dir.autotests}/tests/server"/>
-		<path id="service_properties">
-			<fileset dir="${dir.autotests}/tests/server" includes="*.xml"/>
-		</path>
-	</target>
-
-	<target name="buildService" depends="setPropertiesForService,generateStubs, compileService,
generateWSDDService"/>	
-
-	<target name="setPropertiesForService" depends="loadXMLProperties,setServiceName,setServiceDesc,setServiceCode,setServiceLang,setServiceWsdl"/>
-
-
-	<target name="loadXMLProperties">
-		<echo message="Loading XML file ${service_property}"/>
-		<xmlproperty file="${service_property}" keepRoot="true"/>
-	</target>
-	<target name="setServiceName" if="service.name">
-		<propertycopy property="serviceName" from="service.name"/>
-	</target>
-	<target name="setServiceDesc" if="service.description">
-		<propertycopy property="serviceDesc" from="service.description"/>
-	</target>
-	<target name="setServiceCode" if="service.serviceCode">
-		<propertycopy property="serviceCode" from="service.serviceCode"/>
-	</target>
-	<target name="setServiceLang" if="service.serviceLang">
-		<propertycopy property="serviceLang" from="service.serviceLang"/>
-	</target>
-	<target name="setServiceWsdl" if="service.wsdl">
-		<propertycopy property="serviceWsdl" from="service.wsdl"/>
-	</target>
-	<target name="cleanService">
-		<delete dir="${dir.test.generated}/${serviceLang}/${serviceName}"/>
-	</target>
-
-	<target name="setLanguage">
-		<condition property="generated.lang" value="c++">
-			<equals arg1="${serviceLang}" arg2="cpp"/>
-		</condition>
-	</target>
-
-	<target name="generateStubs" depends="setLanguage">
-		<!-- Make directory in which all generated code shall be placed -->
-		<echo message="${dir.test.generated}/server/${serviceLang}/${serviceName}"/>
-		<mkdir dir="${dir.test.generated}/server/${serviceLang}/${serviceName}"/>
-		<!-- Setup classpath for WSDL2Ws -->
-		<path id ="cp">
-			<fileset dir="${dir.wsdl2ws}" includes="wsdl2ws.jar"/>
-			<fileset dir="${dir.axisJARs}" includes="*.jar"/>
-		</path>
-		<!-- Run WSDL2Ws -->
-		<java classname="org.apache.axis.wsdl.wsdl2ws.WSDL2Ws" fork="true">
-			<classpath refid="cp"/>
-			<arg value="${dir.autotests}/wsdls/${serviceWsdl}"/>
-			<arg value="-o${dir.test.generated}/server/${serviceLang}/${serviceName}"/>
-			<arg value="-l${generated.lang}"/>
-			<arg value="-sserver"/>
-		</java>
-	</target>
-
-	<target name="compileService">
-	<copy file="${dir.autotests}/server/${serviceLang}/${serviceCode}"
-		tofile="${dir.test.generated}/server/${serviceLang}/${serviceName}/${serviceCode}" overwrite="true"/>
-		<cc failonerror="false" incremental="false"
-			outfile="${dir.test.generated}/server/${serviceLang}/${serviceName}/${serviceName}"
-		 	objdir="${dir.test.generated}/server/${serviceLang}/${serviceName}" exceptions="true"
-		 	outtype="shared" subsystem="console">
-
-		 	<!-- Compilers -->
-			<compiler refid="VisualC++"/>
-
-			<!-- Linkers -->
-			<linker refid="VisualC++Linker"/>
-
-			<!-- Axis Client .lib file location, or UNIX shared object -->
-			<!-- This lib is needed when building a service on windows where 
+    <target name="setAll" if="allService">
+        <echo message="setAll ${dir.autotests}/tests/server" />
+        <path id="service_properties">
+            <fileset dir="${dir.autotests}/tests/server" includes="*.xml" />
+        </path>
+    </target>
+
+    <target name="buildService"
+            depends="setPropertiesForService,generateStubs, compileService, generateWSDDService"
/>
+
+
+    <target name="setPropertiesForService"
+            depends="loadXMLProperties,setServiceName,setServiceDesc,setServiceCode,setServiceLang,setServiceWsdl"
/>
+
+
+    <target name="loadXMLProperties">
+        <echo message="Loading XML file ${service_property}" />
+        <xmlproperty file="${service_property}" keepRoot="true" />
+    </target>
+    <target name="setServiceName" if="service.name">
+        <propertycopy property="serviceName" from="service.name" />
+    </target>
+
+
+    <target name="setServiceDesc" if="service.description">
+        <propertycopy property="serviceDesc" from="service.description" />
+    </target>
+
+
+    <target name="setServiceCode" if="service.serviceCode">
+        <propertycopy property="serviceCode" from="service.serviceCode" />
+    </target>
+
+
+    <target name="setServiceLang" if="service.serviceLang">
+        <propertycopy property="serviceLang" from="service.serviceLang" />
+    </target>
+
+
+    <target name="setServiceWsdl" if="service.wsdl">
+        <propertycopy property="serviceWsdl" from="service.wsdl" />
+    </target>
+
+
+    <target name="cleanService">
+        <delete dir="${dir.test.generated}/${serviceLang}/${serviceName}" />
+    </target>
+
+
+    <target name="setLanguage">
+        <condition property="generated.lang" value="c++">
+            <equals arg1="${serviceLang}" arg2="cpp" />
+        </condition>
+    </target>
+
+
+    <target name="generateStubs" depends="setLanguage">
+        <!-- Make directory in which all generated code shall be placed -->
+        <echo message="${dir.test.generated}/server/${serviceLang}/${serviceName}" />
+        <mkdir dir="${dir.test.generated}/server/${serviceLang}/${serviceName}" />
+        <!-- Setup classpath for WSDL2Ws -->
+        <path id="cp">
+            <fileset dir="${dir.wsdl2ws}" includes="wsdl2ws.jar" />
+            <fileset dir="${dir.axisJARs}" includes="*.jar" />
+        </path>
+        <!-- Run WSDL2Ws -->
+        <java classname="org.apache.axis.wsdl.wsdl2ws.WSDL2Ws" fork="true">
+            <classpath refid="cp" />
+            <arg value="${dir.autotests}/wsdls/${serviceWsdl}" />
+            <arg value="-o${dir.test.generated}/server/${serviceLang}/${serviceName}"
/>
+            <arg value="-l${generated.lang}" />
+            <arg value="-sserver" />
+        </java>
+    </target>
+
+
+    <target name="compileService">
+        <copy file="${dir.autotests}/server/${serviceLang}/${serviceCode}"
+              tofile="${dir.test.generated}/server/${serviceLang}/${serviceName}/${serviceCode}"
+              overwrite="true" />
+        <cc failonerror="false"
+            incremental="false"
+            outfile="${dir.test.generated}/server/${serviceLang}/${serviceName}/${serviceName}"
+            objdir="${dir.test.generated}/server/${serviceLang}/${serviceName}"
+            exceptions="true"
+            outtype="shared"
+            subsystem="console">
+
+            <!-- Compilers -->
+            <compiler refid="VisualC++" />
+
+            <!-- Linkers -->
+            <linker refid="VisualC++Linker" />
+            <!-- Axis Client .lib file location, or UNIX shared object -->
+            <!-- This lib is needed when building a service on windows where 
 				AxisUserAPI implementation is needed -->
-			<libset dir="${dir.lib}" libs="${serverEngineLibraryName}"/>
-
-			<!-- Files to be compiled -->
-			<includepath path="${dir.include}"/>
-
-			<fileset dir="${dir.test.generated}/server/${serviceLang}/${serviceName}">
-				<include name="*.cpp"/>
-			</fileset>
-		</cc>
-		<copy failonerror="false" file="${dir.test.generated}/server/${serviceLang}/${serviceName}/${libraryPrefix}${serviceName}${librarySuffix}"

-			todir="${basedir}/../../../Axis/webservices"/>
-		<!-- <antcall target="generateWSDDService" inheritall="true"/> -->
-	</target>
-
+            <libset dir="${dir.lib}" libs="${serverEngineLibraryName}" />
 
+            <!-- Files to be compiled -->
+            <includepath path="${dir.include}" />
 
-
-<target name="generateWSDDService">
-<xmlproperty file="${dir.test.generated}/server/${serviceLang}/${serviceName}/deploy.wsdd"
collapseAttributes="true"/>
-
-<echo file="${basedir}/build/server.wsdd" append="true">
+            <fileset dir="${dir.test.generated}/server/${serviceLang}/${serviceName}">
+                <include name="*.cpp" />
+            </fileset>
+        </cc>
+    </target>
+
+
+    <target name="generateWSDDService">
+        <xmlproperty file="${dir.test.generated}/server/${serviceLang}/${serviceName}/deploy.wsdd"
+                     collapseAttributes="true" />
+        <echo file="${wsdd.file}" append="true">
 &lt;service name="${serviceName}" provider="${deployment.service.provider}" description="Axis
C++ web service" &gt;
-&lt;parameter name="className" value="${basedir}${ps}..${ps}..${ps}..${ps}Axis${ps}webservices${ps}${libraryPrefix}${serviceName}${librarySuffix}"/&gt;
+&lt;parameter name="className" value="${dir.test.generated}/server/${serviceLang}/${serviceName}/${libraryPrefix}${serviceName}${librarySuffix}"/&gt;
 &lt;/service&gt;
 </echo>
-</target>
-
-
-
+    </target>
 </project>



Mime
View raw message