1 16 package org.apache.axis.wsdl.gen; 17 18 import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl; 19 import org.apache.axis.encoding.TypeMapping; 20 import org.apache.axis.utils.JavaUtils; 21 import org.apache.axis.wsdl.symbolTable.BaseTypeMapping; 22 import org.apache.axis.wsdl.symbolTable.SymbolTable; 23 import org.apache.axis.wsdl.symbolTable.TypeEntry; 24 25 import javax.wsdl.Binding; 26 import javax.wsdl.Definition; 27 import javax.wsdl.Message; 28 import javax.wsdl.PortType; 29 import javax.wsdl.Service; 30 import javax.xml.namespace.QName ; 31 32 35 public class NoopFactory implements GeneratorFactory { 36 37 43 public void generatorPass(Definition def, 44 SymbolTable symbolTable) { 45 } 47 54 public Generator getGenerator(Message message, SymbolTable symbolTable) { 55 return new NoopGenerator(); 56 } 58 65 public Generator getGenerator(PortType portType, SymbolTable symbolTable) { 66 return new NoopGenerator(); 67 } 69 76 public Generator getGenerator(Binding binding, SymbolTable symbolTable) { 77 return new NoopGenerator(); 78 } 80 87 public Generator getGenerator(Service service, SymbolTable symbolTable) { 88 return new NoopGenerator(); 89 } 91 98 public Generator getGenerator(TypeEntry type, SymbolTable symbolTable) { 99 return new NoopGenerator(); 100 } 102 109 public Generator getGenerator(Definition definition, 110 SymbolTable symbolTable) { 111 return new NoopGenerator(); 112 } 114 115 private BaseTypeMapping btm = null; 116 117 122 public void setBaseTypeMapping(BaseTypeMapping btm) { 123 this.btm = btm; 124 } 126 131 public BaseTypeMapping getBaseTypeMapping() { 132 133 if (btm == null) { 134 btm = new BaseTypeMapping() { 135 136 TypeMapping defaultTM = 137 DefaultSOAPEncodingTypeMappingImpl.createWithDelegate(); 138 139 public String getBaseName(QName qNameIn) { 140 141 javax.xml.namespace.QName qName = 142 new javax.xml.namespace.QName (qNameIn.getNamespaceURI(), 143 qNameIn.getLocalPart()); 144 Class cls = 145 defaultTM.getClassForQName(qName); 146 147 if (cls == null) { 148 return null; 149 } else { 150 151 return JavaUtils.getTextClassName(cls.getName()); 153 } 154 } 155 }; 156 } 157 158 return btm; 159 } } | Popular Tags |