An opinionated maven project to create static JAX-WS clients from .wsdl
definition files. cxf-codegen-plugin is used for generating client libraries.
- Clone this project.
- Create a new maven module with a similar structure to the
example_globalweather
project. - Copy the
.wsdl
file to the module's directory. - Modify root
pom.xml
and change<groupId>
with the desired package name. - Modify module's
pom.xml
and change parent<groupId>
with the desired package name(must be the same with root<groupId>
) and change child<artifactId>
with module's name. - Add your new module to root
pom.xml
- (Optional) Change Java version or extraarg parameters in the
pom.xml
- Run
mvn package
command to generate web service client jars. - Go to
<module_name>/target
folder to access .jar files.
- value-constructor: https://github.com/javaee/jaxb2-commons/tree/master/value-constructor
- fluent-api: https://github.com/javaee/jaxb2-commons/tree/master/fluent-api
- JAXB2 Setters: https://github.com/highsource/jaxb2-basics/wiki/JAXB2-Setters-Plugin
- JAXB2 SimpleHashCode: https://github.com/highsource/jaxb2-basics/wiki/JAXB2-SimpleHashCode-Plugin
- JAXB2 SimpleEquals: https://github.com/highsource/jaxb2-basics/wiki/JAXB2-SimpleEquals-Plugin
- JAXB2 FixJAXB1058: https://github.com/highsource/jaxb2-basics/wiki/JAXB2-FixJAXB1058-Plugin
Example .wsdl
has taken from Example WSDL file: globalweather.wsdl for solely demonstration purpose.