Results 1 to 4 of 4

Thread: SOAP in C# - invalid login

  1. #1
    rus
    rus is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    37

    Default SOAP in C# - invalid login

    Hi all,

    I'm using the Sugar CE 5.0.0a, PHP Version 5.2.5, Windows NT, and SQL Server 2005.

    Right now I wanted to make a windows application that retrieve and update the sugarcrm database via SOAP.
    I try to follow this example : http://www.sugarcrm.com/wiki/index.p...SOAP_in_CSharp
    but i still got an error said : "Invalid login"
    at the :
    //Get a list of entries
    get_entry_list_result entryList = this.sugarClient.get_entry_list(this.sessionId, "Meetings",
    Query, OrderBy, Offset, fields, MaxResults, Convert.ToInt32(GetDeleted));
    and I still can't figure it out. I mean, I already got the sessionId, but when I try to call other function using the sessionId that i've got from the login function it always return 'Invalid login' error. Anybody can help me? Is there any settings that I missed?

  2. #2
    rus
    rus is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    37

    Default Re: SOAP in C# - invalid login

    is there anyone can help me on this one ?
    coz i should be able to connect to the webservice for the migration.

    regards,
    rus

  3. #3
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: SOAP in C# - invalid login

    Are you using the LDAP integrated login where you are logging in against a Windows Active Directory account? If so there is a somewhat different process for logging in on that. Following is some info on how you have to get authentication through the LDAP service. Otherwise, it's been awhile since I researched this but if I remember correctly the returned key changes on each login so you'll need to recheck.


    $key = 'abc123'; // LDAP Key as entered in Sugar
    $key = substr(md5($key),0,24);
    $iv = 'password';
    $ldap_hash = bin2hex(mcrypt_cbc(MCRYPT_3DES, $key, $user_password, MCRYPT_ENCRYPT, $iv));
    $this->client->call('login',array('user_auth'=>array('user_name' =>$user_name, 'password'=>$ldap_hash,'version'=>'.1'), 'application_name'=>$app_name));

    From post: http://www.sugarcrm.com/forums/showthread.php?t=23738

    This is from the WIKI. I think it's mostly the same as above though I don't have time to go through it.
    (http://www.sugarcrm.com/wiki/index.p...P_through_SOAP)
    require_once('./path/to/nusoap.php');

    $soap_client = new soapclient('http://someurl.com/sugar/soap.php?wsdl');

    $user_name = 'matt';
    $user_password = 'mygoodsecret123';
    $app_name = 'myniceprogram';

    $key = 'abc123'; // LDAP Key as entered in Sugar
    $key = substr(md5($key),0,24);
    $iv = 'password'; // note that this is the word password, not the user's password or hash...
    $ldap_hash = bin2hex(mcrypt_cbc(MCRYPT_3DES, $key, $user_password, MCRYPT_ENCRYPT, $iv));
    $soap_client->call('login',array('user_auth'=>array('user_name' =>$user_name, 'password'=>$ldap_hash,'version'=>'.1'), 'application_name'=>$app_name))
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  4. #4
    amusarra is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Roma
    Posts
    23

    Default Re: SOAP in C# - invalid login

    Antonio Musarra
    Senior Consultant Divisione T. E . M
    Telecomunicazioni Electronics & Media
    ____________________________
    Altran Italia S.p.A

    Via Goito 52
    00185 Roma

    Mob : +39 335 1028122
    Mail : antonio.musarra@altran.it
    http://www.altran.it
    Blog: http://musarra.wordpress.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SOAP login() method returns nothing?
    By mysticone in forum Help
    Replies: 2
    Last Post: 2012-01-08, 10:31 AM
  2. SOAP login() - Invalid Username/Password.
    By dsandor in forum Developer Help
    Replies: 12
    Last Post: 2010-12-07, 09:13 AM
  3. Applescript - SOAP problem (Invalid login)
    By sogict in forum Developer Help
    Replies: 1
    Last Post: 2007-11-08, 01:39 PM
  4. Replies: 0
    Last Post: 2006-07-03, 09:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •