Results 1 to 4 of 4

Thread: Sugar SOAP API - Problem with remote connection

  1. #1
    sugaruser007 is offline Junior Member
    Join Date
    Oct 2007
    Posts
    3

    Default Sugar SOAP API - Problem with remote connection

    Hi

    Can anyone please help me out in usage of Sugar Soap API to fetch CRM data.
    I have tried using example programs, All of them works fine with local sugarcrm. But not working with my Remote SUGAR CRM.

    This is the program i have been using.

    I can get the session id when i use local crm url. But i could not get the session id for remote URL.
    <?php

    require_once("nusoap/nusoap.php");

    $config['sugar_server'] = "http://localhost/SugarCRM/soap.php?wsdl=";
    //$config['sugar_server'] = "http://www.my-sugarcrm-url.com/soap.php?wsdl=";

    $config['login'] = array('user_name' => "admin",'password' => md5("mypassword"));

    $config['application_name'] = "Test Soap Application";

    // open a connection to the server
    $sugarClient = new nusoapclient($config['sugar_server'], TRUE);
    $err = $sugarClient->getError();
    if ($err) {
    return $err;
    die();
    }
    echo $sugarClient; // Sucess till now. Connection opened
    echo "<br>";

    $sugarClientProxy = $sugarClient->getProxy();
    if (!$sugarClientProxy) {
    return $err;
    die();
    }

    echo $sugarClientProxy; // Sucessfully executed and proxy was set.
    echo "<br>";

    // login using the credentials above
    $result = $sugarClientProxy->login($config['login'], $config['application_name']); // Problem with this statement.

    $session_id = $result['id'];

    echo "Session Id: ".$session_id;
    ?>

    My process stops execution at
    " $result = $sugarClientProxy->login($config['login'], $config['application_name']); // Problem with this statement. "

    Thanks in advance and anybody please help me out in this.

  2. #2
    sugaruser007 is offline Junior Member
    Join Date
    Oct 2007
    Posts
    3

    Default Re: Sugar SOAP API - Problem with remote connection

    Also, i have gone through the access logs. it returns me the Http 406 Error

    Entry In Access Log : "POST /crm/soap.php HTTP/1.1" 406 350 "-" "NuSOAP/0.7.2 (15787)"
    Entry in Error Log : mod_security: Access denied with code 406. Pattern match "!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)" at HEADER("Content-Type") [severity "EMERGENCY"] [hostname "www.my-seugarcrm-url"]
    Last edited by sugaruser007; 2007-10-12 at 07:59 AM.

  3. #3
    sugaruser007 is offline Junior Member
    Join Date
    Oct 2007
    Posts
    3

    Default Re: Sugar SOAP API - Problem with remote connection

    The Issue was resolved. Problem is with "mod_security" module of apache.

    In Remote server "mod_security" was enabled and hence it didnot work for me. Once disabled it works.

    Thanks!!

  4. #4
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: Sugar SOAP API - Problem with remote connection

    Glad to hear you got your problem resolved!

    Please consider adding a quick section to the Wiki so that others can benefit from your good detective work. This page would be a good place to have your troubleshooting tip.
    Susie Williams

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HELP - Act import (field mapping)
    By smelamed in forum Help
    Replies: 32
    Last Post: 2010-12-15, 05:39 PM
  2. Big Security worries with Sugar!
    By mycrmspacegunnar in forum General Discussion
    Replies: 28
    Last Post: 2007-07-29, 05:27 AM
  3. Problem creating sales leads with SOAP
    By Ismay in forum Developer Help
    Replies: 0
    Last Post: 2007-06-25, 10:04 PM
  4. Sugar 401 install and remote MySQL database
    By cosjef in forum General Discussion
    Replies: 5
    Last Post: 2006-03-09, 08:52 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
  •