This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Maven Java2WSDL plugin (CXF 2.0.x only. Removed in 2.1 and replaced with Java2WS)
Skip to end of metadata
Go to start of metadata

CXF also includes a Maven plugin which can generate WSDL from Java code. Here is a simple example:

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <version>2.0.9</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
      <version>2.0.9</version>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <id>generate-wsdl</id>
      <phase>process-classes</phase>
      <configuration>
        <className>org.example.MyService</className>
      </configuration>
      <goals>
        <goal>java2wsdl</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Here are the options you can use:

<configuration>
   <className>...</className>
   <classpath>...</classpath>
   <outputFile>...</outputFile>
   <serviceName>...</serviceName>
   <soap12>...</soap12>
   <targetNameSpace>...</targetNameSpace>
   <verbose>...</verbose>
   <quiet>...</quiet>
</configuration>
  • No labels