Java??c#???hessian???
???????????? ???????[ 2014/9/19 13:03:53 ] ??????????????? Java
???????????????????????????????????????Serializable????
HelloBean.java
package hessian.test.server;
import java.io.Serializable;
public class HelloBean implements Serializable {
private static final long serialVersionUID = 570423789882653763L;
private String name;
private int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge(){
return age;
}
public void setAge(int age){
this.age = age;
}
}
ComplexData.java
package hessian.test.server;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class ComplexData implements Serializable{
private static final long serialVersionUID = 1L;
private ArrayList<HelloBean> helloBeans;
//private Map<String?? HelloBean> helloBeanMap;
private int number;
public int getNumber(){
return number;
}
public ArrayList<HelloBean> getHelloBeans(){
return helloBeans;
}
public void setData(ArrayList<HelloBean> beans?? int num){
this.number = num;
this.helloBeans = beans;
// helloBeanMap = new HashMap<String?? HelloBean>();
// for (HelloBean helloBean : beans) {
// if(!helloBeanMap.containsKey(helloBean.getName()))
// {
// helloBeanMap.put(helloBean.getName()?? helloBean);
// }
// }
}
}
????web.xml?????
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>hessian server</display-name>
<servlet>
<servlet-name>hessian</servlet-name>
<servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>
<init-param>
<param-name>service-class</param-name>
<param-value>hessian.test.server.HelloImpl</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>hessian</servlet-name>
<url-pattern>/hessian</url-pattern>
</servlet-mapping>
</web-app>
????Hessian??????c#??
?????????????????????IHello????IHello.cs
????public interface IHello
????{
????String sayHello(String msg);
????void sayHello2(int bean);
????void print(String msg);
????HelloBean getData(HelloBean bean);
????HelloBean[] getBeanList();
????ComplexData getComplexData();
????}
???????????????????μ???????????
HelloBean.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace hessian.test.server
{
public class HelloBean
{
public String Name
{
set { name = value; }
get { return name; }
}
private String name; //????????????????????????
public int Age
{
set { age = value; }
get { return age; }
}
private int age; //????????????????????????
public override String ToString()
{
return "Name: "+ name + " Age: " + age;
}
}
}
ComplexData.cs??
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace hessian.test.server
{
public class ComplexData
{
private HelloBean[] helloBeans;
//private Dictionary<String?? HelloBean> helloBeanMap;
private int number;
public int GetNumber()
{
return number;
}
public HelloBean[] GetBeans()
{
return helloBeans;
}
//public Dictionary<String?? HelloBean> GetBeansDic()
//{
// return helloBeanMap;
//}
}
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????