In the client side, input
the User (username and password), and a resultbean is returned:
public static void main(String[] args) throws Exception {
DataAdapter adapter = new MobileAdapter();
if (adapter.establishSession()) {
User user = new User();
user.setUserName("aaaa");
user.setPassword("bbbb");
Map param = new HashMap();
param.put("userBean", user);
Result result = (Result) adapter.invoke("MobileSignInOp", param, "resultBean");
adapter.invoke("MobileSignInOp", param, "resultBean");
System.out.println(result);
}
}
Following are the code samples for Data definition, Context
definition, and Operation implementation in the server side:
- Data definition:
- Context definition:
- Operation implementation: