Results 1 to 2 of 2

Thread: SugarCRM 5.5.0 Issues Connecting to SOAP

  1. #1
    Join Date
    Feb 2010
    Posts
    10

    Default SugarCRM 5.5.0 Issues Connecting to SOAP

    For some reason I can't connect through the SOAP API anymore since I upgraded to 5.5.0. I have tried a simple example on the wiki here: http://www.sugarcrm.com/wiki/index.p...alls_using_PHP

    Here is my code I used:
    PHP Code:
    <?php

    require_once('nusoap.php');
    $client = new nusoap_client('https://crm.examplesite.edu/soap.php?wsdl',true);

     
    $auth_array = array(
        
    'user_auth' => array(
          
    'user_name' => 'admin',
          
    'password' => md5('mypassword'),
        )
     ); 
     
      
    $login_results $client->call('login',$auth_array);
     
      
    $session_id =  $login_results['id'];
     
      
    $user_guid $client->call('get_user_id',$session_id);
     
      
    printf("\n".$auth_array['user_auth']['user_name'].' has a GUID of '  $user_guid "\n\n");
    ?>
    When I run this script it returns this:

    stdClass Object ( [id] => -1 [error] => stdClass Object ( [number] => 10 [name] => Invalid Login [description] => Login attempt failed please check the username and password ) )


    I also ran a similar script that just outputs: admin has a GUID of -1

    Could you guys give my any suggestions on how or where I can resolve this issue. Is their an updated examples to connect to SugarCRM 5.5.0? Is there a different approach to connecting to the 5.5.0 version of SOAP? What does it mean when it returns a negative GUID for admin?

    I had this problem once before when we upgraded Sugar. I couldn't resolve the issue and ended up reinstalling Sugar. This time I am trying to prevent from doing this. I've also tested this through my local dev environment with no issues connecting.

    Thanks in advance for any help

  2. #2
    chaptergoat is offline Member
    Join Date
    Mar 2010
    Posts
    13

    Default Re: SugarCRM 5.5.0 Issues Connecting to SOAP

    Change to
    <?php
    $client = new SoapClient(null,
    array('location' => 'https://crm.examplesite.edu/soap.php',
    'uri' => 'http://www.sugarcrm.com/sugarcrm',
    'soap_version' => SOAP_1_1,
    'trace' => 1,
    'exceptions' => 0
    ));
    $auth_array = array(
    'user_name' => 'admin'',
    'password' => md5('mypassword'),

    );

    $login_results = $client->login($auth_array,"test");
    $session_id = $login_results->id;
    $user_guid = $client->call('get_user_id',$session_id);
    printf("\n".$auth_array['user_auth']['user_name'].' has a GUID of ' . $user_guid . "\n\n");
    ?>

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2010-11-30, 02:00 PM
  2. Hosted server--Issues connecting to DB
    By sandfly in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-02-14, 07:10 PM
  3. Stop connecting to sugarcrm.com
    By johnfd in forum Help
    Replies: 2
    Last Post: 2007-05-15, 07:12 AM
  4. soap api connecting two tables
    By sugarcare in forum Help
    Replies: 5
    Last Post: 2006-09-06, 03:01 PM

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
  •