1 21 package org.apache.beehive.wsm.axis.ant; 22 23 import java.io.File ; 24 25 26 27 import org.apache.tools.ant.AntClassLoader; 28 import org.apache.tools.ant.BuildException; 29 import org.apache.tools.ant.taskdefs.Java; 30 import org.apache.tools.ant.types.Path; 31 import org.apache.tools.ant.types.Reference; 32 33 34 public class WSDL2AJavaTask extends Java { 35 File mWSDL, mOutDir; 36 37 38 public void setWSDLFile(File wsdl) { 39 mWSDL = wsdl; 40 } 41 42 public void setOutputDir(File outputDir) { 43 mOutDir = outputDir; 44 } 45 46 51 public void setClasspathRef(Reference r) { 52 super.setClasspathRef(r); 53 } 54 55 60 public void setClasspath(Path s) { 61 super.setClasspath(s); 62 } 63 66 public WSDL2AJavaTask() { 67 super(); 68 } 70 71 public void execute() throws BuildException { 72 try { 73 setClassname("org.apache.beehive.wsm.axis.tools.Wsdl2AJava"); 74 setArgs(mWSDL.getCanonicalPath()); 75 setArgs(mOutDir.getCanonicalPath()); 76 super.execute(); 77 78 } 79 catch (Throwable e) { 80 e.printStackTrace(); 81 if (e instanceof BuildException) { 82 throw (BuildException)e; 83 } 84 else { 85 throw new BuildException(e.toString(), e); 86 } 87 } 88 } 89 } 90 | Popular Tags |