• statho
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies
Hi all,

My API needs to be able de realize some actions, and needs to to them as faster as possible.

My question concerns the WSDL file. Can I cut some parts of the file to recover only the datas I need (In my case, the simple creation of task/event, update)? Will the process be accelerated ?

thanks :)
  • April 18, 2006
  • Like
  • 0
Hello all,
 
 
I've posted a message as a RE to another thread but I haven't got any answers. I've moved to NuSOAP library, PEAR::SOAP is two heavy for what i intend to do with.
So I wanted to create a new event linked with a lead.

error : INVALID_TYPE_ON_FIELD_IN_RECORD


--------------------------code-----------------------------
$event = new SObject ('Event', null , array('ActivityDate' => '21/03/2006',
                                                'IsAllDayEvent' => true,
                                                'IsRecurrence' => false,
                                                'OwnerId' => $id,
                                                'Type' => 'Call',
                                                'WhoId' => $WhoId,
                                                'ShowAs' => 'Busy' ) ) ;

    $createEventRes = $sfdc->create($event);

---------------------------/code---------------------------

I tried : gmdate(), date() in a lot of different format.

Thanks
  • April 16, 2006
  • Like
  • 0
Hi all,
I'm starting in Sforce API development and i faced my first problem.
I just scripted a simple connection code to start, using PEAR:SOAP library and a Sforce toolkitt

----------------------------code : exemple_pear.php-------------------------------
include_once('../SalesforceClient.php');

$login="X";                         
$mdp="Y";

$myConnection = new SalesforceClient();
$mySoapClient = $myConnection->SOAP_Client("partner.wsdl.xml",true);
$myLogin = $myConnection->login($login, $mdp);


if (PEAR::isError($myLogin))
{
    $errors = $myLogin->getMessage()."\n";
    print( "Problème lors de la connection ! Détails : $errors\n" );
}
else
{
    print ('Connecté') ;
}   
-----------------------------------------code--------------------------------------------------------

Error received ;

Warning: Invalid argument supplied for foreach() in /var/www/sdb/9/7/shinj/php-client-54/Client.php on line 512
Problème lors de la connection ! errors=Error:


