import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

/**
* @Description: TODO(用一句话描述该文件做什么)
* @author Alpha
* @date 2015年10月26日 下午3:46:22
* @version V1.0
*/
public class Test {

public static void main(String[] args) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

factory.getInInterceptors().add(new LoggingInInterceptor());

factory.getOutInterceptors().add(new LoggingOutInterceptor());

String address = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl";
factory.setAddress(address);

factory.setServiceClass(WeatherWebServiceSoap.class);

WeatherWebServiceSoap client = (WeatherWebServiceSoap) factory.create();