SugarCRM SOAP 测试调用失败 [英] SugarCRM SOAP test call fails

查看:44
本文介绍了SugarCRM SOAP 测试调用失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下代码测试 SugarCRM Soap 连接:

I am attempting to test a SugarCRM Soap connection using the following code:

<?
define('sugarEntry', TRUE);
require_once('include/nusoap/nusoap.php');
$sugarclient = new nusoapclient('http://www.mycrmurl.com/soap.php?wsdl',true);


echo $sugarclient->call('test', 'test string');
?>

不幸的是,测试调用返回 NULL.关于如何开始故障排除的想法?

Unfortunately, the test call returns NULL. Thoughts on how to begin troubleshooting?

推荐答案

我不熟悉名为 test 的 SugarCRM SOAP 方法,所以除非它是您自己制作的自定义方法,否则我会尝试一些简单的有效调用.(使用 Sugar CE 6.2 测试).

I'm not familiar with a SugarCRM SOAP method called test, so unless it's a custom method you made yourself, I'd try with some simple valid calls. (Tested with Sugar CE 6.2).

<?php
require_once('include/nusoap/lib/nusoap.php');

$myWsdl = 'http://www.mycrmurl.com/soap.php?wsdl';
$myAuth = array(
        'user_name' => 'will',
        'password' => MD5('will'),
        'version' => '0.1'
);
$soapClient = new nusoap_client($myWsdl,true);

$loginParams = array('user_auth' => $myAuth, 'application_name' => 'MyApp');
$loginResult = $soapClient->call('login', $loginParams);
$sessionId = $loginResult['id'];
echo $sessionId;
?>

如果以上仍然给您带来问题,请尝试以下操作:

If the above still gives you problems, try the following:

  • 查看网络服务器日志(电话是否接通)
  • 启用 SugarCRM 日志记录并将级别设置为调试
  • 启用 PHP 错误输出或将 PHP 错误记录到日志文件中
  • 使用例如用于测试 SOAP 调用的 SoapUI
  • 请参阅问题 5396302,了解更详尽的 SOAP 示例
  • 查看 SugarCRM SOAP 文档
  • Look in the web server log (Is the call getting through)
  • 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 more thorough SOAP example
  • Check the SugarCRM SOAP documentation

这篇关于SugarCRM SOAP 测试调用失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