--------------------------------------code : Client.php#line 512 ----------------------------------
             [...]

            // Get operation data.
            $opData = $this->_wsdl->getOperationData($this->_portName, $method);

            if (PEAR::isError($opData)) {
                $fault =& $this->_raiseSoapFault($opData);
                return $fault;
            }
            $namespace = $opData['namespace'];
            $this->__options['style'] = $opData['style'];
            $this->__options['use'] = $opData['input']['use'];
            $this->__options['soapaction'] = $opData['soapAction'];

            // Set input parameters.
            if ($this->__options['input'] == 'parse') {
                $this->__options['parameters'] = $opData['parameters'];
                $nparams = array();
                if (isset($opData['input']['parts']) &&
                    count($opData['input']['parts'])) {
                    $i = 0;
                    foreach ($opData['input']['parts'] as $name => $part) {    //line 512
                        $xmlns = '';
                        $attrs = array();
                        // [...]
----------------------------------------/code---------------------------------------------------------------------

if i ask a print_r ($opData) it shows :

Array ( [soapAction] => [style] => document
            [input] => Array ( [parts] => Aarameters
                                        [use] => literal
                                        [message] => loginRequest
                                        [namespace] => tns )
            [output] => Array ( [use] => literal
                                          [message] => loginResponse
                                          [namespace] => tns
                                          [parts] => Array ( [result] => Array ( [name] => result
                                                                                                    [type] => LoginResult
                                                                                                    [namespace] => tns ) ) )
            [fault] => Array ( [name] => UnexpectedErrorFault
                                       [use] => literal )
            [parameters] => 1
            [namespace] => urn:partner.soap.sforce.com ) ;


Is someone has an idea ....

thanks

Message Edited by statho on 04-12-2006 07:04 AM

  • April 12, 2006
  • Like
  • 0
Hello,

adamg wrote : "We are definately targeting PHP5 as our platform of choice, so I'd recommend you switch if possible."

But it's very difficult  for me to take a decision because  the php5 installation would imply a lot of  constraints.
I'm developing an API for a company who is providing a site web generation Software and all his customers are using php4, so it will be difficult to change.

- Is there any toolkit i can use for php4 ?
- Can I continue to use Php4 in the future, or will it be unusable with the next Appexchange developments. (the most important question)


thanks for the answers.
(I'm french, sorry for my faults :))

Message Edited by statho on 04-10-2006 02:55 AM

  • April 10, 2006
  • Like
  • 0
Hi all,

My API needs to be able de realize some actions, and needs to to them as faster as possible.

My question concerns the WSDL file. Can I cut some parts of the file to recover only the datas I need (In my case, the simple creation of task/event, update)? Will the process be accelerated ?

thanks :)
  • April 18, 2006
  • Like
  • 0
Hello all,
 
 
I've posted a message as a RE to another thread but I haven't got any answers. I've moved to NuSOAP library, PEAR::SOAP is two heavy for what i intend to do with.
So I wanted to create a new event linked with a lead.

error : INVALID_TYPE_ON_FIELD_IN_RECORD


--------------------------code-----------------------------
$event = new SObject ('Event', null , array('ActivityDate' => '21/03/2006',
                                                'IsAllDayEvent' => true,
                                                'IsRecurrence' => false,
                                                'OwnerId' => $id,
                                                'Type' => 'Call',
                                                'WhoId' => $WhoId,
                                                'ShowAs' => 'Busy' ) ) ;

    $createEventRes = $sfdc->create($event);

---------------------------/code---------------------------

I tried : gmdate(), date() in a lot of different format.

Thanks
  • April 16, 2006
  • Like
  • 0
Hi all,
I'm starting in Sforce API development and i faced my first problem.
I just scripted a simple connection code to start, using PEAR:SOAP library and a Sforce toolkitt

----------------------------code : exemple_pear.php-------------------------------
include_once('../SalesforceClient.php');

$login="X";                         
$mdp="Y";

$myConnection = new SalesforceClient();
$mySoapClient = $myConnection->SOAP_Client("partner.wsdl.xml",true);
$myLogin = $myConnection->login($login, $mdp);


if (PEAR::isError($myLogin))
{
    $errors = $myLogin->getMessage()."\n";
    print( "Problème lors de la connection ! Détails : $errors\n" );
}
else
{
    print ('Connecté') ;
}   
-----------------------------------------code--------------------------------------------------------

Error received ;

Warning: Invalid argument supplied for foreach() in /var/www/sdb/9/7/shinj/php-client-54/Client.php on line 512
Problème lors de la connection ! errors=Error:


--------------------------------------code : Client.php#line 512 ----------------------------------
             [...]

            // Get operation data.
            $opData = $this->_wsdl->getOperationData($this->_portName, $method);

            if (PEAR::isError($opData)) {
                $fault =& $this->_raiseSoapFault($opData);
                return $fault;
            }
            $namespace = $opData['namespace'];
            $this->__options['style'] = $opData['style'];
            $this->__options['use'] = $opData['input']['use'];
            $this->__options['soapaction'] = $opData['soapAction'];

            // Set input parameters.
            if ($this->__options['input'] == 'parse') {
                $this->__options['parameters'] = $opData['parameters'];
                $nparams = array();
                if (isset($opData['input']['parts']) &&
                    count($opData['input']['parts'])) {
                    $i = 0;
                    foreach ($opData['input']['parts'] as $name => $part) {    //line 512
                        $xmlns = '';
                        $attrs = array();
                        // [...]
----------------------------------------/code---------------------------------------------------------------------

if i ask a print_r ($opData) it shows :

Array ( [soapAction] => [style] => document
            [input] => Array ( [parts] => Aarameters
                                        [use] => literal
                                        [message] => loginRequest
                                        [namespace] => tns )
            [output] => Array ( [use] => literal
                                          [message] => loginResponse
                                          [namespace] => tns
                                          [parts] => Array ( [result] => Array ( [name] => result
                                                                                                    [type] => LoginResult
                                                                                                    [namespace] => tns ) ) )
            [fault] => Array ( [name] => UnexpectedErrorFault
                                       [use] => literal )
            [parameters] => 1
            [namespace] => urn:partner.soap.sforce.com ) ;


Is someone has an idea ....

thanks

Message Edited by statho on 04-12-2006 07:04 AM

  • April 12, 2006
  • Like
  • 0
Hello,

adamg wrote : "We are definately targeting PHP5 as our platform of choice, so I'd recommend you switch if possible."

But it's very difficult  for me to take a decision because  the php5 installation would imply a lot of  constraints.
I'm developing an API for a company who is providing a site web generation Software and all his customers are using php4, so it will be difficult to change.

- Is there any toolkit i can use for php4 ?
- Can I continue to use Php4 in the future, or will it be unusable with the next Appexchange developments. (the most important question)


thanks for the answers.
(I'm french, sorry for my faults :))

Message Edited by statho on 04-10-2006 02:55 AM

  • April 10, 2006
  • Like
  • 0
I am having trouble creating a contact object that includes a Birthdate. Whenever I add the Brithdate field it does not insert the entry into SalesForce. I assume that it has something to do with the way that I am defining the current date. Below is the code:

$birthdate = date('m/d/Y');
....
'Birthdate' => $birthdate,
....

Any help would be appreciated.
  • December 14, 2005
  • Like
  • 0