SugarCRM Soap APIに接続できません
質問
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, "");
これはあなたに冗談を与えます。
ログインが呼び出されると、最後の行に例外が表示されます。
私が受け取る例外には、 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です。
解決
間違った場所を探しています。 SugarのSoap構成内で、soap呼び出しに使用されるURLを指定します。これは、 https://sugar-dev.walkinwifi.com に設定されています。
これをhttpに変更しました。すべて順調です。
他のヒント
いずれの場合でも、SOAPサービスはHTTPSでも機能する必要があります。個人的には、C#クライアントであっても問題はありません。サーバー証明書と証明書チェーンが有効であることを確認します。
はい、 アントニオ。
所属していません StackOverflow