title: Salesforce to magento integration
body: <pre><code>    //Create a new partner object
       $connection = new SforcePartnerClient();
  
       //Create the SOAP connection
       try {
            $connection-&gt;createConnection(salesforce_wsdl);
       } catch (Exception $e) {
            //Salesforce could be down, or you have an error in configuration
            //Check your WSDL path
            echo "Salesforce could be down";
       }
  
       //Pass login details to Salesforce
       try {
            $connection-&gt;login(salesforce_username, salesforce_password . salesforce_token);
       } catch (Exception $e) {
            //Make sure your username and password is correct
              echo "usename/password incorrect";
       }
  
       //Describing the Leads object and printing the array
       $describe = $connection-&gt;describeSObjects(array('Lead'));
       print_r($describe);
  
       //Create New Lead
       $leadFirstName = "John";
       $leadLastName = "Doe";
       $leadCompany = "abc";
       $leadEmail = "chetan@abc.com";
  
       //Creating the Lead Object
       $lead = new sObject();
       $lead-&gt;type = 'Lead';
       $lead-&gt;fields = array(
            'FirstName' =&gt; $leadFirstName,
            'LastName' =&gt; $leadLastName,
            'Company' =&gt; $leadCompany,
            'Email' =&gt; $leadEmail
       );
  
       //Submitting the Lead to Salesforce
       $result = $connection-&gt;create(array($lead), 'Lead');
  </code></pre>
  
  <p>This is my code... I am just trying to create a lead in salesforce using this code. This is a sample php toolkit code for salesforce. </p>
  
  <p>But when I am trying to run this code. It does not generate any lead in salesforce. 
  My login credentials are correct and security token is also correct.</p>
  
  <p>Where am I going wrong? I am using free developer account and following code for connection in partner.wsdl.xml: </p>
  
  <pre><code> &lt;!-- Soap Service Endpoint --&gt;
      &lt;service name="SforceService"&gt;
          &lt;documentation&gt;Sforce SOAP API&lt;/documentation&gt;
          &lt;port binding="tns:SoapBinding" name="Soap"&gt;
              &lt;soap:address location="https://login.salesforce.com/services/Soap/c/26.0"/&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  </code></pre>