首页>代码>最简单的caucho hessian入门实例demo代码分享>/zuidaima_hessian_demo/src/main/java/com/zuidaima/hessian/client/HessianClientTest.java
                
                package com.zuidaima.hessian.client;
import java.net.MalformedURLException;
import java.util.Map;
import com.caucho.hessian.client.HessianProxyFactory;
import com.zuidaima.hessian.HelloHessian;
import com.zuidaima.hessian.MyCar;
/**
 * @author michael
 * 
 */
public class HessianClientTest {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String url = "http://localhost/HessianService";
		HessianProxyFactory factory = new HessianProxyFactory();
		try {
			HelloHessian hello = (HelloHessian) factory.create(
					HelloHessian.class, url);
			System.out.println(hello.sayHello());
			MyCar car = hello.getMyCar();
			System.out.println(car.toString());
			for (Map.Entry<String, String> entry : hello.myBabays().entrySet()) {
				System.out.println(entry.getKey() + "   " + entry.getValue());
			}
			for (String str : hello.myLoveFruit()) {
				System.out.println(str);
			}
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}
}
 最近下载更多
最近下载更多
                
                morenew     LV2
                2017年12月1日
            
            
        
                coolsb22     LV1
                2017年10月30日
            
            
        
                mzoai     LV19
                2017年6月27日
            
            
        
                363029317     LV1
                2017年5月19日
            
            
        
                763157698     LV1
                2016年12月30日
            
            
        
                hh516554097     LV10
                2016年8月15日
            
            
        
                xiaogang1256     LV1
                2016年6月20日
            
            
        
                adminysjtx     LV9
                2016年4月18日
            
            
        
                lqx137     LV1
                2016年4月15日
            
            
        
                anndy     LV2
                2016年2月25日
            
            
         最近浏览更多
最近浏览更多
                
                2039995605     LV9
                2023年4月10日
            
            
        
                沐兮20010401     LV7
                2021年10月12日
            
            
        
                2011063518    
                2020年12月17日
            
            
                    暂无贡献等级
            
        
                kevinkg     LV12
                2020年4月3日
            
            
        
                yasenjan    
                2020年3月14日
            
            
                    暂无贡献等级
            
        
                王小反     LV1
                2019年12月9日
            
            
        
                luojiaqi     LV1
                2019年11月9日
            
            
        
                糖炒栗子123    
                2019年10月30日
            
            
                    暂无贡献等级
            
        
                chengqiang     LV13
                2019年10月11日
            
            
        
                陈亚鹏    
                2019年9月21日
            
            
                    暂无贡献等级
            
        
 
                 
                 
                