public class ZxjTest { PRotected String name="gaga"; protected int age=20; protected int sex=22; protected List items=new ArrayList(); /** * ZxjTest 构造子注解。 */ public ZxjTest() { super(); } public String getName() { return name; } public int getAge() { return age; } public int getSex() { return sex; } public List getItems() { return items; } }
客户端调用的源代码: String endpoint = "http://myserver:7001/ZxjTest.jws"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName("getName"); String ret = (String) call.invoke(new Object[] {});