Search

E.3. java2ws

download PDF

Abstract

generates a WSDL document from Java code

Synopsis

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-java2ws-plugin</artifactId>
  <version>version</version>
  <executions>
    <execution>
      <id>process-classes</id>
      <phase>process-classes</phase>
      <configuration>
        <className>className</className>
        <option>...</option>
         ...
      </configuration>
      <goals>
        <goal>java2ws</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Description

The java2ws task takes a service endpoint implementation (SEI) and generates the support files used to implement a Web service. It can generate the following:
  • a WSDL document
  • the server code needed to deploy the service as a POJO
  • client code for accessing the service
  • wrapper and fault beans

Required configuration

The plug-in requires that the className configuration element is present. The element's value is the fully qualified name of the SEI to be processed.

Optional configuration

The configuration element's listed in the following table can be used to fine tune the WSDL generation.
ElementDescription
frontendSpecifies front end to use for processing the SEI and generating the support classes. jaxws is the default. simple is also supported.
databindingSpecifies the data binding used for processing the SEI and generating the support classes. The default when using the JAX-WS front end is jaxb. The default when using the simple frontend is aegis.
genWsdlInstructs the tool to generate a WSDL document when set to true.
genWrapperbeanInstructs the tool to generate the wrapper bean and the fault beans when set to true.
genClientInstructs the tool to generate client code when set to true.
genServerInstructs the tool to generate server code when set to true.
outputFileSpecifies the name of the generated WSDL file.
classpathSpecifies the classpath searched when processing the SEI.
soap12Specifies that the generated WSDL document is to include a SOAP 1.2 binding when set to true.
targetNamespaceSpecifies the target namespace to use in the generated WSDL file.
serviceNameSpecifies the value of the generated service element's name attribute.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.