第 1 行解析 SOAP 有效负载时出现 XML 错误:标签不匹配

发布于 2024-12-13 10:24:57 字数 898 浏览 3 评论 0原文

我在使用 nusoap 和/或 SugarCRM 时遇到错误。这是错误:

XML error parsing SOAP payload on line 1: Mismatched tag

我在 $soapclient->error_str 响应中得到了这个错误。不太确定这个错误的含义或它所在的位置,我需要一些帮助。这是背景,我正在 SugarCRM 中使用包含的 nusoap 类,并且有一个访问肥皂接口的外部站点。奇怪的是,我有本地运行的工作副本,只有当我将其上传到我的 Linux 服务器时才会出现此错误。

我现在的声誉很低,但如果你给出有效的答案,我会接受。而且,我研究了这个错误,但没有运气。任何帮助将不胜感激。如果您需要我发布任何代码,请告诉我。

更多信息:

我正在使用 SugarCRM CE 6.2.1。我的肥皂入口点是 http://server/sugar/soap.php。这是我的 nusoap 客户端实例。

$soapclient = new nusoap_client('http://server/sugar/soap.php');

以下是对 SOAP 客户端进行调用的示例

$result = $soapclient->call('update_existing_contact', array($session_id, $data));

,但是每次调用的错误都是相同的。

当我尝试使用 Sugar/examples/SoapTest.php 时,我也遇到同样的错误,所以我不认为它是客户端。

就像我之前所说的,最奇怪的事情是问题只发生在我的服务器上,即使它是相同的代码。

I am getting an error with nusoap and/or SugarCRM. Here is the error:

XML error parsing SOAP payload on line 1: Mismatched tag

I get that in the $soapclient->error_str response. Not exactly sure what this error means or where it is located and I could use some help. So here is the background, I am working in SugarCRM with the included nusoap class and have an external site accessing the soap interface. The weird thing is that I have working copy running locally and this error only occurred when I uploaded it to my linux server.

I now I have a low reputation but if you give a working answer I will accept it. And also, I have researched the error with no luck. Any help would be much appreciated. If you need me to post any code, just let me know.

MORE INFO:

I am using SugarCRM CE 6.2.1. My soap entry point is http://server/sugar/soap.php. Here is my instation of the nusoap client.

$soapclient = new nusoap_client('http://server/sugar/soap.php');

Here is an example of a call made to the soap client

$result = $soapclient->call('update_existing_contact', array($session_id, $data));

However the error is the same for every call.

Also I get the same error when I try to use the sugar/examples/SoapTest.php so I don't think it is the client.

Like I said earlier the thing that is the most weird is that the problem only occurs on my server even when it is the same code.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疾风者 2024-12-20 10:24:57

我会尝试使用例如 SoapUI 来测试 Web 服务。如果有效,您就知道这很可能是客户端的问题。其他一些调试建议

  • 查看 Web 服务器日志(调用是否成功)
  • 启用 SugarCRM 日志记录并设置调试级别
  • 启用 PHP 错误输出或将 PHP 错误记录到日志文件
  • 使用例如 SoapUI 来测试 SOAP 调用
  • 有关完整的 SOAP 示例,请参阅问题 5396302
  • 检查SugarCRM SOAP 文档

I would try to use e.g. SoapUI to test the web service. If that works, you know it's most likely a problem with the client. Some other suggestions for debugging

  • Look in the web server log (Is the call getting through OK)
  • Enable the SugarCRM logging and set the level to debug
  • Either enable PHP error output or make PHP log errors to a log file
  • Use e.g. SoapUI to test SOAP call
  • See question 5396302 for a thorough SOAP example
  • Check the SugarCRM SOAP documentation
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文