DiexcService.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.cxfws.demo.service.impl;
  2. import javax.annotation.PostConstruct;
  3. import javax.jws.WebService;
  4. import org.json.JSONArray;
  5. import org.json.JSONException;
  6. import org.json.JSONObject;
  7. import org.springframework.context.annotation.Lazy;
  8. import org.springframework.context.annotation.Scope;
  9. import org.springframework.stereotype.Component;
  10. import org.springframework.stereotype.Controller;
  11. import org.springframework.stereotype.Service;
  12. import org.springframework.transaction.annotation.Transactional;
  13. @Service("diexcWebService")
  14. @WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "diexcWebServicePort", serviceName = "diexcWebService")
  15. public class DiexcService implements IDiexcService {
  16. @PostConstruct
  17. private void init(){
  18. //System.out.println("------DiexcService--init-");
  19. }
  20. @Override
  21. public String excTable(int num) {
  22. JSONArray jsons=new JSONArray();
  23. try {
  24. jsons.put(new JSONObject().put("sid", "dservice"));
  25. } catch (JSONException e) {
  26. e.printStackTrace();
  27. }
  28. return jsons.toString();
  29. }
  30. }