Thursday, November 20, 2008 ..:: Forums ::.. Register  Login
 Forums Minimize
SearchForum Home
     
  Mainstream Forums  Developers  Unable to login...
 Unable to login by soap
 
Developer58
12 posts
Joined
8/28/2008

Unable to login by soap
Posted: 28 Aug 08 4:04 AM
Hi,

I'm trying to use the soap service in SplendidCRM to add f.e. leads from my website,
but i can never make a connection. I get this error: (when first trying manually in the soap form):

System.Exception: Invalid username and/or password for admin

The password and username are off course correct.

The IDataReader (in public Guid LoginUser(ref string sUSER_NAME, string sPASSWORD, bool bLogEvent)never returns result,
while when i run the SQL manually it does. How is this possible?

Tnx,
Dirk



Developer58
12 posts
Joined
8/28/2008

Re: Unable to login by soap
Posted: 28 Aug 08 8:12 AM
Forget it: i forgot to hash the password...
danfercol
1 posts
Joined
8/29/2008

Re: Unable to login by soap
Posted: 29 Aug 08 1:15 PM Modified By danfercol  on 8/29/2008 1:15:20 PM)
Hi can you tell me how i can use the SOAP, interface.. i downloaded splendid open source for evaluation purposes but i can not see any web service...
Thank you
support
2098 posts
1st
Joined
1/3/2006

Re: Unable to login by soap
Posted: 29 Aug 08 1:38 PM

The service is at the root of the site, in soap.asmx.  Your best bet is to use the SugarCRM SOAP documentation as the interface is identical.  At some point, you will need to hash the password, so I've included the code here.

  public static string HashPassword(string sPASSWORD)
  {
   UTF8Encoding utf8 = new UTF8Encoding();
   byte[] aby = utf8.GetBytes(sPASSWORD);
   
   MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
   byte[] binMD5 = md5.ComputeHash(aby);
   // 02/09/2006 Paul.  Password is stored in upper case.
   // This will only be an issue on Oracle & DB2 where the data is case significant.
   return Sql.HexEncode(binMD5).ToUpper();
  }

Developer58
12 posts
Joined
8/28/2008

Re: Unable to login by soap
Posted: 29 Aug 08 6:34 PM
I found this link vert helpfull: http://www.sugarcrm.com/wiki/index.php?title=SOAP_in_CSharp

Directly importing the webreference did not work well. I used the SDK-method to create a class.

Once you dive into it, you'll find that you can get and set everyrhing with the get_entries en set_entries nethods. The set_entries can also create records!
That's how i directly import users as contact and account in Splendid once they register on my website. Works great.

  Mainstream Forums  Developers  Unable to login...

Forum Home  Search       

Copyright (c) 2006-2008 SplendidCRM Software, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2008 by Perpetual Motion Interactive Systems Inc.
SplendidCRM and SplendidCRM Software are trademarks of SplendidCRM Software, Inc. SugarCRM is a trademark of SugarCRM Inc. in the United States, the European Union and other countries. All other trademarks used in this web site are the property of their respective owners.