1 package org.apache.beehive.wsm.axis.tools; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 import java.net.MalformedURLException ; 6 7 import org.apache.beehive.wsm.axis.databinding.SystemTypeLookupService; 8 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata; 9 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor; 10 import org.apache.beehive.wsm.wsdl.AbstractWsdl2AJava; 11 import org.apache.xmlbeans.XmlException; 12 13 31 public class Wsdl2AJava extends AbstractWsdl2AJava{ 32 33 34 35 public Wsdl2AJava() throws Exception { 36 super(); 37 } 39 40 41 protected BeehiveWsTypeMetadata getWSObjectModel(InputStream wsdl) throws Exception { 42 XmlBeanWSDLProcessor processor = new XmlBeanWSDLProcessor(wsdl); 43 SystemTypeLookupService lookupService = new SystemTypeLookupService(); 44 return processor.getObjectModel(lookupService); 45 46 } 47 48 49 public static int main(String args[]) throws Exception { 50 if (args.length < 2) { 51 System.out 52 .println("Usage: Wsdl2AJava <wsdlFileName> <base source dir>"); 53 return (-1); 54 } 55 Wsdl2AJava processor = new Wsdl2AJava(); 56 processor.init(); 57 processor.generateAnnotatedJavaFromWSDL(args[0], args[1]); 58 return 0; 59 60 } 61 } 62 | Popular Tags |