0% found this document useful (0 votes)
107 views

Ant Task Wsdl2java

- 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)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Ant Task Wsdl2java

- 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)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Ant task wsdl2java

<java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">


<classpath refid="axis.classpath" />
<!-- 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.0.wsdl
" />
</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
"http://x.y.com" or "urn:x.y.com" 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 samples.addr, you would provide the following
option to WSDL2Java:
--NStoPkg urn:AddressFetcher2=samples.addr

By default, the namespace


xmlns:tns=http://vodafone.com.au/app/ols/svc/OnlineSalesOrderCVS will be
mapped to the package au.com.vodafone.app.ols.svc.OnlineSalesOrderCVS

You might also like