package com.zhos.client;

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

import com.zhos.server.HelloWorldService;



public class Client {
	 public static void main(String[] args) {  
	        JaxWsProxyFactoryBean bean = new JaxWsProxyFactoryBean();  
	        bean.getInInterceptors().add(new LoggingInInterceptor());  
	        bean.getInFaultInterceptors().add(new LoggingOutInterceptor());  
	        bean.setServiceClass(HelloWorldService.class);  
	        bean.setAddress("http://localhost:9000/helloWorldService");  
	        HelloWorldService helloWorldService = (HelloWorldService)bean.create();  
	        String result = helloWorldService.sayHello("Kevin");  
	        System.out.println(result);  
	    }  
}
最近下载更多
lizw007  LV10 2022年1月20日
14095219w  LV5 2022年1月11日
cc900118  LV17 2021年10月11日
xk646842195  LV2 2020年10月14日
liuyilin9608  LV15 2020年5月17日
15398544947  LV9 2020年4月20日
632941115  LV3 2020年3月11日
1358849392  LV21 2019年12月19日
dengjunjun  LV15 2019年12月11日
landongming1987  LV1 2019年10月12日
最近浏览更多
ksksksks  LV11 2023年9月18日
tlpaladin  LV7 2022年11月29日
gaotieyou  LV5 2022年4月11日
abababa  LV1 2022年3月24日
lizw007  LV10 2022年1月20日
14095219w  LV5 2022年1月11日
腐蚀的顺丰速递 2021年12月8日
暂无贡献等级
zzz9985688  LV10 2021年11月29日
ssh123  LV10 2021年11月18日
cc900118  LV17 2021年10月11日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友