Skip to content

Run wsimport on WSDL files to generate Java code required to access web services

License

Notifications You must be signed in to change notification settings

red6/gradle-wsimport-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 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.wsimport" version "1.1.1"
}

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 "3.3.0"
}

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

Run wsimport on WSDL files to generate Java code required to access web services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 85.9%
  • Groovy 14.1%