????????????????Hessiancsharp.dll???á?
???????????
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using hessiancsharp.client;
using hessian.test.server;
namespace HessianClientTest
{
class Program
{
static void Main(string[] args)
{
string url = @"http://localhost:8080/HessianServerTest/hessian";
CHessianProxyFactory factory = new CHessianProxyFactory();
IHello test = (IHello)factory.Create(typeof(IHello)?? url);
//Test function
Console.WriteLine(test.sayHello("lu"));   //?????????????????????
test.sayHello2(12);                       //???????????????? "Hello 12"
test.print("hessian");                    //???????????????? "hessian"
//Test Object
HelloBean bean = new HelloBean();
//bean.setName("lu xiaoxun");
bean.Name = "luxiaoxun";
HelloBean result = test.getData(bean);
Console.WriteLine(result.Name);
Console.WriteLine(result.Age);
Console.WriteLine(result);
//Test Object Array
HelloBean[] beans = test.getBeanList();
if (beans != null)
{
foreach (HelloBean data in beans)
{
Console.WriteLine(data.ToString());
}
}
//Test complex data
ComplexData complexData = test.getComplexData();
if (complexData != null)
{
Console.WriteLine("Array number: " + complexData.GetNumber());
HelloBean[] comArray = complexData.GetBeans();
if (comArray != null)
{
foreach (HelloBean data in comArray)
{
Console.WriteLine(data.ToString());
}
}
//Dictionary<String?? HelloBean> helloBeanMap = complexData.GetBeansDic();
//if (helloBeanMap != null)
//{
//    foreach (String key in helloBeanMap.Keys)
//    {
//        Console.WriteLine(helloBeanMap[key].GetHelloBeanInfo());
//    }
//}
}
Console.ReadKey();
}
}
}
????????????

???????????
????1???????????????????????????????????????
????IHello?????????????????????????????£?????IHello???????HelloBean??ComplexData??Java??????C#???????????HelloBean???????????????????
????2????????????
????????????????????????????????????£???????????????£???
????3??????????????л?
????4??????????????????????
???????????????????????????????????????????????????????????????????ArrayList?????????????C#????????Array???飩?????????HashMap??????????????C#??????Dictionary????????£???????????hash?????????????μ??μ?????????????