View Javadoc

1   /*
2    * $Id: WeatherSoap_WeatherSoap12_Client.java 21856 2011-05-09 09:59:16Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.cxf.weatherservice.myweather;
12  
13  import java.io.File;
14  import java.net.MalformedURLException;
15  import java.net.URL;
16  
17  import javax.xml.namespace.QName;
18  
19  public final class WeatherSoap_WeatherSoap12_Client {
20  
21      private static final QName SERVICE_NAME = new QName("http://ws.cdyne.com/WeatherWS/", "Weather");
22  
23      private WeatherSoap_WeatherSoap12_Client() {
24      }
25  
26      public static void main(String args[]) throws Exception {
27          URL wsdlURL = Weather.WSDL_LOCATION;
28          if (args.length > 0) {
29              File wsdlFile = new File(args[0]);
30              try {
31                  if (wsdlFile.exists()) {
32                      wsdlURL = wsdlFile.toURI().toURL();
33                  } else {
34                      wsdlURL = new URL(args[0]);
35                  }
36              } catch (MalformedURLException e) {
37                  e.printStackTrace();
38              }
39          }
40  
41          Weather ss = new Weather(wsdlURL, SERVICE_NAME);
42          WeatherSoap port = ss.getWeatherSoap12();
43  
44          {
45          System.out.println("Invoking getCityWeatherByZIP...");
46          GetCityWeatherByZIP _getCityWeatherByZIP_parameters = null;
47          GetCityWeatherByZIPResponse _getCityWeatherByZIP__return = port.getCityWeatherByZIP(_getCityWeatherByZIP_parameters);
48          System.out.println("getCityWeatherByZIP.result=" + _getCityWeatherByZIP__return);
49  
50  
51          }
52          {
53          System.out.println("Invoking getWeatherInformation...");
54          GetWeatherInformation _getWeatherInformation_parameters = null;
55          GetWeatherInformationResponse _getWeatherInformation__return = port.getWeatherInformation(_getWeatherInformation_parameters);
56          System.out.println("getWeatherInformation.result=" + _getWeatherInformation__return);
57  
58  
59          }
60          {
61          System.out.println("Invoking getCityForecastByZIP...");
62          GetCityForecastByZIP _getCityForecastByZIP_parameters = null;
63          GetCityForecastByZIPResponse _getCityForecastByZIP__return = port.getCityForecastByZIP(_getCityForecastByZIP_parameters);
64          System.out.println("getCityForecastByZIP.result=" + _getCityForecastByZIP__return);
65  
66  
67          }
68  
69          System.exit(0);
70      }
71  
72  }