Generate the WebService Stub classes with task in Gradle script


(kondalrao.k) #1

<I’m facing problem to create stub classes from WSDL using ant task in Gradle script. Please can any suggest to create stubs using task in gradle>

task wsimport(dependsOn: processResources) {

doLast{

//classesDir.mkdirs()

ant {

taskdef(name:‘wsimport’,

classname:‘com.sun.tools.ws.ant.WsImport’,

classpath:configurations.jaxws.asPath)

wsimport(keep:true,

destdir: sourceSets.main.output.classesDir,

package:‘ws’,

sourcedestdir:‘src/main/java’,

wsdl:‘http://cvgrhetibd002.nielsen.com:10966/dasReadTree/?wsdl’)

//schema(dir: “src/wsdl/binding”, includes: “*.xsd”))

//binding(dir: “src/wsdl/binding”, includes: “*.xsd”)

}

} }

Getting error ‘Cause: wsimport failed’. Can any suggest how to solve and create the stubs from gradle.


(Luke Daley) #2

You’ll have to provide much more information.