Generate WSDL document from Java
If the WSDL served by your service at http://your-host/your-service?wsdl is not enough
because you e.g. want to distribute it as a Maven artifact,
then you can use
java2ws to generate the WSDL document at build time.
You do not need to invoke the
java2ws tool provided by CXF directly,
neither you have to use the
java2ws and so you can configure it in
as any other aspect of your application.
Here is an example:
|The sample code snippets used in this section come from the server integration test in the source tree of CXF Extensions for Quarkus
Here we have instructed
java2ws to generate WSDLs for two interfaces,
Note that the Service interfaces must be annotated with
jakarta.xml.ws.WebService to be selected for
The two generated WSDL documents will be stored as
wsdl2java which is executed within Quarkus source generation phase,
java2ws is a part Quarkus augmentation that happens after compilation.
The input of
java2ws are, after all, Java class files.
Hence you do not need to add
quarkus.cxf.java2ws.*configuration properties of