Created
July 8, 2012 15:15
-
-
Save minhajkk/3071328 to your computer and use it in GitHub Desktop.
gant script for generating stubs from a whizdul file...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing :)