Je viens de commencer un projet dans lequel j'ai besoin d'insérer des contacts dans un système SugarCRM en utilisant l'interface SOAP.Impossible de se connecter à l'API Soap de SugarCRM
Jusqu'à présent, j'ai créé une référence au service http://sugar-dev.walkinwifi.net/soap.php?wsdl=sugarsoap
Ensuite writen un code comme celui-ci
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, "");
cela vous donne la plaisanterie.
La dernière ligne me donne une exception lorsque la connexion est appelée.
L'exception que je reçois a une exception interne se plaignant qu'il ne peut pas se connecter à 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."}
Où la partie https vient? Je n'ai utilisé aucune autre référence autre que http mais l'erreur indique clairement https. Puis-je me connecter au savon SugarCRM via http ou dois-je utiliser https?
Dans tous les exemples que je peux trouver sur le net c'est http mais la plupart d'entre eux sont des php avec des C# très.
Client C# SOAP pour accéder aux services Web exposés par SugarCRM. La version client du framework est basée sur .NET 4 https://github.com/amusarra/SugarCRMCSharpSOAPClient –