Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@936 931142cf-59ea-a443-aa0e-51397b428577

ld_guxl 8 years ago
parent
commit
0e1c5525b0

+ 42 - 0
gkjsjy/trunk/src/com/cxfws/demo/service/impl/DiexcService.java

@@ -0,0 +1,42 @@
+package com.cxfws.demo.service.impl;
+
+import javax.annotation.PostConstruct;
+import javax.jws.WebService;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Controller;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+
+@Service("dservice")
+@WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "diexcWebServicePort", serviceName = "diexcWebService")
+public class DiexcService implements IDiexcService {
+
+	@PostConstruct
+	private void init(){
+		//System.out.println("------DiexcService--init-");
+		
+	}
+
+	@Override
+	public String excTable(int num) {
+		JSONArray jsons=new JSONArray();
+		
+		try {
+			jsons.put(new JSONObject().put("sid", "dservice"));
+		} catch (JSONException e) {
+			e.printStackTrace();
+		}
+		
+		return jsons.toString();
+	}
+	
+
+
+}

+ 40 - 0
gkjsjy/trunk/src/com/cxfws/demo/service/impl/DiexcService2.java

@@ -0,0 +1,40 @@
+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("dservice2")
+@WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "diexcWebServicePort", serviceName = "diexcWebService")
+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();
+	}
+	
+
+
+}

+ 13 - 0
gkjsjy/trunk/src/com/cxfws/demo/service/impl/IDiexcService.java

@@ -0,0 +1,13 @@
+package com.cxfws.demo.service.impl;
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "diexcWebServicePort", serviceName = "diexcWebService")
+public interface IDiexcService {
+	@WebMethod(operationName = "excTable",action="http://service.web.jsjty.com/excTable")
+	@WebResult(name = "result",targetNamespace = "http://service.web.jsjty.com/")
+	public String excTable(int num);
+	
+}