此前已认真通过该文档学习:http://open.kingdee.com/K3Cloud/ ... w.aspx?docId=113421
C#控制台代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kingdee.BOS.WebApi.Client;
using Newtonsoft.Json.Linq;
using Kingdee.BOS;
namespace WebAPITest
{
class Program
{
static void Main(string[] args)
{
// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
ApiClient client = new ApiClient("http://k3cloudv5/K3Cloud/");
object[] loginInfo = new object[] {
"54bf2b195c28fb",//帐套Id
"k3",//用户名
"5113221",//密码
2052};//语言id
var ret = client.Execute
var result = JObject.Parse(ret)["LoginResultType"].Value
// 登陆成功
string responseOut = string.Empty;
if (result == 1)
{
string service = "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExcuteOperation";
string formId = "BAH_STK_WebAPI";
string operationNumber = "GetBarCodeData";
responseOut = client.Execute
}//end if
Console.Write(responseOut);
}//end main
}
}
但执行提示报错,通过Fidder抓取到的错误信息如下:
请教WebAPI大神!
推荐阅读