ant - wsdl2java using Axis 1.4 in Gradle -
i searched plugins , tutorials neither of them worked in given context: i'd generate server-side java classes list of given wsdl files. have generated axis 1.4 , java 1.7.
my half-working code following:
configurations { axisgenanttask } task genwsdlclasses() { dolast { def wsdldir = file(axisinputdir) def wsdlfiles = new filenamebyregexfinder().getfilenames("${wsdldir}", /.*\.wsdl/) wsdlfiles.each { string wsdlfile -> ant.echo(message: "generating classes use wsdl") ant.taskdef( name: "genclassesfromwsdl", classname: "org.apache.axis.tools.ant.wsdl.wsdl2javaanttask", classpath: configurations.axisgenanttask.aspath ) ant.genclassesfromwsdl( url: wsdlfile, output: file(cxfoutputdir) ) } } } tasks.withtype(javacompile) { dependson genwsdlclasses } dependencies { axisgenanttask "org.apache.axis:axis-ant:1.4", "org.apache.axis:axis:1.4", "org.apache.axis:axis-jaxrpc:1.4", "axis:axis-wsdl4j:1.5.1", "commons-codec:commons-codec:1.3", "commons-logging:commons-logging:1.1.1", "commons-discovery:commons-discovery:0.2" } however, generated customexception class doesn't extend exception, not throwable , java code compilation isn't working (see similar question here: exception classes generated using axis2 wsdl2java don't extend exception).
somehow have tell ant.taskdef not "unpack" classes, read in referenced so-question, mentioned arguments axis 2, not needed axis 1.4 though.
Comments
Post a Comment