Skip to content

wooshie/gradle-wsimport-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle WSImport Plugin

This is a plugin to run wsimport on WSDL files to generate the Java code required to access a web service (aka the really comprehensibly named "JAX-WS portable artifacts" ;-).

With this plugin, you can create builds that do not require a network connection to download WSDL files during build time. Instead, you can use a separate download task to update the local WSDL files, so everything required to build is availably locally.

Applying the plugin

plugins {
    id "me.seeber.gradle-wsimport-plugin" version "1.0.0-SNAPSHOT"
}

Usage

The plugin will automatically process all WSDL files found in src/main/wsdl. This works for all source sets, so files in src/test/wsdl and any other source set you define will also be processed.

The package name for the generated Java classes will be determined by the subdirectory of the WSDL file, e.g. for src/main/wsdl/com/company/boringenterpriseservice.wsdl the plugin will use the package name com.company.

Currently there are no configuration options.

Downloading the WSDLs

You can use the download plugin to download the WSDLs. Here's an example from the demo projects:

plugins {
    id "de.undercouch.download" version "1.2"
}

import de.undercouch.gradle.tasks.download.Download

task downloadWsdl(type: Download) {
    description "Download WSDL"
    src "http://www-inf.int-evry.fr/cours/WebServices/TP_BPEL/files/PingPong.wsdl"
    dest "src/main/wsdl/me/seeber/gradle/wsimport/demo/hello/client/PingPong.wsdl"
}

Then you can update the local WSDL file with

gradle downloadWsdl

Examples

See the demo project for an example.

License

This plugin is licensed under the BSD 2-Clause license.

About

Generate JAX-RS code from WSDL files with Gradle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 69.9%
  • Java 30.1%