step1: step2: step3: step4: step5: finish后,结构图如: 建立测试文件: public class Test_Client { @Test public void testClient() throws RemoteException { StuServerStub sb = new StuServerStub(); StuServerStub.GetStuInfo getStuInfo = new StuServerStub.GetStuInfo(); getStuInfo.setName("李四"); GetStuInfoResponse response = sb.getStuInfo(getStuInfo); StuServerStub.StuInfo info = response.get_return(); System.out.printf("the name : %s, the stuid : %s, the age : %s", info.getName(),info.getStuid(),info.getAge()); } } 运行结果: 如运行中出现如下异常: 关闭防火墙..... over~