1 17 package org.apache.geronimo.axis.server; 18 19 import java.io.Externalizable ; 20 import java.io.IOException ; 21 import java.io.ObjectInput ; 22 import java.io.ObjectOutput ; 23 import java.util.ArrayList ; 24 import java.util.Iterator ; 25 import java.util.List ; 26 27 import javax.xml.namespace.QName ; 28 29 import org.apache.axis.constants.Style; 30 import org.apache.axis.constants.Use; 31 import org.apache.axis.description.JavaServiceDesc; 32 import org.apache.axis.description.OperationDesc; 33 import org.apache.axis.description.TypeDesc; 34 import org.apache.axis.encoding.TypeMapping; 35 import org.apache.axis.encoding.TypeMappingRegistry; 36 import org.apache.geronimo.axis.client.TypeInfo; 37 38 41 public class ReadOnlyServiceDesc extends JavaServiceDesc implements Externalizable { 42 private JavaServiceDesc serviceDesc; 43 private List typeInfo; 44 45 48 public ReadOnlyServiceDesc() { 49 } 50 51 public ReadOnlyServiceDesc(JavaServiceDesc serviceDesc, List typeInfo) { 52 this.serviceDesc = serviceDesc; 53 this.typeInfo = typeInfo; 54 } 55 56 public Class getImplClass() { 57 return serviceDesc.getImplClass(); 58 } 59 60 public void setImplClass(Class implClass) { 61 serviceDesc.setImplClass(implClass); 62 } 63 64 public ArrayList getStopClasses() { 65 return serviceDesc.getStopClasses(); 66 } 67 68 public void setStopClasses(ArrayList stopClasses) { 69 } 70 71 public void loadServiceDescByIntrospection() { 72 serviceDesc.loadServiceDescByIntrospection(); 73 } 74 75 public void loadServiceDescByIntrospection(Class implClass) { 76 serviceDesc.loadServiceDescByIntrospection(implClass); 77 } 78 79 public void loadServiceDescByIntrospection(Class cls, TypeMapping tm) { 80 serviceDesc.loadServiceDescByIntrospection(cls, tm); 81 } 82 83 public Style getStyle() { 84 return serviceDesc.getStyle(); 85 } 86 87 public void setStyle(Style style) { 88 } 89 90 public Use getUse() { 91 return serviceDesc.getUse(); 92 } 93 94 public void setUse(Use use) { 95 } 96 97 public String getWSDLFile() { 98 return serviceDesc.getWSDLFile(); 99 } 100 101 public void setWSDLFile(String wsdlFileName) { 102 } 103 104 public List getAllowedMethods() { 105 return serviceDesc.getAllowedMethods(); 106 } 107 108 public void setAllowedMethods(List allowedMethods) { 109 } 110 111 public TypeMapping getTypeMapping() { 112 return serviceDesc.getTypeMapping(); 113 } 114 115 public void setTypeMapping(TypeMapping tm) { 116 } 117 118 public String getName() { 119 return serviceDesc.getName(); 120 } 121 122 public void setName(String name) { 123 } 124 125 public String getDocumentation() { 126 return serviceDesc.getDocumentation(); 127 } 128 129 public void setDocumentation(String documentation) { 130 } 131 132 public void removeOperationDesc(OperationDesc operation) { 133 } 134 135 public void addOperationDesc(OperationDesc operation) { 136 } 137 138 public ArrayList getOperations() { 139 return serviceDesc.getOperations(); 140 } 141 142 public OperationDesc[] getOperationsByName(String methodName) { 143 return serviceDesc.getOperationsByName(methodName); 144 } 145 146 public OperationDesc getOperationByName(String methodName) { 147 return serviceDesc.getOperationByName(methodName); 148 } 149 150 public OperationDesc getOperationByElementQName(QName qname) { 151 return serviceDesc.getOperationByElementQName(qname); 152 } 153 154 public OperationDesc[] getOperationsByQName(QName qname) { 155 return serviceDesc.getOperationsByQName(qname); 156 } 157 158 public void setNamespaceMappings(List namespaces) { 159 } 160 161 public String getDefaultNamespace() { 162 return serviceDesc.getDefaultNamespace(); 163 } 164 165 public void setDefaultNamespace(String namespace) { 166 } 167 168 public void setProperty(String name, Object value) { 169 serviceDesc.setProperty(name, value); 170 } 171 172 public Object getProperty(String name) { 173 return serviceDesc.getProperty(name); 174 } 175 176 public String getEndpointURL() { 177 return serviceDesc.getEndpointURL(); 178 } 179 180 public void setEndpointURL(String endpointURL) { 181 } 182 183 public TypeMappingRegistry getTypeMappingRegistry() { 184 return serviceDesc.getTypeMappingRegistry(); 185 } 186 187 public void setTypeMappingRegistry(TypeMappingRegistry tmr) { 188 } 189 190 public boolean isInitialized() { 191 return serviceDesc.isInitialized(); 192 } 193 194 public boolean isWrapped() { 195 return serviceDesc.isWrapped(); 196 } 197 198 public List getDisallowedMethods() { 199 return serviceDesc.getDisallowedMethods(); 200 } 201 202 public void setDisallowedMethods(List disallowedMethods) { 203 } 204 205 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 206 typeInfo = (List ) in.readObject(); 207 208 for (Iterator iter = typeInfo.iterator(); iter.hasNext();) { 212 TypeInfo info = (TypeInfo) iter.next(); 213 TypeDesc.registerTypeDescForClass(info.getClazz(), info.buildTypeDesc()); 214 } 215 216 serviceDesc = (JavaServiceDesc) in.readObject(); 217 } 218 219 public void writeExternal(ObjectOutput out) throws IOException { 220 out.writeObject(typeInfo); 221 out.writeObject(serviceDesc); 222 } 223 } 224 | Popular Tags |