金蝶EAS标准登录接口EASLogin

  • Post author:
  • Post category:其他



Java请求金蝶EAS标准登录-WebService接口

1.需要先根据接口地址,生成Web Service Client客户端代码 (myeclipse生成的文件有问题,未解,所以我这里用eclipse。)

点击:New–>other–>Web Service Client

在这里插入图片描述

2.点击Next,并输入接口地址

在这里插入图片描述

3.点击Finish后,我们看到项目中生成了6个java文件,接下来我们就可以调用登录接口啦~

在这里插入图片描述

4.新建test测试类,我们来试下接口是否能调通

import ormrpc.services.EASLogin.EASLoginProxy;
import ormrpc.services.EASLogin.EASLoginProxyServiceLocator;
import client.WSContext;

/**
 * EAS登录测试类
 * @author RuHua
 *
 */
public class test {
	public static void main(String[] args) throws Exception {
		EASLoginProxy proxy = null;
        WSContext context = null;
        //登录
        proxy = new EASLoginProxyServiceLocator().getEASLogin();
        context = proxy.login("user","kduser","eas","EAS","L2",2);
		//登录成功返回 SessionId
        System.out.println("***getSessionId:"+context.getSessionId());
	}
}

控制台返回sessionId就代表请求成功啦~

在这里插入图片描述



版权声明:本文为chengxuyuanruhua原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。