Friday, January 19, 2007

SOAP and SugarCRM issue resolved (kinda)

Well message on SugarCRM forums went nowhere (which is what I expected) SugarCRM open source seems to be more marketing speak than anything.

Anyways end result is that the PHP5 soap library doesn't seem to mesh well with the nusoap library that SugarCRM uses.

I expect its something along the lines of the issue I found in this blog:
http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesforce.com-and-PHP.html

I resolved the issue by just using the NuSoap library. It just didn't seem to be worth the effort to figure out the intracies of the soap internal messages. Kinda seems to defeat the purpose of using a standard right?

This is why I prefer a simpler message passing scheme like most REST apis are using.

Thursday, January 4, 2007

CRM Soap issue

Working on a project using SugarCRM and using PHP5's builtin SOAP libraries to import data. Unfortunately have run into the following problems.

When calling CRM's set_entry function. SugarCRM appears to parse this xml incorrectly. Below is the actual xml that gets sent and a var_dump of what SugarCRM actually receives. In the array 'item' ends up in the array when 'item' is really part of the xml syntax.

Going to post a message to their forums and see if I get a response. In the meantime I'll start digging around the code to see if I can see why it's happening.

Request string:
string(955) "
a657eb2a4aa0a324c0b88d2ae5a7d177Accountsnametest_nameemailtest_email
"




$valuelist in SoapSugarUser.php/set_entry() line 362(ish)
array(1) {
["item"] => array(2) {
[0] => array(2) {
["name"] => string(4) "name"
["value"] => string(9) "test_name"
}
[1] => array(2) {
["name"] => string(5) "email"
["value"] => string(10) "test_email"
}
}
}