1 16 package org.apache.axis.tool.codegen; 17 18 19 import java.util.Vector ; 20 21 import org.apache.axis.utils.ClassUtils; 22 import org.apache.axis.wsdl.fromJava.Emitter; 23 24 30 public class Java2WSDLGenerator { 31 32 public void emit(String classPath, 33 String implementationClassName, 34 String serviceLocationUrl, 35 String inputWsdlName, 36 String bindingName, 37 String portypeName, 38 String style, 39 String outputFileName, 40 int mode, 41 Vector listOfIncludedMethods) throws Throwable { 42 try { 43 44 ClassUtils.setDefaultClassLoader(ClassUtils.createClassLoader( 45 classPath, this.getClass().getClassLoader())); 46 47 Emitter emitter = new Emitter(); 49 50 emitter.setCls(implementationClassName); 52 53 if (serviceLocationUrl !=null && !serviceLocationUrl.trim().equals("")) 55 emitter.setLocationUrl(serviceLocationUrl); 56 57 if (inputWsdlName != null && !inputWsdlName.trim().equals("")) 59 emitter.setInputWSDL(inputWsdlName); 60 61 if (portypeName!=null && !portypeName.trim().equals("")) 63 emitter.setPortTypeName(portypeName); 64 65 if (style!=null && !style.trim().equals("")) 67 emitter.setStyle(style); 68 if (listOfIncludedMethods!=null) 69 emitter.setAllowedMethods(listOfIncludedMethods); 70 71 if (mode!= Emitter.MODE_ALL && 72 mode!= Emitter.MODE_IMPLEMENTATION && 73 mode!= Emitter.MODE_INTERFACE) 74 mode = Emitter.MODE_ALL; 76 emitter.emit(outputFileName,mode); 77 78 } catch (Throwable t) { 79 throw t; 80 81 } 82 } 83 } 84 | Popular Tags |