1 7 8 package com.capeclear.www.GlobalWeather_wsdl; 9 10 import javax.xml.rpc.ServiceException ; 11 import javax.xml.namespace.QName ; 12 13 import java.net.MalformedURLException ; 14 import java.net.URL ; 15 import java.rmi.Remote ; 16 17 public class GlobalWeather_ServiceLocator extends org.apache.axis.client.Service implements GlobalWeather_Service { 18 19 21 private final String GlobalWeather_address = "http://live.capescience.com:80/ccx/GlobalWeather"; 23 24 public String getGlobalWeatherAddress() { 25 return GlobalWeather_address; 26 } 27 28 private String GlobalWeatherWSDDServiceName = "GlobalWeather"; 30 31 public String getGlobalWeatherWSDDServiceName() { 32 return GlobalWeatherWSDDServiceName; 33 } 34 35 public void setGlobalWeatherWSDDServiceName(String name) { 36 GlobalWeatherWSDDServiceName = name; 37 } 38 39 public GlobalWeather_Port getGlobalWeather() throws ServiceException { 40 URL endpoint; 41 try { 42 endpoint = new java.net.URL (GlobalWeather_address); 43 } 44 catch (MalformedURLException e) { 45 throw new ServiceException (e); 46 } 47 return getGlobalWeather(endpoint); 48 } 49 50 public GlobalWeather_Port getGlobalWeather(URL portAddress) throws ServiceException { 51 try { 52 GlobalWeatherStub _stub = new GlobalWeatherStub(portAddress, this); 53 _stub.setPortName(getGlobalWeatherWSDDServiceName()); 54 return _stub; 55 } 56 catch (org.apache.axis.AxisFault e) { 57 return null; 58 } 59 } 60 61 62 private final String StationInfo_address = "http://live.capescience.com:80/ccx/GlobalWeather"; 64 65 public String getStationInfoAddress() { 66 return StationInfo_address; 67 } 68 69 private String StationInfoWSDDServiceName = "StationInfo"; 71 72 public String getStationInfoWSDDServiceName() { 73 return StationInfoWSDDServiceName; 74 } 75 76 public void setStationInfoWSDDServiceName(String name) { 77 StationInfoWSDDServiceName = name; 78 } 79 80 public StationInfo getStationInfo() throws ServiceException { 81 java.net.URL endpoint; 82 try { 83 endpoint = new URL (StationInfo_address); 84 } 85 catch (MalformedURLException e) { 86 throw new ServiceException (e); 87 } 88 return getStationInfo(endpoint); 89 } 90 91 public StationInfo getStationInfo(URL portAddress) throws ServiceException { 92 try { 93 StationInfoStub _stub = new StationInfoStub(portAddress, this); 94 _stub.setPortName(getStationInfoWSDDServiceName()); 95 return _stub; 96 } 97 catch (org.apache.axis.AxisFault e) { 98 return null; 99 } 100 } 101 102 107 public Remote getPort(Class serviceEndpointInterface) throws ServiceException { 108 try { 109 if (GlobalWeather_Port.class.isAssignableFrom(serviceEndpointInterface)) { 110 GlobalWeatherStub _stub = new GlobalWeatherStub(new URL (GlobalWeather_address), this); 111 _stub.setPortName(getGlobalWeatherWSDDServiceName()); 112 return _stub; 113 } 114 if (StationInfo.class.isAssignableFrom(serviceEndpointInterface)) { 115 StationInfoStub _stub = new StationInfoStub(new URL (StationInfo_address), this); 116 _stub.setPortName(getStationInfoWSDDServiceName()); 117 return _stub; 118 } 119 } 120 catch (java.lang.Throwable t) { 121 throw new ServiceException (t); 122 } 123 throw new ServiceException ("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 124 } 125 126 131 public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException { 132 if (portName == null) { 133 return getPort(serviceEndpointInterface); 134 } 135 String inputPortName = portName.getLocalPart(); 136 if ("GlobalWeather".equals(inputPortName)) { 137 return getGlobalWeather(); 138 } 139 else if ("StationInfo".equals(inputPortName)) { 140 return getStationInfo(); 141 } 142 else { 143 Remote _stub = getPort(serviceEndpointInterface); 144 ((org.apache.axis.client.Stub) _stub).setPortName(portName); 145 return _stub; 146 } 147 } 148 149 public QName getServiceName() { 150 return new QName ("http://www.capeclear.com/GlobalWeather.wsdl", "GlobalWeather"); 151 } 152 153 private java.util.HashSet ports = null; 154 155 public java.util.Iterator getPorts() { 156 if (ports == null) { 157 ports = new java.util.HashSet (); 158 ports.add(new QName ("GlobalWeather")); 159 ports.add(new QName ("StationInfo")); 160 } 161 return ports.iterator(); 162 } 163 164 } 165 | Popular Tags |