1 7 8 package com.capeclear.www.GlobalWeather_wsdl; 9 10 import java.util.Vector; 11 import java.rmi.RemoteException; 12 13 import javax.xml.namespace.QName; 14 import javax.xml.rpc.Service; 15 16 import com.capeclear.www.GlobalWeather_xsd.*; 17 18 public class GlobalWeatherStub extends org.apache.axis.client.Stub implements GlobalWeather_Port { 19 private Vector cachedSerClasses = new Vector(); 20 private Vector cachedSerQNames = new Vector(); 21 private Vector cachedSerFactories = new Vector(); 22 private Vector cachedDeserFactories = new Vector(); 23 24 static org.apache.axis.description.OperationDesc [] _operations; 25 26 static { 27 _operations = new org.apache.axis.description.OperationDesc[1]; 28 org.apache.axis.description.OperationDesc oper; 29 oper = new org.apache.axis.description.OperationDesc(); 30 oper.setName("getWeatherReport"); 31 oper.addParameter(new QName("", "code"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, org.apache.axis.description.ParameterDesc.IN, false, false); 32 oper.setReturnType(new QName("http://www.capeclear.com/GlobalWeather.xsd", "WeatherReport")); 33 oper.setReturnClass(WeatherReport.class); 34 oper.setReturnQName(new QName("", "return")); 35 oper.setStyle(org.apache.axis.enum.Style.RPC); 36 oper.setUse(org.apache.axis.enum.Use.ENCODED); 37 _operations[0] = oper; 38 39 } 40 41 public GlobalWeatherStub() throws org.apache.axis.AxisFault { 42 this(null); 43 } 44 45 public GlobalWeatherStub(java.net.URL endpointURL, Service service) throws org.apache.axis.AxisFault { 46 this(service); 47 super.cachedEndpoint = endpointURL; 48 } 49 50 public GlobalWeatherStub(Service service) throws org.apache.axis.AxisFault { 51 if (service == null) { 52 super.service = new org.apache.axis.client.Service(); 53 } else { 54 super.service = service; 55 } 56 java.lang.Class cls; 57 QName qName; 58 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; 59 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; 60 java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; 61 java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; 62 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; 63 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; 64 java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; 65 java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; 66 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Precipitation"); 67 cachedSerQNames.add(qName); 68 cls = Precipitation.class; 69 cachedSerClasses.add(cls); 70 cachedSerFactories.add(beansf); 71 cachedDeserFactories.add(beandf); 72 73 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "WeatherReport"); 74 cachedSerQNames.add(qName); 75 cls = WeatherReport.class; 76 cachedSerClasses.add(cls); 77 cachedSerFactories.add(beansf); 78 cachedDeserFactories.add(beandf); 79 80 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "PhenomenonType"); 81 cachedSerQNames.add(qName); 82 cls = PhenomenonType.class; 83 cachedSerClasses.add(cls); 84 cachedSerFactories.add(enumsf); 85 cachedDeserFactories.add(enumdf); 86 87 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Pressure"); 88 cachedSerQNames.add(qName); 89 cls = Pressure.class; 90 cachedSerClasses.add(cls); 91 cachedSerFactories.add(beansf); 92 cachedDeserFactories.add(beandf); 93 94 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Phenomenon"); 95 cachedSerQNames.add(qName); 96 cls = Phenomenon.class; 97 cachedSerClasses.add(cls); 98 cachedSerFactories.add(beansf); 99 cachedDeserFactories.add(beandf); 100 101 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Direction"); 102 cachedSerQNames.add(qName); 103 cls = Direction.class; 104 cachedSerClasses.add(cls); 105 cachedSerFactories.add(beansf); 106 cachedDeserFactories.add(beandf); 107 108 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Station"); 109 cachedSerQNames.add(qName); 110 cls = Station.class; 111 cachedSerClasses.add(cls); 112 cachedSerFactories.add(beansf); 113 cachedDeserFactories.add(beandf); 114 115 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Visibility"); 116 cachedSerQNames.add(qName); 117 cls = Visibility.class; 118 cachedSerClasses.add(cls); 119 cachedSerFactories.add(beansf); 120 cachedDeserFactories.add(beandf); 121 122 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfPhenomenon"); 123 cachedSerQNames.add(qName); 124 cls = Phenomenon[].class; 125 cachedSerClasses.add(cls); 126 cachedSerFactories.add(arraysf); 127 cachedDeserFactories.add(arraydf); 128 129 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ExtremeType"); 130 cachedSerQNames.add(qName); 131 cls = ExtremeType.class; 132 cachedSerClasses.add(cls); 133 cachedSerFactories.add(enumsf); 134 cachedDeserFactories.add(enumdf); 135 136 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfLayer"); 137 cachedSerQNames.add(qName); 138 cls = Layer[].class; 139 cachedSerClasses.add(cls); 140 cachedSerFactories.add(arraysf); 141 cachedDeserFactories.add(arraydf); 142 143 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfPrecipitation"); 144 cachedSerQNames.add(qName); 145 cls = Precipitation[].class; 146 cachedSerClasses.add(cls); 147 cachedSerFactories.add(arraysf); 148 cachedDeserFactories.add(arraydf); 149 150 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "ArrayOfExtreme"); 151 cachedSerQNames.add(qName); 152 cls = Extreme[].class; 153 cachedSerClasses.add(cls); 154 cachedSerFactories.add(arraysf); 155 cachedDeserFactories.add(arraydf); 156 157 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "VisibilityQualifier"); 158 cachedSerQNames.add(qName); 159 cls = VisibilityQualifier.class; 160 cachedSerClasses.add(cls); 161 cachedSerFactories.add(enumsf); 162 cachedDeserFactories.add(enumdf); 163 164 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Sky"); 165 cachedSerQNames.add(qName); 166 cls = Sky.class; 167 cachedSerClasses.add(cls); 168 cachedSerFactories.add(beansf); 169 cachedDeserFactories.add(beandf); 170 171 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Temperature"); 172 cachedSerQNames.add(qName); 173 cls = Temperature.class; 174 cachedSerClasses.add(cls); 175 cachedSerFactories.add(beansf); 176 cachedDeserFactories.add(beandf); 177 178 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "PhenomenonIntensity"); 179 cachedSerQNames.add(qName); 180 cls = PhenomenonIntensity.class; 181 cachedSerClasses.add(cls); 182 cachedSerFactories.add(enumsf); 183 cachedDeserFactories.add(enumdf); 184 185 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Extreme"); 186 cachedSerQNames.add(qName); 187 cls = Extreme.class; 188 cachedSerClasses.add(cls); 189 cachedSerFactories.add(beansf); 190 cachedDeserFactories.add(beandf); 191 192 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Layer"); 193 cachedSerQNames.add(qName); 194 cls = Layer.class; 195 cachedSerClasses.add(cls); 196 cachedSerFactories.add(beansf); 197 cachedDeserFactories.add(beandf); 198 199 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "DirectionCompass"); 200 cachedSerQNames.add(qName); 201 cls = DirectionCompass.class; 202 cachedSerClasses.add(cls); 203 cachedSerFactories.add(enumsf); 204 cachedDeserFactories.add(enumdf); 205 206 qName = new QName("http://www.capeclear.com/GlobalWeather.xsd", "Wind"); 207 cachedSerQNames.add(qName); 208 cls = Wind.class; 209 cachedSerClasses.add(cls); 210 cachedSerFactories.add(beansf); 211 cachedDeserFactories.add(beandf); 212 213 } 214 215 private org.apache.axis.client.Call createCall() throws RemoteException { 216 try { 217 org.apache.axis.client.Call _call = 218 (org.apache.axis.client.Call) super.service.createCall(); 219 if (super.maintainSessionSet) { 220 _call.setMaintainSession(super.maintainSession); 221 } 222 if (super.cachedUsername != null) { 223 _call.setUsername(super.cachedUsername); 224 } 225 if (super.cachedPassword != null) { 226 _call.setPassword(super.cachedPassword); 227 } 228 if (super.cachedEndpoint != null) { 229 _call.setTargetEndpointAddress(super.cachedEndpoint); 230 } 231 if (super.cachedTimeout != null) { 232 _call.setTimeout(super.cachedTimeout); 233 } 234 if (super.cachedPortName != null) { 235 _call.setPortName(super.cachedPortName); 236 } 237 java.util.Enumeration keys = super.cachedProperties.keys(); 238 while (keys.hasMoreElements()) { 239 String key = (String) keys.nextElement(); 240 _call.setProperty(key, super.cachedProperties.get(key)); 241 } 242 synchronized (this) { 248 if (firstCall()) { 249 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 251 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC); 252 for (int i = 0; i < cachedSerFactories.size(); ++i) { 253 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); 254 QName qName = (QName) cachedSerQNames.get(i); 255 Class sf = (java.lang.Class) cachedSerFactories.get(i); 256 Class df = (java.lang.Class) cachedDeserFactories.get(i); 257 _call.registerTypeMapping(cls, qName, sf, df, false); 258 } 259 } 260 } 261 return _call; 262 } 263 catch (Throwable t) { 264 throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); 265 } 266 } 267 268 public WeatherReport getWeatherReport(String code) throws RemoteException { 269 if (super.cachedEndpoint == null) { 270 throw new org.apache.axis.NoEndPointException(); 271 } 272 org.apache.axis.client.Call _call = createCall(); 273 _call.setOperation(_operations[0]); 274 _call.setUseSOAPAction(true); 275 _call.setSOAPActionURI("capeconnect:GlobalWeather:GlobalWeather#getWeatherReport"); 276 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 277 _call.setOperationName(new QName("capeconnect:GlobalWeather:GlobalWeather", "getWeatherReport")); 278 279 setRequestHeaders(_call); 280 setAttachments(_call); 281 java.lang.Object _resp = _call.invoke(new Object[] {code}); 282 283 if (_resp instanceof RemoteException) { 284 throw (RemoteException)_resp; 285 } 286 else { 287 extractAttachments(_call); 288 try { 289 return (WeatherReport) _resp; 290 } catch (Exception _exception) { 291 return (WeatherReport) org.apache.axis.utils.JavaUtils.convert(_resp, WeatherReport.class); 292 } 293 } 294 } 295 296 } 297 | Popular Tags |