1
2
3
4
5
6
7 package org.mule.cxf.weatherservice.myweather;
8
9 import java.io.File;
10 import java.net.MalformedURLException;
11 import java.net.URL;
12
13 import javax.xml.namespace.QName;
14
15 public final class WeatherSoap_WeatherSoap_Client {
16
17 private static final QName SERVICE_NAME = new QName("http://ws.cdyne.com/WeatherWS/", "Weather");
18
19 public static void main(String args[]) throws Exception {
20 URL wsdlURL = Weather.WSDL_LOCATION;
21 if (args.length > 0) {
22 File wsdlFile = new File(args[0]);
23 try {
24 if (wsdlFile.exists()) {
25 wsdlURL = wsdlFile.toURI().toURL();
26 } else {
27 wsdlURL = new URL(args[0]);
28 }
29 } catch (MalformedURLException e) {
30 e.printStackTrace();
31 }
32 }
33
34 Weather ss = new Weather(wsdlURL, SERVICE_NAME);
35 WeatherSoap port = ss.getWeatherSoap();
36
37 {
38 System.out.println("Invoking getCityWeatherByZIP...");
39 GetCityWeatherByZIP _getCityWeatherByZIP_parameters = null;
40 GetCityWeatherByZIPResponse _getCityWeatherByZIP__return = port.getCityWeatherByZIP(_getCityWeatherByZIP_parameters);
41 System.out.println("getCityWeatherByZIP.result=" + _getCityWeatherByZIP__return);
42
43
44 }
45 {
46 System.out.println("Invoking getWeatherInformation...");
47 GetWeatherInformation _getWeatherInformation_parameters = null;
48 GetWeatherInformationResponse _getWeatherInformation__return = port.getWeatherInformation(_getWeatherInformation_parameters);
49 System.out.println("getWeatherInformation.result=" + _getWeatherInformation__return);
50
51
52 }
53 {
54 System.out.println("Invoking getCityForecastByZIP...");
55 GetCityForecastByZIP _getCityForecastByZIP_parameters = null;
56 GetCityForecastByZIPResponse _getCityForecastByZIP__return = port.getCityForecastByZIP(_getCityForecastByZIP_parameters);
57 System.out.println("getCityForecastByZIP.result=" + _getCityForecastByZIP__return);
58
59
60 }
61
62 System.exit(0);
63 }
64
65 }