12345678910111213141516171819202122232425262728293031323334353637383940 |
- package com.cxfws.demo.service.impl;
- import javax.annotation.PostConstruct;
- import javax.jws.WebMethod;
- import javax.jws.WebResult;
- import javax.jws.WebService;
- import org.json.JSONArray;
- import org.json.JSONException;
- import org.json.JSONObject;
- import org.springframework.stereotype.Service;
- @Service("diexcWebService2")
- @WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "diexcWebService2Port", serviceName = "diexcWebService2")
- public class DiexcService2{
- @PostConstruct
- private void init(){
- //System.out.println("------DiexcService2--init-");
-
- }
-
- @WebMethod(operationName = "excTable",action="http://service.web.jsjty.com/excTable")
- @WebResult(name = "result",targetNamespace = "http://service.web.jsjty.com/")
- public String excTable(int num) {
- JSONArray jsons=new JSONArray();
- try {
- jsons.put(new JSONObject().put("sid", "dservice2"));
- } catch (JSONException e) {
- e.printStackTrace();
- }
-
- return jsons.toString();
- }
-
- }
|