0% found this document useful (0 votes)
16 views1 page

Ant Task for WSDL2Java Configuration

- The ant task runs the WSDL2Java tool to generate Java code from a WSDL file - It specifies arguments to emit server-side bindings, output the files to a directory, and generate code for all elements - The WSDL2Java tool by default maps namespaces to package names magically, but this can be overridden with the --NStoPkg argument

Uploaded by

I@Sydney
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Ant Task for WSDL2Java Configuration

- The ant task runs the WSDL2Java tool to generate Java code from a WSDL file - It specifies arguments to emit server-side bindings, output the files to a directory, and generate code for all elements - The WSDL2Java tool by default maps namespaces to package names magically, but this can be overridden with the --NStoPkg argument

Uploaded by

I@Sydney
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Ant task wsdl2java

<java classname="[Link].WSDL2Java" fork="true">


<classpath refid="[Link]" />
<!-- Skeleton <arg value="-Strue" /> -->
<arg value="-s" />
<arg value="-o${external.wsa_ws}/OnlieserviceOrderService" />
<arg value="-a" />
<arg value="-B" />
<arg
value="wsdl/P3/app/ols/onlineSalesOrder_1.0/OnlineSalesOrderCVS_1.[Link]
" />
</java>

-s, --server-side
Emit server-side bindings for web service
-o, --output <argument>
Output directory for emitted files
-a, --all
Generate code for all elements, even unreferenced ones

By default, package names are generated from the namespace strings in the WSDL
document in a magical manner (typically, if the namespace is of the form
"[Link] or "urn:[Link]" the corresponding package will be "com.y.x"). If
this magic is not what you want, you can provide your own mapping using the --NStoPkg
argument, which can be repeated as often as necessary, once for each unique namespace
mapping. For example, if there is a namespace in the WSDL document called
"urn:AddressFetcher2", and you want files generated from the objects within this
namespace to reside in the package [Link], you would provide the following
option to WSDL2Java:
--NStoPkg urn:AddressFetcher2=[Link]

By default, the namespace


xmlns:tns=[Link] will be
mapped to the package [Link]

You might also like