SugarCRM С# - получение 404 не найдено

В настоящее время я пытаюсь работать с SugarCRM Soap/WSDL из Visual Studio на С#. Всякий раз, когда я звоню в службу, я получаю исключение 404 - not found, хотя я могу прекрасно добавить службу при вводе URL-адреса в Visual Studio.

Мой код выглядит следующим образом:

public void Login()
{
    //Create an authentication object
    user_auth user = new user_auth();

    //Set the credentials
    user.user_name = "myusername";
    user.password = this.computeMD5String("mypass");

    //Try to authenticate
    set_entry_result authentication_result = this.sugarService.login(user, "");

    //Check for errors
    if (Convert.ToInt32(authentication_result.error.number) != 0)
    {
        //An error occured
        this.Session = String.Concat(authentication_result.error.name, ": ",
        authentication_result.error.description);

        //Clear the existing sessionId
        this.Session = String.Empty;
    }
    else
    {
        //Set the sessionId
        this.Session = authentication_result.id;

        //Clear the existing error
        this.Error = String.Empty;
    }
}

Кто-нибудь испытал это раньше? :-)

Любая помощь/подсказка приветствуется!

Заранее спасибо.

/ Bo


person bomortensen    schedule 12.09.2011    source источник


Ответы (2)


Попробуйте использовать один из этих URL-адресов вместо своего домена. Также добавьте каталог, если он не установлен в корне.

http://mydomain/service/v2/soap.php?wsdl или http://mydomain/service/v2_1/soap.php?wsdl

person Justin King    schedule 14.09.2011

Вы должны использовать URL-адрес http://myCRMdomain.com/soap.php?wsdl.

person PHPBugs    schedule 15.09.2011