Hi!
 
Works under J2SE 1.4.2_06 and Axis 1.2RC3.
 
I ran the Axis 1.2RC3 version of WSDL2Java against http://www.ejse.com/WeatherService/Service.asmx?WSDL then invoked this code:
 
 
   int nZipCode = 19147;  // Zip code for Philadelphia
 
   ServiceLocator locator = new ServiceLocator();
   ServiceSoapStub stub = (ServiceSoapStub)locator.getPort(ServiceSoap.class);
   GetWeatherInfo parameters = new GetWeatherInfo(nZipCode);
   GetWeatherInfoResponse response = stub.getWeatherInfo(parameters);
   com.ejse.WeatherService.WeatherInfo weatherInfoResult = response.getGetWeatherInfoResult();
 
   System.out.println("Location: " + weatherInfoResult.getLocation());
   System.out.println("Icon Index: " + weatherInfoResult.getIconIndex());
   System.out.println("Temprature: " + weatherInfoResult.getTemprature());
   System.out.println("Feels Like: " + weatherInfoResult.getFeelsLike());
   System.out.println("Forecast: " + weatherInfoResult.getForecast());
   System.out.println("Visibility: " + weatherInfoResult.getVisibility());
   System.out.println("Pressure: " + weatherInfoResult.getPressure());
   System.out.println("Dew Point: " + weatherInfoResult.getDewPoint());
   System.out.println("UV Index: " + weatherInfoResult.getUVIndex());
   System.out.println("Humidity: " + weatherInfoResult.getHumidity());
   System.out.println("Wind: " + weatherInfoResult.getWind());
   System.out.println("Reported At: " + weatherInfoResult.getReportedAt());
   System.out.println("Last Updated: " + weatherInfoResult.getLastUpdated());
 
and got this output:
 
 
Location: Philadelphia, PA
Icon Index: 26
Temprature: 63�F
Feels Like: 63�F
Forecast: Cloudy
Visibility:
Pressure: 29.70 in.
Dew Point: 53�F
UV Index:
Humidity: 69%
Wind: From WNW at 4 mph
Reported At:
Last Updated:
 
 
 
Jeff
 
 
----- Original Message -----
Sent: Wednesday, April 27, 2005 11:48 AM
Subject: Problem upgrading from Axis 1.1 to Axis 1.2RC3

Hi all,

I'm moving from Apache Axis 1.1 to 1.2RC3 and I'm having an issue with calling methods on a web service I've generated a client for. I re-generated the client code for 1.2RC3. I'm switching because we're moving from JDK1.4.2 up to JDK5 and the "enum" variable names and package are illegal.

Anyway, on to my problem. The service I'm binding to is the weather service here: http://www.ejse.com/services/weather_xml_web_services.htm. It's just an example app to show how we can do these things and to test out using Spring's Axis support. With 1.1 this worked fine. With 1.2RC3 I've tracked the problem down to the section starting with line 1338 in org.apache.axis.client.Call:

        for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
            op = (Operation) operations.get( i );
            if ( opName.equals( op.getName() ) ) {
                break ;
            }
        }

The problem is that opName is the name of the method from the generated stub interface: "getWeatherInfo". The op.getName is returning "GetWeatherInfo". I looked at the code for Call in Axis 1.1, and it looks the same, so I'm not sure why it was working, but it was. Unfortunately, no such luck in Axis 1.2RC3.

Any ideas? Is there something I'm doing wrong, or is this a bug?

Thanks,

Jason

Reply via email to