package com.caiduoduo.hessian.client;
import java.net.MalformedURLException;
import com.caiduoduo.hessian.facade.HelloFacade;
import com.caucho.hessian.client.HessianProxyFactory;
/**
* Hello world!
*
*/
public class App
{
/**
* @param args
* @throws MalformedURLException
*/
public static void main( String[] args ) throws MalformedURLException
{
//String url ="http://172.19.25.143:8080/hessian/hessian/helloFacade";//集成Spring
String url ="http://172.19.25.143:8080/hessian/hello";
HessianProxyFactory factory = new HessianProxyFactory();
HelloFacade helloFacade = (HelloFacade) factory.create(HelloFacade.class, url);
System.out.println(helloFacade.sayHello("王刚"));
}
}
评论0
最新资源