Given a WSDL file, create a simple Java client
The main options are to use:
- JAX-WS, using the
wsimport
tool. - Apache AXIS2, using
wsdl2java
.
Both links provide code examples. Some searching on the web will get you even farther. There are also options for creating dynamic SOAP clients but the generated ones are easiest.
One of the many possible tools is WSDL2Java
. In a shell:
$ java org.apache.axis.wsdl.WSDL2Java foo.wsdl
You can do it from command line using wsimport provided by JAX-WS
wsimport -keep -s (output folder) urlToWsdl
> ex : wsimport -keep -s {homeDirectory}/OutputFolder https://www.example.com
PS: while using non-standard SOAP 1.2 binding. You must specify the "-extension" option to use this binding.
for further reading visit this