View Javadoc

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