ElpSync.java
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.example;
import com.model.UserInfo;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
/**
* Created by wangkang
* Date :2021/10/27
* Version :1.0
* @author wangkang
*/
@WebService()
public class ElpSync {
SyncService syncService = new SyncServiceImpl();
@WebMethod
public String syncOrganize(UserInfo userInfo) {
String result = "Hello, syncOrganize, from " + userInfo.toString();
System.out.println(result);
// String s = syncService.syncOrganize(data);
// System.out.println("s" + s);
return result;
}
@WebMethod
public String sysUser(UserInfo userInfo) {
String result = "Hello, sysUser, from " + userInfo.toString();
System.out.println(result);
String s = syncService.syncUser(userInfo.toString());
// System.out.println("s" + s);
return result;
}
public static void main(String[] argv) {
Object implementor = new ElpSync();
String address = "http://localhost:9990/ElpSync";
Endpoint.publish(address, implementor);
}
}