The
WSDL generation can be controlled using the parameters. Two parameters that are
important to us are the following:
-n, --namespace
indicates the name of the target namespace of the WSDL.
-p, --PkgToNS
indicates the mapping of a package to a namespace.
If a package is encountered that does not have a namespace, the Java2WSDL emitter
will generate a suitable namespace name. This option may be specified multiple
times. By default, Java2WSDL will take the package name of the web service
interface class.
Now, we need to version control the web service exposure as well as the whole
web service generation process. Hence, we have arranged our web service artifacts
(source files, and their package names too) in a folder structure which represents the
version. By doing that we don't need to control further the Java2WSDL process using
the above parameters, instead the "versioned" package name of the classes is used to
define the targetNamespace attribute on the WSDL.
We have two versions, namely 20061231 and 20070101, referring to the two
versions of the service, one defined on the 2007 New Year's eve and the other on the
new year itself.
Pages:
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393