You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Nagendra-Prasad, Anitha" <an...@hp.com> on 2004/01/27 16:46:41 UTC
Problem with SimpleAxisServer and fork()
I am trying to start SimpleAxisServer from within ant in a seperate JVM using fork().
The problem is after SimpleAxisServer is started in a seperate process(JVM). the control never comes back
to the prompt.
The following build.xml does the above.
--------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE project [
<!ENTITY properties SYSTEM "file:../../xmls/properties.xml">
<!ENTITY paths SYSTEM "file:../../xmls/path_refs.xml">
<!ENTITY taskdefs SYSTEM "file:../../xmls/taskdefs.xml">
<!ENTITY taskdefs_post_compile SYSTEM "file:../../xmls/taskdefs_post_compile.xml">
<!ENTITY targets SYSTEM "file:../../xmls/targets.xml">
]>
<!-- ===================================================================
<description>
Filename: build.xml
Date: January 24th, 2004
</description>
==================================================================== -->
<project default="run">
<property name="axis.home" location="../.." />
<property name="build.dir" location="../../build" />
<property name="SimpleAxisPort" value="888" />
<property name="ServicePort" value="888" />
&properties;
&paths;
&taskdefs;
&taskdefs_post_compile;
&targets;
<target name="start-test-http-server">
<echo message="Starting test http server."/>
<java classname="org.apache.axis.transport.http.SimpleAxisServer" fork="yes" dir="" failonerror="true" >
<jvmarg value="-Daxis.wsdlgen.intfnamespace=http://localhost:${ServicePort}"/>
<jvmarg value="-Daxis.wsdlgen.serv.loc.url=http://localhost:${ServicePort}"/>
<arg line="-p ${SimpleAxisPort}" /><!-- arbitrary port -->
<classpath refid="classpath" />
</java>
</target>
<target name="stop-validation-test-http-server">
<echo message="Stopping test http server."/>
<java classname="org.apache.axis.client.AdminClient" fork="yes" failonerror="true" >
<arg line="-p ${SimpleAxisPort}" />
<arg line="quit"/>
<classpath refid="classpath" />
</java>
</target>
<target name="run" >
<antcall target="start-test-http-server" />
<antcall target="stop-test-http-server" />
</target>
</project>
The output is as follows:
-----------------------------------
C:\axis-1_1\test\functional>ant run
Buildfile: build.xml
run:
start-test-http-server:
[echo] Starting test http server.
[java] - SimpleAxisServer starting up on port 888.
Terminate batch job (Y/N)? y
Any help in this matter is appreciated.
thanks,
Anitha Nagendra Prasad
Hewlett-Packard Company
Business Critical Systems
RTR Engineering