ElpSync.java 1.09 KB
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);
    }
}