Someone I know didn't RTFM. :)

  The wsdl2java task documentation says:
  ---
  Create Java classes from local or remote WSDL. Mappings from namespaces to
packages can be provided as nested <mapping> elements.
  Proxy settings are taken from the java runtime settings of http.ProxyHost,
http.ProxyPort, etc. The Ant task <setProxy> can set these. As well as the
nested mapping elements, this task uses the file NStoPkg.properties in the
project base directory for namespace mapping

  This task does no dependency checking; files are generated whether they
need to be or not. The exception to this is the Impl class, which is not
overwritten if it exists. This is a safety measure. However, all other
classes are generated overwriting anything that exists.

  The safe way to use this task is to have it generate the java source in a
build directory, then have a <copy> task selectively copy the files you need
into a safe location. Again, copying into the source tree is dangerous, but
a separate build/src tree is safe. Then include this separate tree in the
<javac> task's src attribute to include it in the build. Implement your own
implementation classes of the server stub and the test cases using the
generated templates. If you want to add methods to autogenerated data types,
consider subclassing them, or write helper classes.

  Tip: if you <get> the wsdl, and use the <filesmatch> condition to compare
the fetched wsdl with a catched copy, you can make the target that calls the
axis-wsd2ljava task conditional on the WSDL having changed. This stops
spurious code regeneration and follow-on rebuilds across the java source
tree.

----- Original Message ----- 
From: "gawkboyrules" <[EMAIL PROTECTED]>
To: "axis-user (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 6:03 PM
Subject: Does WSDL2Java (or associated ant task) have dependency checking?


> Does WSDL2Java or at least the associated ant task have dependency
checking?
>
> This question resulted from reading Chapter 15 page 362 of Java
Development
> with Ant http://www.manning.com/hatcher/chap15.pdf
> I have copied the relevant paragraph below:
> "We supply a path to the source directory to include both our source and
the
> generated files. One irritation of the current SOAP import process is that
> the Java files are always regenerated, which means they always need
> recompilation. This makes the build longer than it need be. Unless
WSDL2Java
> adds dependency checking, you should use something similar to <uptodate>
to
> bypass the import-wsdl target when it is not needed. There is an extra
> complication here; you need to use a <filesmatch> test inside a
<condition>
> to verify that the file you just fetched with <get> hasn't changed. We
omit
> all this because it is so complex."
>
> This book used the Beta2 version of Axis so a lot has probably changed
since
> then.

Reply via email to