Results 1 to 4 of 4

Thread: SugarCRM, SOAP and ampersand (&)

  1. #1
    jme
    jme is offline Junior Member
    Join Date
    May 2009
    Posts
    3

    Default SugarCRM, SOAP and ampersand (&)

    Hello.

    We have developed a Drupal-based system that allows the user to update SugarCRM account details over SOAP.

    The current problem is that ampersand (6) characters seems to be stripped. When we set a company's name to "Foo & bar" it is saved but when reviewing the account in SugarCRM the value is now "Foo Bar", I have tried using & but to no help (& becomes amp; ).

    Am I missunderstaning something or am I just plain stupid?

    Thanks,

    jme
    Last edited by jme; 2009-05-13 at 10:45 AM.

  2. #2
    detour is offline Member
    Join Date
    Apr 2009
    Posts
    10

    Default Re: SugarCRM, SOAP and ampersand (&)

    I have a SOAP syncronization script playing nicely with ampersand. I'm using the PHP5 SoapClient interface and had to do some finageling to get it to work properly. My initialization starts something like this:
    Code:
    		$soapClient = new SoapClient(null, array(        
    	        'location' => 'http://localhost/sugarcrm_path/soap.php',
    		    'uri' => 'http://www.sugarcrm.com/sugarcrm',
    	    	'soap_version'   => SOAP_1_1, //SOAP_1_2 - 1.2 not supported by sugar nusoap
    		    'trace' => 1,
    		    'exceptions' => 0,
    	    	//'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5
    		));
    Also, I had to wrap all my input params with utf8_encode() and trim() like this:
    Code:
    $parameters = array(
    			array(
    				'name' => 'name', 
    				'value' => utf8_encode(trim($name))
                            ),
    // more params here....
    );
    Be sure to see:
    http://www.beanizer.org/site/index.p...cations-I.html
    http://www.lornajane.net/posts/2008/...P-API-Examples
    for useful examples. GL

  3. #3
    jme
    jme is offline Junior Member
    Join Date
    May 2009
    Posts
    3

    Default Re: SugarCRM, SOAP and ampersand (&)

    Thanks. I'll try the utf8_encode() tomorrow.

  4. #4
    jme
    jme is offline Junior Member
    Join Date
    May 2009
    Posts
    3

    Default Re: SugarCRM, SOAP and ampersand (&)

    No change. I first thought the utf8_encode() might do the trick but no. I also tried to use soap_version and SOAP_1_1 but no. Would you by chance have another posible solution?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. soap - Sugarcrm <--> Joomla
    By mamboklaus in forum Deutsche
    Replies: 1
    Last Post: 2009-05-06, 03:44 PM
  2. SugarCRM behind firewall, SOAP through DMZ
    By thierry.beeckmans in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2009-02-12, 12:07 PM
  3. SugarCRM SOAP Web Services
    By ahmay85 in forum Help
    Replies: 2
    Last Post: 2009-01-15, 05:14 AM
  4. & (Ampersand) causes XML problems
    By mmunem in forum Help
    Replies: 4
    Last Post: 2007-09-10, 04:49 PM
  5. SOAP to SugarCRM using PEAR SOAP?
    By ryaker in forum General Discussion
    Replies: 0
    Last Post: 2005-04-12, 07:23 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
  •