-->

如何通过调用Web服务处理页面(How to call processing page via we

2019-10-21 07:24发布

我有一个处理页面,我希望所有通过Web服务(添加Web引用到我的C#窗口形式的应用程序)运行功能的过程。 我下面的代码:

var context = new ModuleABCService.Screen() // limk web services: http://localhost:8686/soap/DMSBL009.asmx
            {
               CookieContainer = new CookieContainer(),
               AllowAutoRedirect = true,
               EnableDecompression = true,
               Timeout = 60000
             };
var loginResult = context.Login(string.Format("{0}@{1}", val.UserName, company), val.Password);
if (loginResult.Code != ErrorCode.OK)
{
   throw new Exception(string.Format("Can not login {0}", company));
}
Content content = context.GetSchema();
context.Clear();
context.Submit(
              new Command[] 
                          { 
                               content.Actions.ProcessAll
                          }
          );    

而我得到了一个异常消息:System.Web.Services.Protocols.SoapExceptio:N服务器无法处理请求。 ---> PX.Data.PXUndefinedCompanyException:无法确定请求适当的公司ID。 在PX.Data.PXDatabaseProviderBase.getCompanyID(字符串表名,companySetting&设置)在C:\助洗剂\ 4_10-2014_4_28-21_21_17 -全\脚本\ BuildTemp \ NETTOOLS \ PX.Data \数据库\共同\ DbProviderBaseCompanies.cs:线471。 ..

你以前得到这个错误? 你能给我什么建议吗? 非常感谢!

Answer 1:

好吧,我发现了,因为Acumatica执照



文章来源: How to call processing page via web service