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 WeatherHttpGet_WeatherHttpGet_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 WeatherHttpGet port = ss.getWeatherHttpGet();
36
37 {
38 System.out.println("Invoking getCityWeatherByZIP...");
39 String _getCityWeatherByZIP_zip = "";
40 WeatherReturn _getCityWeatherByZIP__return = port.getCityWeatherByZIP(_getCityWeatherByZIP_zip);
41 System.out.println("getCityWeatherByZIP.result=" + _getCityWeatherByZIP__return);
42
43
44 }
45 {
46 System.out.println("Invoking getWeatherInformation...");
47 ArrayOfWeatherDescription _getWeatherInformation__return = port.getWeatherInformation();
48 System.out.println("getWeatherInformation.result=" + _getWeatherInformation__return);
49
50
51 }
52 {
53 System.out.println("Invoking getCityForecastByZIP...");
54 String _getCityForecastByZIP_zip = "";
55 ForecastReturn _getCityForecastByZIP__return = port.getCityForecastByZIP(_getCityForecastByZIP_zip);
56 System.out.println("getCityForecastByZIP.result=" + _getCityForecastByZIP__return);
57
58
59 }
60
61 System.exit(0);
62 }
63
64 }