ReverseService.java 977 B

123456789101112131415161718192021222324252627282930313233
  1. package com.tencent.service;
  2. import com.tencent.common.Configure;
  3. import com.tencent.protocol.reverse_protocol.ReverseReqData;
  4. /**
  5. * User: rizenguo
  6. * Date: 2014/10/29
  7. * Time: 16:04
  8. */
  9. public class ReverseService extends BaseService{
  10. public ReverseService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
  11. super(Configure.REVERSE_API);
  12. }
  13. /**
  14. * 请求撤销服务
  15. * @param reverseReqData 这个数据对象里面包含了API要求提交的各种数据字段
  16. * @return API返回的XML数据
  17. * @throws Exception
  18. */
  19. public String request(ReverseReqData reverseReqData) throws Exception {
  20. //--------------------------------------------------------------------
  21. //发送HTTPS的Post请求到API地址
  22. //--------------------------------------------------------------------
  23. String responseString = sendPost(reverseReqData);
  24. return responseString;
  25. }
  26. }