Results 1 to 5 of 5

Thread: lead form using SOAP with 'invalid entry point' issue

  1. #1
    aware is offline Member
    Join Date
    Dec 2006
    Posts
    5

    Question Lead Capture using SOAP tutorial from wiki w/ 'invalid entry point' issue.

    I have created a lead form using the example from the wiki

    http://www.sugarcrm.com/wiki/index.p...tical_Examples

    I have read on other threads about possibly needing $sugarEntry = true;
    I have also seen the thread about security changes post 4.2 I believe doing checks for $GLOBALS['sugarEntry']

    But I need some clarity on proper implementation of

    $sugarEntry = true; or $GLOBALS['sugarEntry'] = true;

    The example doesn't go this far indepth with anything involving sugarEntry.

    Any help is greatly appreciated.

    I added the top 2 lines based on various threads I have found in the forums. But neither of them seem to help.

    HTML Code:
    <?php
    
    $sugarEntry = true;
    $GLOBALS['sugarEntry'] = true;
    
    require_once('include/nusoap/nusoap.php');
    
    $soapclient = new soapclient('http://www.mysugarinstall.com/sugar/soap.php?wsdl',true);
    
    $user_auth = array(
    			'user_auth' => array(
    				  'user_name' => 'my user name',
    				  'password' => md5('my user name's password'),
    				  'version' => '0.1'
    				  ),
    			'application_name' => 'soapleadcapture');
    
    $result_array = $soapclient->call('login',$user_auth);
    $session_id =  $result_array['id'];
    $user_guid = $soapclient->call('get_user_id',$session_id);
    
    $set_entry_params = array(
    				   'session' => $session_id,
    				   'module_name' => 'Leads',
    				   'name_value_list'=>array(
    					   array('name'=>'first_name','value'=>$_POST['first_name']),
    					   array('name'=>'last_name','value'=>$_POST['last_name']),
    					   array('name'=>'status', 'value'=>'New'),
    					   array('name'=>'phone_work', 'value'=>$_POST['phone']),
    					   array('name'=>'account_name','value'=>$_POST['company_name']),
    					   array('name'=>'lead_source','value'=>'Web Site'),
    					   array('name'=>'description','value'=>$_POST['rfp_comments']),
    					   array('name'=>'assigned_user_id', 'value'=>$user_guid))
    					   );
    
    $result = $soapclient->call('set_entry',$set_entry_params);
    
    header("Location:  " . $_POST['redirect']);
    
    ?>
    Last edited by aware; 2006-12-03 at 03:12 PM. Reason: More indepth title and info

  2. #2
    aware is offline Member
    Join Date
    Dec 2006
    Posts
    5

    Default SOAP lead tutorial with 'invalid entry point' issue

    Still need some help on this. I have the sugarEntry set but it appears to still be a no go.

  3. #3
    rturnbull is offline Junior Member
    Join Date
    Aug 2006
    Posts
    3

    Default Re: lead form using SOAP with 'invalid entry point' issue

    Have you gotten any help with this. It appears that I'm in the same boat as you. Lots of examples, none work, no help from SUGAR.

    Typical.

  4. #4
    aware is offline Member
    Join Date
    Dec 2006
    Posts
    5

    Default Re: lead form using SOAP with 'invalid entry point' issue

    Actually I haven't gotten any help yet though I think I am close to a solution.

    There were a few errors in the example code. but I have made some updates in the wiki

    you will see define('sugarEntry', TRUE); has been added

    and

    "new soapclient" has been changed to "new nusoapclient"

    Those 2 changes have fixed the error but I don't seem to be getting any leads in just yet from my test form.

    PHP Code:
     <?php
     define
    ('sugarEntry'TRUE); // <---- New 
     //Use the NuSOAP files
     
    require_once('nusoap/nusoap.php');
     
     
    $soapclient = new nusoapclient('http://www.example.com/sugar/soap.php?wsdl',true); // <--- New
    http://www.sugarcrm.com/wiki/index.p...tical_Examples

  5. #5
    dbiswas is offline Junior Member
    Join Date
    Jun 2008
    Posts
    2

    Default Re: lead form using SOAP with 'invalid entry point' issue

    I have a very wired problem. When I try to run the soap examples at my site (where I have installed SugarCRM 5), it re-directs to login page. That is so wiered. Can any one help, what's going on ??

    Thanks,

    DBiswas

    Here is the site exapmle : http://ebiswas.com/SugarCRM/examples/SoapTest.php

Thread Information

Users Browsing this Thread

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

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
  •