1 7 8 package com.capeclear.www.GlobalWeather_wsdl; 9 10 import java.util.Enumeration; 11 import java.util.Vector; 12 import java.net.URL; 13 import java.rmi.RemoteException; 14 import javax.xml.namespace.QName; 15 import javax.xml.rpc.Service; 16 17 import com.capeclear.www.GlobalWeather_xsd.Station; 18 19 public class StationInfoStub extends org.apache.axis.client.Stub implements com.capeclear.www.GlobalWeather_wsdl.StationInfo { 20 private Vector cachedSerClasses = new Vector(); 21 private Vector cachedSerQNames = new Vector(); 22 private Vector cachedSerFactories = new Vector(); 23 private Vector cachedDeserFactories = new Vector(); 24 25 static org.apache.axis.description.OperationDesc [] _operations; 26 27 static { 28 _operations = new org.apache.axis.description.OperationDesc[7]; 29 org.apache.axis.description.OperationDesc oper; 30 oper = new org.apache.axis.description.OperationDesc(); 31 oper.setName("getStation"); 32 oper.addParameter(new QName("", "code"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 33 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "Station")); 34 oper.setReturnClass(Station.class); 35 oper.setReturnQName(new QName("", "return")); 36 oper.setStyle(org.apache.axis.enum.Style.RPC); 37 oper.setUse(org.apache.axis.enum.Use.ENCODED); 38 _operations[0] = oper; 39 40 oper = new org.apache.axis.description.OperationDesc(); 41 oper.setName("isValidCode"); 42 oper.addParameter(new QName("", "code"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 43 oper.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "boolean")); 44 oper.setReturnClass(boolean.class); 45 oper.setReturnQName(new QName("", "return")); 46 oper.setStyle(org.apache.axis.enum.Style.RPC); 47 oper.setUse(org.apache.axis.enum.Use.ENCODED); 48 _operations[1] = oper; 49 50 oper = new org.apache.axis.description.OperationDesc(); 51 oper.setName("listCountries"); 52 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfstring")); 53 oper.setReturnClass(String[].class); 54 oper.setReturnQName(new QName("", "return")); 55 oper.setStyle(org.apache.axis.enum.Style.RPC); 56 oper.setUse(org.apache.axis.enum.Use.ENCODED); 57 _operations[2] = oper; 58 59 oper = new org.apache.axis.description.OperationDesc(); 60 oper.setName("searchByCode"); 61 oper.addParameter(new QName("", "code"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 62 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfStation")); 63 oper.setReturnClass(Station[].class); 64 oper.setReturnQName(new QName("", "return")); 65 oper.setStyle(org.apache.axis.enum.Style.RPC); 66 oper.setUse(org.apache.axis.enum.Use.ENCODED); 67 _operations[3] = oper; 68 69 oper = new org.apache.axis.description.OperationDesc(); 70 oper.setName("searchByCountry"); 71 oper.addParameter(new QName("", "country"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 72 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfStation")); 73 oper.setReturnClass(Station[].class); 74 oper.setReturnQName(new QName("", "return")); 75 oper.setStyle(org.apache.axis.enum.Style.RPC); 76 oper.setUse(org.apache.axis.enum.Use.ENCODED); 77 _operations[4] = oper; 78 79 oper = new org.apache.axis.description.OperationDesc(); 80 oper.setName("searchByName"); 81 oper.addParameter(new QName("", "name"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 82 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfStation")); 83 oper.setReturnClass(Station[].class); 84 oper.setReturnQName(new QName("", "return")); 85 oper.setStyle(org.apache.axis.enum.Style.RPC); 86 oper.setUse(org.apache.axis.enum.Use.ENCODED); 87 _operations[5] = oper; 88 89 oper = new org.apache.axis.description.OperationDesc(); 90 oper.setName("searchByRegion"); 91 oper.addParameter(new QName("", "region"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 92 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfStation")); 93 oper.setReturnClass(Station[].class); 94 oper.setReturnQName(new QName("", "return")); 95 oper.setStyle(org.apache.axis.enum.Style.RPC); 96 oper.setUse(org.apache.axis.enum.Use.ENCODED); 97 _operations[6] = oper; 98 99 } 100 101 public StationInfoStub() throws org.apache.axis.AxisFault { 102 this(null); 103 } 104 105 public StationInfoStub(URL endpointURL, Service service) throws org.apache.axis.AxisFault { 106 this(service); 107 super.cachedEndpoint = endpointURL; 108 } 109 110 public StationInfoStub(Service service) throws org.apache.axis.AxisFault { 111 if (service == null) { 112 super.service = new org.apache.axis.client.Service(); 113 } else { 114 super.service = service; 115 } 116 Class cls; 117 QName qName; 118 Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; 119 Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; 120 Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; 121 Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; 122 Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; 123 Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; 124 Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; 125 Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; 126 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfstring"); 127 cachedSerQNames.add(qName); 128 cls = String[].class; 129 cachedSerClasses.add(cls); 130 cachedSerFactories.add(arraysf); 131 cachedDeserFactories.add(arraydf); 132 133 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Station"); 134 cachedSerQNames.add(qName); 135 cls = Station.class; 136 cachedSerClasses.add(cls); 137 cachedSerFactories.add(beansf); 138 cachedDeserFactories.add(beandf); 139 140 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfStation"); 141 cachedSerQNames.add(qName); 142 cls = Station[].class; 143 cachedSerClasses.add(cls); 144 cachedSerFactories.add(arraysf); 145 cachedDeserFactories.add(arraydf); 146 147 } 148 149 private org.apache.axis.client.Call createCall() throws RemoteException { 150 try { 151 org.apache.axis.client.Call _call = 152 (org.apache.axis.client.Call) super.service.createCall(); 153 if (super.maintainSessionSet) { 154 _call.setMaintainSession(super.maintainSession); 155 } 156 if (super.cachedUsername != null) { 157 _call.setUsername(super.cachedUsername); 158 } 159 if (super.cachedPassword != null) { 160 _call.setPassword(super.cachedPassword); 161 } 162 if (super.cachedEndpoint != null) { 163 _call.setTargetEndpointAddress(super.cachedEndpoint); 164 } 165 if (super.cachedTimeout != null) { 166 _call.setTimeout(super.cachedTimeout); 167 } 168 if (super.cachedPortName != null) { 169 _call.setPortName(super.cachedPortName); 170 } 171 Enumeration keys = super.cachedProperties.keys(); 172 while (keys.hasMoreElements()) { 173 String key = (String) keys.nextElement(); 174 _call.setProperty(key, super.cachedProperties.get(key)); 175 } 176 synchronized (this) { 182 if (firstCall()) { 183 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 185 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); 186 for (int i = 0; i < cachedSerFactories.size(); ++i) { 187 Class cls = (Class) cachedSerClasses.get(i); 188 QName qName = (QName) cachedSerQNames.get(i); 189 Class sf = (Class) cachedSerFactories.get(i); 190 Class df = (Class) cachedDeserFactories.get(i); 191 _call.registerTypeMapping(cls, qName, sf, df, false); 192 } 193 } 194 } 195 return _call; 196 } 197 catch (java.lang.Throwable t) { 198 throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); 199 } 200 } 201 202 public Station getStation(String code) throws RemoteException { 203 if (super.cachedEndpoint == null) { 204 throw new org.apache.axis.NoEndPointException(); 205 } 206 org.apache.axis.client.Call _call = createCall(); 207 _call.setOperation(_operations[0]); 208 _call.setUseSOAPAction(true); 209 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#getStation"); 210 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 211 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "getStation")); 212 213 setRequestHeaders(_call); 214 setAttachments(_call); 215 Object _resp = _call.invoke(new Object[] {code}); 216 217 if (_resp instanceof RemoteException) { 218 throw (RemoteException)_resp; 219 } 220 else { 221 extractAttachments(_call); 222 try { 223 return (Station) _resp; 224 } catch (java.lang.Exception _exception) { 225 return (Station) org.apache.axis.utils.JavaUtils.convert(_resp, Station.class); 226 } 227 } 228 } 229 230 public boolean isValidCode(String code) throws RemoteException { 231 if (super.cachedEndpoint == null) { 232 throw new org.apache.axis.NoEndPointException(); 233 } 234 org.apache.axis.client.Call _call = createCall(); 235 _call.setOperation(_operations[1]); 236 _call.setUseSOAPAction(true); 237 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#isValidCode"); 238 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 239 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "isValidCode")); 240 241 setRequestHeaders(_call); 242 setAttachments(_call); 243 java.lang.Object _resp = _call.invoke(new Object[] {code}); 244 245 if (_resp instanceof RemoteException) { 246 throw (RemoteException)_resp; 247 } 248 else { 249 extractAttachments(_call); 250 try { 251 return ((java.lang.Boolean) _resp).booleanValue(); 252 } catch (Exception _exception) { 253 return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 254 } 255 } 256 } 257 258 public String[] listCountries() throws RemoteException { 259 if (super.cachedEndpoint == null) { 260 throw new org.apache.axis.NoEndPointException(); 261 } 262 org.apache.axis.client.Call _call = createCall(); 263 _call.setOperation(_operations[2]); 264 _call.setUseSOAPAction(true); 265 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#listCountries"); 266 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 267 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "listCountries")); 268 269 setRequestHeaders(_call); 270 setAttachments(_call); 271 java.lang.Object _resp = _call.invoke(new Object[] {}); 272 273 if (_resp instanceof RemoteException) { 274 throw (RemoteException)_resp; 275 } 276 else { 277 extractAttachments(_call); 278 try { 279 return (String[]) _resp; 280 } catch (java.lang.Exception _exception) { 281 return (String[]) org.apache.axis.utils.JavaUtils.convert(_resp, String[].class); 282 } 283 } 284 } 285 286 public Station[] searchByCode(String code) throws RemoteException { 287 if (super.cachedEndpoint == null) { 288 throw new org.apache.axis.NoEndPointException(); 289 } 290 org.apache.axis.client.Call _call = createCall(); 291 _call.setOperation(_operations[3]); 292 _call.setUseSOAPAction(true); 293 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#searchByCode"); 294 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 295 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "searchByCode")); 296 297 setRequestHeaders(_call); 298 setAttachments(_call); 299 java.lang.Object _resp = _call.invoke(new java.lang.Object[] {code}); 300 301 if (_resp instanceof RemoteException) { 302 throw (RemoteException)_resp; 303 } 304 else { 305 extractAttachments(_call); 306 try { 307 return (Station[]) _resp; 308 } catch (Exception _exception) { 309 return (Station[]) org.apache.axis.utils.JavaUtils.convert(_resp, Station[].class); 310 } 311 } 312 } 313 314 public Station[] searchByCountry(String country) throws RemoteException { 315 if (super.cachedEndpoint == null) { 316 throw new org.apache.axis.NoEndPointException(); 317 } 318 org.apache.axis.client.Call _call = createCall(); 319 _call.setOperation(_operations[4]); 320 _call.setUseSOAPAction(true); 321 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#searchByCountry"); 322 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 323 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "searchByCountry")); 324 325 setRequestHeaders(_call); 326 setAttachments(_call); 327 java.lang.Object _resp = _call.invoke(new java.lang.Object[] {country}); 328 329 if (_resp instanceof RemoteException) { 330 throw (RemoteException)_resp; 331 } 332 else { 333 extractAttachments(_call); 334 try { 335 return (Station[]) _resp; 336 } catch (Exception _exception) { 337 return (Station[]) org.apache.axis.utils.JavaUtils.convert(_resp, Station[].class); 338 } 339 } 340 } 341 342 public Station[] searchByName(String name) throws RemoteException { 343 if (super.cachedEndpoint == null) { 344 throw new org.apache.axis.NoEndPointException(); 345 } 346 org.apache.axis.client.Call _call = createCall(); 347 _call.setOperation(_operations[5]); 348 _call.setUseSOAPAction(true); 349 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#searchByName"); 350 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 351 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "searchByName")); 352 353 setRequestHeaders(_call); 354 setAttachments(_call); 355 Object _resp = _call.invoke(new Object[] {name}); 356 357 if (_resp instanceof RemoteException) { 358 throw (RemoteException)_resp; 359 } 360 else { 361 extractAttachments(_call); 362 try { 363 return (Station[]) _resp; 364 } catch (Exception _exception) { 365 return (Station[]) org.apache.axis.utils.JavaUtils.convert(_resp, Station[].class); 366 } 367 } 368 } 369 370 public Station[] searchByRegion(String region) throws RemoteException { 371 if (super.cachedEndpoint == null) { 372 throw new org.apache.axis.NoEndPointException(); 373 } 374 org.apache.axis.client.Call _call = createCall(); 375 _call.setOperation(_operations[6]); 376 _call.setUseSOAPAction(true); 377 _call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#searchByRegion"); 378 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 379 _call.setOperationName(new QName("capeconnect:GlobalWeather:StationInfo", "searchByRegion")); 380 381 setRequestHeaders(_call); 382 setAttachments(_call); 383 java.lang.Object _resp = _call.invoke(new Object[] {region}); 384 385 if (_resp instanceof RemoteException) { 386 throw (RemoteException)_resp; 387 } 388 else { 389 extractAttachments(_call); 390 try { 391 return (Station[]) _resp; 392 } catch (Exception _exception) { 393 return (Station[]) org.apache.axis.utils.JavaUtils.convert(_resp, Station[].class); 394 } 395 } 396 } 397 } 398 | Popular Tags |