1   package org.controlhaus.xfire.client;
2   
3   import java.io.File;
4   import java.lang.reflect.Method;
5   
6   import net.webservicex.GetWeatherByZipCodeDocument;
7   import net.webservicex.GetWeatherByZipCodeResponseDocument;
8   
9   import org.apache.beehive.controls.api.bean.Control;
10  import org.apache.beehive.controls.api.context.ControlBeanContext;
11  import org.apache.beehive.controls.runtime.bean.ControlContainerContext;
12  import org.controlhaus.xfire.weather.WeatherForecastClientControl;
13  
14  import junit.framework.TestCase;
15  
16  /***
17   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
18   * @since Nov 2, 2004
19   */
20  public class WeatherTest 
21      extends AbstractControlTest
22  {
23      @Control WeatherForecastClientControl weather;
24  
25      public void testControl() 
26          throws Exception
27      {
28          assertNotNull(weather);
29          
30          assertTrue(weather instanceof WeatherForecastClientControl);
31          
32          GetWeatherByZipCodeDocument doc = GetWeatherByZipCodeDocument.Factory.newInstance();
33          doc.addNewGetWeatherByZipCode().setZipCode("49506");
34          
35          // It would be great if this service actually worked. It always returns status 500
36          // GetWeatherByZipCodeResponseDocument response = weather.GetWeatherByZipCode( doc );
37      }
38  }