我刚刚开始了一个项目,我需要使用 SOAP 接口将联系人插入到 SugarCRM 系统中。
到目前为止,我已经创建了对服务http://sugar-dev.walkinwifi.net/soap.php?wsdl=sugarsoap的引用
然后写一些这样的代码
public SugarHelper()
{
//Create a new instance of the client proxy
this.sugarClient = new sugarsoapPortTypeClient();
//Set the default value
this.sessionId = String.Empty;
}
public bool Authenticate(string Username, string Password)
{
//Create an authentication object
user_auth user = new user_auth();
//Set the credentials
user.user_name = Username;
user.password = this.computeMD5String(Password);
//Try to authenticate
set_entry_result authentication_result = this.sugarClient.login(user, "");
这给了你一个笑话。
调用 login 时,最后一行给了我一个异常。
我得到的异常有一个内部异常抱怨它无法连接到https://sugar-dev.walkinwifi.net/soap.php
{"An error occurred while making the HTTP request to https://sugar-dev.walkinwifi.net/soap.php. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."}
https部分来自哪里?除了 http,我没有使用其他参考,但错误清楚地说明了 https。
我可以通过 http 连接到 SugarCRM soap 还是必须使用 https?
在我可以在网上找到的所有示例中,它都是 http,但其中大多数是带有非常 c# 的 php。