1 55 package org.jboss.axis.wsdl.gen; 56 57 import org.jboss.axis.encoding.DefaultSOAPEncodingTypeMappingImpl; 58 import org.jboss.axis.encoding.TypeMapping; 59 import org.jboss.axis.utils.JavaUtils; 60 import org.jboss.axis.wsdl.symbolTable.BaseTypeMapping; 61 import org.jboss.axis.wsdl.symbolTable.SymbolTable; 62 import org.jboss.axis.wsdl.symbolTable.TypeEntry; 63 64 import javax.wsdl.Binding; 65 import javax.wsdl.Definition; 66 import javax.wsdl.Message; 67 import javax.wsdl.PortType; 68 import javax.wsdl.Service; 69 import javax.xml.namespace.QName ; 70 71 74 75 public class NoopFactory implements GeneratorFactory 76 { 77 public void generatorPass(Definition def, SymbolTable symbolTable) 78 { 79 } 81 public Generator getGenerator(Message message, SymbolTable symbolTable) 82 { 83 return new NoopGenerator(); 84 } 86 public Generator getGenerator(PortType portType, SymbolTable symbolTable) 87 { 88 return new NoopGenerator(); 89 } 91 public Generator getGenerator(Binding binding, SymbolTable symbolTable) 92 { 93 return new NoopGenerator(); 94 } 96 public Generator getGenerator(Service service, SymbolTable symbolTable) 97 { 98 return new NoopGenerator(); 99 } 101 public Generator getGenerator(TypeEntry type, SymbolTable symbolTable) 102 { 103 return new NoopGenerator(); 104 } 106 public Generator getGenerator(Definition definition, SymbolTable symbolTable) 107 { 108 return new NoopGenerator(); 109 } 111 private BaseTypeMapping btm = null; 112 113 public void setBaseTypeMapping(BaseTypeMapping btm) 114 { 115 this.btm = btm; 116 } 118 public BaseTypeMapping getBaseTypeMapping() 119 { 120 if (btm == null) 121 { 122 btm = new BaseTypeMapping() 123 { 124 TypeMapping defaultTM = DefaultSOAPEncodingTypeMappingImpl.create(); 125 126 public String getBaseName(QName qNameIn) 127 { 128 javax.xml.namespace.QName qName = 129 new javax.xml.namespace.QName (qNameIn.getNamespaceURI(), 130 qNameIn.getLocalPart()); 131 Class cls = defaultTM.getClassForQName(qName); 132 if (cls == null) 133 { 134 return null; 135 } 136 else 137 { 138 return JavaUtils.getTextClassName(cls.getName()); 140 } 141 } 142 }; 143 } 144 return btm; 145 } } | Popular Tags |