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_WeatherSoap12_Client {
16
17 private static final QName SERVICE_NAME = new QName("http://ws.cdyne.com/WeatherWS/", "Weather");
18
19 private WeatherSoap_WeatherSoap12_Client() {
20 }
21
22 public static void main(String args[]) throws Exception {
23 URL wsdlURL = Weather.WSDL_LOCATION;
24 if (args.length > 0) {
25 File wsdlFile = new File(args[0]);
26 try {
27 if (wsdlFile.exists()) {
28 wsdlURL = wsdlFile.toURI().toURL();
29 } else {
30 wsdlURL = new URL(args[0]);
31 }
32 } catch (MalformedURLException e) {
33 e.printStackTrace();
34 }
35 }
36
37 Weather ss = new Weather(wsdlURL, SERVICE_NAME);
38 WeatherSoap port = ss.getWeatherSoap12();
39
40 {
41 System.out.println("Invoking getCityWeatherByZIP...");
42 GetCityWeatherByZIP _getCityWeatherByZIP_parameters = null;
43 GetCityWeatherByZIPResponse _getCityWeatherByZIP__return = port.getCityWeatherByZIP(_getCityWeatherByZIP_parameters);
44 System.out.println("getCityWeatherByZIP.result=" + _getCityWeatherByZIP__return);
45
46
47 }
48 {
49 System.out.println("Invoking getWeatherInformation...");
50 GetWeatherInformation _getWeatherInformation_parameters = null;
51 GetWeatherInformationResponse _getWeatherInformation__return = port.getWeatherInformation(_getWeatherInformation_parameters);
52 System.out.println("getWeatherInformation.result=" + _getWeatherInformation__return);
53
54
55 }
56 {
57 System.out.println("Invoking getCityForecastByZIP...");
58 GetCityForecastByZIP _getCityForecastByZIP_parameters = null;
59 GetCityForecastByZIPResponse _getCityForecastByZIP__return = port.getCityForecastByZIP(_getCityForecastByZIP_parameters);
60 System.out.println("getCityForecastByZIP.result=" + _getCityForecastByZIP__return);
61
62
63 }
64
65 System.exit(0);
66 }
67
68 }