通过HTTPS的SOAP Web服务无法正常工作

时间:2012-07-08 16:18:04

标签: soap nusoap sugarcrm soap-client

我目前正在使用https中的url的sugarcrm工作。肥皂无法在https网址上运行,我的代码在http网址中运行完美。在https模式下运行相同代码需要进行哪些更改?

我使用此代码。用户名,密码和网址仅供您参考。

<?php
require_once('nusoap.php');
$client = new soapclient('https://www.sugarcrm.com/soap.php?wsdl',true);
$auth_array = array(
'user_auth' => array(
'user_name' => 'abc',
'password' => md5('abc'),
)
);

$login_results = $client->call('login',$auth_array);
echo $session_id = $login_results['id'];
$user_guid = $client->call('get_user_id',$session_id);
printf("\n".$auth_array['user_auth']['user_name'].' has a GUID of ' . $user_guid . "\n\n");
?> 

1 个答案:

答案 0 :(得分:1)

确保$ sugar_config site_url设置正确反映了https网址。您可以在SugarCRM安装的根目录中的config.php文件中更改此内容。

相关问题