问题描述
我有一个处理页面,我想通过Web服务运行所有功能(将Web引用添加到我的C#窗口表单应用中)。我的代码如下:
I have a processing page and I want to run function process all via web service (add web reference into my C# window form app). My code below:
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。在c:\Builders\4_10-2014_4_28-21_21_17-Full\脚本\BuildTemp\NetTools\PX.Data\Database\中的PX.Data.PXDatabaseProviderBase.getCompanyID(String tableName,companySetting& Setting)处Common\DbProviderBaseCompanies.cs:第471行...
And I got an exception message: System.Web.Services.Protocols.SoapExceptio:n Server was unable to process request. ---> PX.Data.PXUndefinedCompanyException: Unable determine proper company id for the request. at PX.Data.PXDatabaseProviderBase.getCompanyID(String tableName, companySetting& setting) in c:\Builders\4_10-2014_4_28-21_21_17-Full\Scripts\BuildTemp\NetTools\PX.Data\Database\Common\DbProviderBaseCompanies.cs:line 471...
您以前遇到过此错误吗?你能给我任何建议吗?非常感谢!
Have you ever got this error before? Could you please give me any suggestion? Thank you so much!
推荐答案
好吧,我知道了,因为Acumatica的许可证
Ok, I found out, because Acumatica's license
这篇关于如何通过网络服务调用处理页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!