Is there any reason you can't do it all within xslt?
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 06, 2001 8:59 AM
> To: [EMAIL PROTECTED]
> Subject: ant and WSDL
>
>
> 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
> parameter
> which it the target package name, "com.contact.soap.test". So how do I
> give
> ant the package path "com/contact/soap/test" and have ant
> convert it and
> give
> the package name "com.contact.soap.test" 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
> service
> 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,
> etc.
> 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)
> DeploymentDescriptor
> 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
> hardcode
> 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
> dependancy?
>
> Thanks
>
> Richard Emberson
> [EMAIL PROTECTED]
>
>
>