WordPress to salesforce custom objects API

  • Unknown's avatar

    I am trying to integrate wordpress and salesforce . i have move wordpress data to salesforce custom objects. So i am using salesforce api for this purpose.I have written a plugin for it. On executing it i am getting a fatal error .
    Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘Force.com-Toolkit-for-PHP/soapclient/partner.wsdl.xml’ : failed to load external entity “Force.com-Toolkit-for-PHP/soapclient/partner.wsdl.xml” in C:xampphtdocswordpresswp-contentpluginssalesfrocepluginForce.com-Toolkit-for-PHPsoapclientSforcePartnerClient.php:83

    Below is my code :

    add_action(‘user_register’,’user_sf_lead’);

    function user_sf_lead(){

    define(“SOAP_CLIENT_BASEDIR”, “Force.com-Toolkit-for-PHP/soapclient”);
    require_once (SOAP_CLIENT_BASEDIR.’/SforcePartnerClient.php’);
    require_once (SOAP_CLIENT_BASEDIR.’/SforceHeaderOptions.php’);

    try{

    $mySforceConnection = new SforcePartnerClient();
    $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.’/partner.wsdl.xml’);
    $mylogin = $mySforceConnection->login(“Username”, “password.securitytoken”);
    $header = new AssignmentRuleHeader(’01Q300000005lDg’, false);
    $mySforceConnection->setAssignmentRuleHeader($header);
    $createFields = array (
    ‘FirstName’ => ‘John’,
    ‘LastName’ => ‘Doe’,
    ‘Email’ => ‘(email visible only to moderators and staff)’,
    ‘Company’ => ‘Some Company’,
    ‘LeadSource’ => ‘PHPUnit2’,
    ‘City’ => ‘Tokyo’,
    ‘Country’ => ‘Japan’
    );
    $sObject1 = new SObject();
    $sObject1->fields = $createFields;
    $sObject1->type = ‘Lead’;

    $createResponse = $mySforceConnection->create(array ($sObject1));
    //print_r($createResponse);

    } catch (Exception $e) {
    print_r($e);
    }
    }

    can any one help me with this. All i guess it unable to find Force.com-Toolkit-for-PHP/soapclient

  • Unknown's avatar

    Hello, it seems like you’re working the self-install version of WordPress. As this forum we’re in is only for WordPress.com-hosted sites and blogs, you might want to direct your question to WordPress.org’s forum instead: http://wordpress.org/forums/

  • The topic ‘WordPress to salesforce custom objects API’ is closed to new replies.