Hi all,

I have an error in client for weather example.

The same problem was mentioned here one week ago.

The service is called and returned message is correct (tested with soapUI).
There is error in my client. Service works fine.

This message is in log:
INFO: Discarding unexpected response: HTTP/1.1 100 Continue

The client code is in attachment.

Why is the response unexpected and discarded?
I am using xfire 1.2.5.

Thanks.

Regards,
Zdenek
package org.codehaus.xfire.jaxb;

import java.net.MalformedURLException;

import net.webservicex.GetWeatherByZipCode;
import net.webservicex.GetWeatherByZipCodeResponse;
import net.webservicex.WeatherForecastsType;

import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

public class WeatherServiceClient
  {
  public static final String serverURL = "http://192.168.100.119:7021/xfire-jaxb2/services/WeatherService";;
  //public static final String serverURL = "http://192.168.100.119:8881/xfire-jaxb2/services/WeatherService";;
  /**
   * @param args
   */
  public static void main ( String[] args )
    throws MalformedURLException
    {
    Service serviceModel = new ObjectServiceFactory()
                                    .create(WeatherService.class,
                                            "WeatherService",
                                            "http://www.webservicex.net";,
                                            null);

    WeatherService service = (WeatherService) new XFireProxyFactory().create(serviceModel, serverURL);
     
    System.out.println("start jaxb2 test");
     
    GetWeatherByZipCode requestData = new GetWeatherByZipCode();
    requestData.setZipCode( "1234" );
     
    GetWeatherByZipCodeResponse responseData = service.GetWeatherByZipCode( requestData );
     
    WeatherForecastsType forecastType = responseData.getGetWeatherByZipCodeResult();
     
    System.out.println("allocationFactor: " + forecastType.getAllocationFactor());
    System.out.println("latitude: " + forecastType.getLatitude());
    System.out.println("longitude: " + forecastType.getLongitude());  
    }
  }
---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to