我在本地运行Acumatica的开发版本,在云中运行Acumatica的QA版本。
我通过SOAP编写了与Acumatica集成的c#程序。我为在http://localhost/AcumaticaERP本地运行的Acumatica实例创建了WSDL文件。现在我需要编写程序来连接云中的Acumatica生产实例。soapClient.Login方法没有将Acumatica URL作为参数。
如何允许用户从我的程序中动态选择Acumatica实例使用?
发布于 2020-06-20 11:53:25
我首先建议研究REST API,因为这通常是推荐使用的集成API。
关于动态更改端点(即Acumatica实例),请注意DefaultSoapClient有许多重载的构造函数。有一种方法可以指定endpointConfigurationName (见下文)。这意味着您的URL应该在客户端应用程序的web.config/appsettings中,更详细地解释如下:https://help-2020r1.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=37613e5f-7a72-4dec-b5d9-2525951e99cf
public partial class DefaultSoapClient : System.ServiceModel.ClientBase<ConsoleApp2.ServiceReference1.DefaultSoap>, ConsoleApp2.ServiceReference1.DefaultSoap {
public DefaultSoapClient() {
}
public DefaultSoapClient(string endpointConfigurationName) :
base(endpointConfigurationName) {
}
public DefaultSoapClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public DefaultSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public DefaultSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress) {
}如果使用配置文件对您不起作用,您可以参考以下示例,通过此示例可以通过编程方式完成此操作:https://asiablog.acumatica.com/2019/01/dynamic-api-endpoint-url.html
https://stackoverflow.com/questions/62460713
复制相似问题