HM0001Test.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.miniframe.comm.httpclientapater;
  2. import org.apache.log4j.Logger;
  3. import com.miniframe.comm.httpclientapater.HttpclientapaterUtil;
  4. import com.miniframe.generate.comm.system.A_HM0001;
  5. import com.miniframe.generate.comm.httpclientapater.HM0001Client;
  6. import com.miniframe.generate.business.system.model.HM0001BaseModel;
  7. public class HM0001Test {
  8. private static final Logger logger = Logger.getLogger(HM0001Test.class);
  9. /**
  10. * 系统登录,获取报文体
  11. * @return
  12. */
  13. public static A_HM0001 getA_hm0001() {
  14. A_HM0001 a_hm0001 = new A_HM0001();
  15. // ----------以下增加【系统登录】上行体赋值-------------
  16. a_hm0001.setLogintype("1");
  17. a_hm0001.setPassword("2176216712");
  18. a_hm0001.setVerifygraph("1234");
  19. // ---------------------------------------------------
  20. return a_hm0001;
  21. }
  22. /**
  23. * 运行客户端测试,系统登录
  24. *
  25. * @param args
  26. * @throws Exception
  27. */
  28. public static void main(String[] args) throws Exception {
  29. HM0001BaseModel model = new HM0001BaseModel();
  30. model.setA_systemhead(HttpclientapaterUtil.getA_systemhead("HM0001"));
  31. model.setA_hm0001(HM0001Test.getA_hm0001());
  32. HM0001Client client = new HM0001Client();
  33. logger.error("客户端发送前总线:\r\n"+model);
  34. model = client.execute(model);
  35. logger.error("客户端发送后总线:\r\n"+model);
  36. }
  37. }