简体   繁体   English

如何使用Acumatica Web服务以PHP连接网站

[英]How to use Acumatica Web services to connect with website in PHP

I am trying to connect with Accumatica using web services. 我正在尝试使用Web服务与Accumatica连接。 I am using the following resource from acumatica forum. 我正在使用acumatica论坛中的以下资源。

http://forum.acumatica.com/forum/acumatica-reseller-and-isv-community/development-and-customization/740-api-how-to-create-api-project-and-use-it-with-c-php-java?p=2809#post2809 http://forum.acumatica.com/forum/acumatica-reseller-and-isv-community/development-and-customization/740-api-how-to-create-api-project-and-use-it-with- C-PHP-java吗?p = 2809#post2809

I tried to follow all steps but, I was unsuccessful mainly because I am using ftp directly to update files on server and the above resource is for project only on windows. 我尝试执行所有步骤,但未成功,主要是因为我直接使用ftp来更新服务器上的文件,并且以上资源仅适用于Windows上的项目。

I already tried researching everything about web services and how to use web services with PHP and how to reference wsdl file in PHP. 我已经尝试研究有关Web服务的所有内容,以及如何在PHP中使用Web服务以及如何在PHP中引用wsdl文件。 Please let me know, if you need more information regarding this question. 如果您需要有关此问题的更多信息,请告诉我。

Thanks, Jas 谢谢Jas

If you have a WSDL file what you need is a Soap Client: 如果您有WSDL文件,那么您需要的是Soap Client:

http://php.net/manual/es/class.soapclient.php http://php.net/manual/es/class.soapclient.php

PHP SOAP client Tutorial/Recommendation? PHP SOAP客户端教程/推荐?

First of all you have to have your local envirionment for development. 首先,您必须拥有当地的发展环境。 I mean that you need installed php engine to run php scripts, otherwise it's very inconvenient way to upload files through FTP 我的意思是您需要安装php引擎才能运行php脚本,否则通过FTP上传文件的方式非常不便

Article which you mentioned is really useful, also you can find additional info in Acumatica general help. 您提到的文章非常有用,您还可以在Acumatica一般帮助中找到其他信息。

basically Acumatica provides SOAP interface to manipulate the data, you have to use SOAP from PHP to ensure connection. 基本上Acumatica提供了SOAP接口来处理数据,您必须使用PHP中的SOAP来确保连接。 Bad thing that PHP doesn't support out from the box SOAP and you have to build, let's say own interfaces based on our WSDL schema's or use native php classes + php_soap client 不好的一件事是,PHP不支持SOAP,而您必须构建它,例如,基于我们的WSDL模式的自己的接口或使用本机php类+ php_soap客户端

I would advise you to try the online solution at wsdltophp.com as it allows you to generate a PHP package based on the WSDL plus you can send requests without writing even one line of code. 我建议您在wsdltophp.com上尝试在线解决方案,因为它可以让您基于WSDL生成PHP软件包,而且即使不编写一行代码也可以发送请求。 You can then download the PHP script to send the request on your own server. 然后,您可以下载PHP脚本以在您自己的服务器上发送请求。

Otherwise, you can also use the PackageGenerator that creates a PHP package (newer version) that eases the comprehension of how to send the requests as each operation matches a PHP method. 否则,您还可以使用PackageGenerator创建一个PHP软件包(较新的版本),以简化对每个操作与PHP方法匹配时如何发送请求的理解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM