BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home

Gradle Script to Generate Java classes from a wsdl using axis 1.6

daniel —Mon, 07/22/2013 - 1:40pm

  • Groovy
  • Java

Some Resouces:

  • The AntCodegenTask javadoc
  • Codegen Reference Guide

This is an update of the gradle build script from a previous post which uses a newer version of axis and gradle:
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.7
version = '1.0.0'
group = 'com.bowerstudios'
jar {
manifest {
attributes 'Implementation-Title': 'MyApp', 'Implementation-Version': version
}
}
repositories {
mavenCentral()
}
configurations {
compile
runtime
axisGenAntTask
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '2.0.5'
compile 'log4j:log4j:1.2.16',
'commons-collections:commons-collections:3.2.1',
'commons-codec:commons-codec:1.5'
compile('org.apache.axis2:axis2-adb:1.6.2') //may need to exclude woden
compile 'org.apache.axis2:axis2-transport-local:1.6.2',
'org.apache.axis2:axis2-transport-http:1.6.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
axisGenAntTask 'org.apache.axis2:axis2-ant-plugin:1.6.2'
}
task genWsdlClasses() << {
ant.echo(message:'Generating Classes for use with WSDL')
ant.taskdef(
name: 'genClassesFromWSDL',
classname: 'org.apache.axis2.tool.ant.AntCodegenTask',
classpath: configurations.axisGenAntTask.asPath
)
ant.genClassesFromWSDL(
wsdlfilename: 'https://mywebservice.com/xml/wsdls/OrgInfo.wsdl',
databindingName: 'adb',
allPorts: true,
overWrite: true,
// skipBuildXML: true, // optional
// syncOnly: true, //optional
targetSourceFolderLocation: 'src/main/java',
unpackClasses: true
)
}

  • Log in to post comments

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Mon, 02/26/2007 - 12:19pm

Do not anticipate trouble, or worry about what may never happen. Keep in the sunlight.

—

Benjamin Franklin

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • Tomcat configuration with BoneCP
  • Tips for Presenting
  • The Savvy Gamer - October 17, 2004
  • Tracing Requests from nginx through a java application
  • Do you know who I am?

Copyright 2021 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About