1 55 package org.jboss.axis.wsdl.toJava; 56 57 import org.jboss.axis.wsdl.gen.Generator; 58 import org.jboss.axis.wsdl.symbolTable.ServiceEntry; 59 import org.jboss.axis.wsdl.symbolTable.SymbolTable; 60 61 import javax.wsdl.Service; 62 import java.io.IOException ; 63 64 68 public class JavaServiceWriter implements Generator 69 { 70 protected Generator serviceIfaceWriter = null; 71 protected Generator serviceImplWriter = null; 72 protected Generator testCaseWriter = null; 73 74 77 public JavaServiceWriter(Emitter emitter, 78 Service service, 79 SymbolTable symbolTable) 80 { 81 ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); 82 if (sEntry.isReferenced()) 83 { 84 serviceIfaceWriter = 85 new JavaServiceIfaceWriter(emitter, sEntry, symbolTable); 86 serviceImplWriter = 87 new JavaServiceImplWriter(emitter, sEntry, symbolTable); 88 if (emitter.isTestCaseWanted()) 89 { 90 testCaseWriter = 91 new JavaTestCaseWriter(emitter, sEntry, symbolTable); 92 } 93 } 94 } 96 99 public void generate() throws IOException 100 { 101 if (serviceIfaceWriter != null) 102 { 103 serviceIfaceWriter.generate(); 104 } 105 if (serviceImplWriter != null) 106 { 107 serviceImplWriter.generate(); 108 } 109 if (testCaseWriter != null) 110 { 111 testCaseWriter.generate(); 112 } 113 } 115 } | Popular Tags |