ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Emberson <>
Subject ant and WSDL
Date Mon, 06 Aug 2001 15:58:59 GMT
This weekend I decided to see what ant could do for me. Yes, I've
got 100Kloc java code, but surely that would not be a test for ant
since java code was its initial design target. I also have
XSLT code that takes a WSDL file (web services description file - xml),
the source file, and produces: I) a DeploymentDescriptor file which
is a apache tomcat xml file for SOAP deployment; II) both the
client proxy and server proxy java class code, and III) it takes all of
the xmlschema definitions and turns them into java class code.

I've got an ant build.xml file written that works, but I had to
hard-code many of the file names and package paths. So here are
my questions:

Question 1:
The build.xml file needs to know where to place the java code, i.e.,
the package path "com/contact/soap/test" while the XSLT code has a
which it the target package name, "". So how do I
ant the package path "com/contact/soap/test" and have ant convert it and
the package name "" to the XSLT processor?
There don't seem to be any buildin string manipulation capabilities.
Is the only (best ant practices) solution to drop into, say, javascript?

Question 2:
Inside the WSDL file are one or more named (SOAP) services.  For each
the XSLT code produces a DeploymentDescriptor file. If the service is
named "ServiceA", then the DeploymentDescriptor file is named
ServiceADeploymentDescriptor.xml, a serice named "ServiceB" yields
a DeploymentDescriptor file is named ServiceBDeploymentDescriptor.xml,
There is NO correlation between the name of the WSDL file and the
DeploymentDescriptor files produced; it is the names of the services
within the (source) WSDL file that determine the (target)
file names. So my question is, how do I represent the dependency between

source and target? My first attempt over the weekend was just to
things (I first wanted to get things working, and then worry about
the correct ant source-target design pattern to use).
The only thing I can think of is to have a subdirectory inwhich
fake targets are created. Call the subdirectory "status". Within
status would be a file whose name is based upon the WSDL file name.
For example, if the WSDL file is called Contact.wsdl, then the
status file relating to the production of the DeploymentDescriptor file
would be called ContactDeploymentDescriptor.status.
If the status file exists and is later than the source WSDL file,
then ant takes no action, otherwise ant produces the
DeploymentDescriptor file
and, if successful, creates the status file.
Is there an ant source-target design pattern that applies to this
situtation or is the creation of a status file the best approach?

Question 3:
Similar to Question 2, the XSLT takes all of the xmlschema definitions
in the WSDL file and creates java class code in the given package
directory. There is NO correlation between the name of the WSDL file
and the names of the java files. So how do I represent this


Richard Emberson

View raw message