Skip to content
Ryan Heaton edited this page Sep 17, 2015 · 1 revision

Java Client Module

The Java client module generates the client-side libraries that will access the Web service API. For SOAP endpoints, a client-side service interface will be generated that uses JAX-WS. For REST endpoints, the JAXB data model classes will be generated to access the XML endpoints. If there are any JSON endpoints, a set of data model classes will be generated that can be used in conjunction with the Jackson library to access them.

Configuration

The Java client module is configured by the java-client element under the modules element of the enunciate configuration file. It supports the following attributes:

attribute description
label The "label" attribute is used to determine the name of the client-side artifact files. The default is the Enunciate project label.
jarName The "jarName" attribute specifies the name of the jar file(s) that are to be created. If no jar name is specified, the name will be calculated from the enunciate label, or a default will be supplied.
jsonJarName The "jsonJarName" attribute specifies the name of the jar file(s) that are to be created for the JSON client. If no jar name is specified, the name will be calculated from the enunciate label, or a default will be supplied.
disableCompile The "disableCompile" attribute prevents Enunciate from compiling its generated client source files.
bundleSourcesWithClasses The "bundleSourcesWithClasses" attribute indicates whether the sources and classes should be bundled together in a single jar.

Elements

The docs element supports the following child elements:

package-conversions

The "package-conversions" subelement of the "java-client" element is used to map packages from the original API packages to different package names. This element supports an arbitrary number of "convert" child elements that are used to specify the conversions. These "convert" elements support the following attributes:

  • The "from" attribute specifies the package that is to be converted. This package will match all classes in the package as well as any subpackages of the package. This means that if "org.enunciate" were specified, it would match "org.enunciate", "org.enunciate.api", and "org.enunciate.api.impl".
  • The "to" attribute specifies what the package is to be converted to. Only the part of the package that matches the "from" attribute will be converted.

json-package-conversions

The "json-package-conversions" element has the same purpose and syntax as the "package-conversions" element above, but is instead applied to the JSON java client. By default, ths JSON conversions will be the same as the "package-conversions" with the "json" subpackage appended.

server-side-type

An arbitrary number of "server-side-type" elements are allowed as child elements of the "java-client" element. The "server-side-type" element can be used to specify a server-side type that is to be ported directly over to the client-side library (as opposed to generating the client-side type from the server-side type). This can be useful to provide more useful client-side capabilities, but requires that there be no package conversions for types and web faults.

The "server-side-type" element supports one attribute, "pattern" that defines an ant-style pattern of the type(s) that are to be included (using a '.' for separating the package name).

facets

Facet configuration for the module. See Facets.

Clone this wiki locally