首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >登录Acumatica的多个实例

登录Acumatica的多个实例
EN

Stack Overflow用户
提问于 2020-06-19 06:59:45
回答 1查看 70关注 0票数 2

我在本地运行Acumatica的开发版本,在云中运行Acumatica的QA版本。

我通过SOAP编写了与Acumatica集成的c#程序。我为在http://localhost/AcumaticaERP本地运行的Acumatica实例创建了WSDL文件。现在我需要编写程序来连接云中的Acumatica生产实例。soapClient.Login方法没有将Acumatica URL作为参数。

如何允许用户从我的程序中动态选择Acumatica实例使用?

EN

回答 1

Stack Overflow用户

发布于 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

代码语言:javascript
复制
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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62460713

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档