لا يمكن الاتصال عيني الصابون API
سؤال
ولقد بدأت للتو على مشروع حيث كنت في حاجة لادخال الاتصالات في نظام عيني باستخدام واجهة SOAP.
وحتى الآن أنا خلقت إشارة إلى خدمة HTTP: // السكر -dev.walkinwifi.net/soap.php؟wsdl=sugarsoap
وبعد ذلك writen بعض التعليمات البرمجية مثل هذا
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."}
وأين الجزء الشبكي تأتي من؟ ولقد استخدمت أي إشارة أخرى غير HTTP بعد الخطأ بوضوح الشبكي.
هل يمكنني الاتصال الصابون سار عبر HTTP أو يجب أن تستخدم https؟
في جميع الأمثلة يمكنني العثور على النت انها http ومعظمهم من فب مع c # جدا منها.
المحلول
وأنا أبحث في المكان الخطأ. داخل تكوين الدهون والسكر تحديد عنوان الموقع الذي سيتم استخدامه للمكالمات الصابون. هذا ومن المقرر أن https://sugar-dev.walkinwifi.com .
وتغييره إلى http وكل شيء على ما يرام.
نصائح أخرى
في أي حال، فإن خدمات SOAP يجب أيضا العمل على HTTPS. شخصيا لم تتح لي أي مشاكل، حتى مع وجود C # العميل. تحقق من أن شهادة الملقم وسلسلة شهادة صالحة.
وداعا، أنطونيو.