Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
gant script for generating stubs from a whizdul file...
import grails.util.GrailsUtil
includeTargets << grailsScript("Init")
target(main: "The description of the script goes here!") {
File whizdul = new File("${basedir}/grails-app/conf/enterprise.wsdl")
if (whizdul.exists()) {
String[] attrs = [
"${basedir}/grails-app/conf/enterprise.wsdl",
"-d",
"${basedir}/src/java/",
"-B-XautoNameResolution",
"-wsdllocation",
"${basedir}/grails-app/conf/enterprise.wsdl",
"-keep",
"-Xnocompile"
]
//Returns: 0 if the tool runs successfully.
//For more info check: http://www.jarvana.com/jarvana/view/com/sun/xml/ws/jaxws-tools/2.2.6-promoted-b02/jaxws-tools-2.2.6-promoted-b02-javadoc.jar!/com/sun/tools/ws/WsImport.html#doMain(java.lang.String[])
def isStubGenerated = com.sun.tools.ws.WsImport.doMain(attrs)
if(isStubGenerated == 0){
println "Salesforce enterprise.wsdl stubs have been generated successfully."
}
} else {
print "ERROR: "
println "Salesforce enterprise whizdul does not exist."
println "Please goto salesforce.com download enetrprise whizdul and copy it inside /web-app/WEB-INF/wsdl/ of project."
}
}
setDefaultTarget(main)
@hussainanjar

Thanks for sharing :)

@minhajkk
Owner
minhajkk commented Jul 9, 2012

Always a pleasure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment