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 "Morten S. Mortensen" <mo...@tietoenator.com> on 2004/09/19 13:14:30 UTC

How to auto-deploy 'deploy.wsdd'??

Hi all,

-I have built my own web-services into my own WAR-file. This is real
nice, since I can just deploy it through my favorite servlet-engine.

However, I have to do such things as -

java -cp "%AXISCLASSPATH%" org.apache.axis.client.AdminClient
"-lhttp://.../services/AdminService" ".../deploy.wsdd"

- which is... quite irritating-

How do I automate this task of manual deployment of the
"deploy.wsdd"-files so that I can just say "deploy!" to my WAR-files
without additional hockuspocus? Can I write something in the
"server-config.wsdd" file or something?

Can I find a description of this problem and its solution on the net?

Regards,
Morten Sabroe Mortensen

Re: How to auto-deploy 'deploy.wsdd'??

Posted by Anand Natrajan <an...@cs.virginia.edu>.
Morten,

I assume you're building your WAR file using Ant. If so, then you can use
the same trick I do. As part of my Ant tasks, I "deploy" my web services by
constructing the server-config.wsdd file at compile-time. This approach is
not only automatic, but also doesn't require Axis to be running when I
"deploy". This trick requires some filterchain tasks in Ant, but they are
easy to master.

Below I show you the Ant fragment I use. Essentially, I start with a file
called server-config.wsdd.template. Then, I copy it over to
server-config.wsdd.
	<copy file="${basedir}/${resource.dir}/server-config.wsdd.template"
		tofile="${basedir}/${resource.dir}/server-config.wsdd"/>
Then, for each service I want to deploy, I append to server-config.wsdd.
	<copy file="${wsdl.build.dir}/com/abc/ws/stubs/deploy.wsdd"
		tofile="${wsdl.build.dir}/com/abc/ws/stubs/${wsdlName}.wsdd.part">
		<filterchain>
			<headfilter lines="-1" skip="11"/>
		</filterchain>
	</copy>
	<copy file="${basedir}/${resource.dir}/server-config.wsdd"
		tofile="${basedir}/${wsdl.build.dir}/server-config.wsdd.new">
		<filterchain>
			<tailfilter lines="-1" skip="1"/>
			<concatfilter append="${wsdl.build.dir}/com/abc/ws/stubs/${wsdlName}.wsdd.part"/>
		</filterchain>
	</copy>
	<delete file="${wsdl.build.dir}/com/abc/ws/stubs/${wsdlName}.wsdd.part"/>
	<move file="${basedir}/${wsdl.build.dir}/server-config.wsdd.new"
		tofile="${basedir}/${resource.dir}/server-config.wsdd"/>

That's it - I auto-"deploy" my services. You'll have to play with the
fragment above to get it to work for you, but it's the basic idea.

Good luck!

Anand

On Sun, 19 Sep 2004, Morten S. Mortensen wrote:

:
: Hi all,
:
: -I have built my own web-services into my own WAR-file. This is real
: nice, since I can just deploy it through my favorite servlet-engine.
:
: However, I have to do such things as -
:
: java -cp "%AXISCLASSPATH%" org.apache.axis.client.AdminClient
: "-lhttp://.../services/AdminService" ".../deploy.wsdd"
:
: - which is... quite irritating-
:
: How do I automate this task of manual deployment of the
: "deploy.wsdd"-files so that I can just say "deploy!" to my WAR-files
: without additional hockuspocus? Can I write something in the
: "server-config.wsdd" file or something?
:
: Can I find a description of this problem and its solution on the net?
:
: Regards,
: Morten Sabroe Mortensen
:
: