• Keerthana S 3
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 1
    Replies
If any call is made on partner connection, the control does not come back from the call. For an example, please refer below code. Call to api using partner connection is highlighted in yellow which does not give control back after keep it running 20 mins (or more). The line highlighted in RED is not executed. 
import com.sforce.soap.partner.DescribeSObjectResult;
import com.sforce.soap.partner.Field;
import com.sforce.soap.partner.PartnerConnection;
import com.sforce.soap.partner.QueryResult;
import com.sforce.soap.partner.sobject.SObject;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;
 
public class TestApp {
    public static void main( String[] args ) throws Exception {
   
           ConnectorConfig config = new ConnectorConfig();
           config.setUsername("bigdatasupport@centrica.com.test1");
           config.setPassword("welcome1QN4MUrZwAWZ6qEk5OpX13TEUG");
          config.setAuthEndpoint("https://test.salesforce.com/services/Soap/u/33.0");
           config.setTraceMessage(true);
           config.setPrettyPrintXml(true);
           PartnerConnection partnerConnection = new PartnerConnection(config);
          
           System.out.println("Partner Connection : " + partnerConnection);
          
           DescribeSObjectResult info = partnerConnection.describeSObject("Account");
           Field[] fields = info.getFields();
           System.out.println("Fields : " + fields);
           String query = SalesforceUtils.generateSOQL(fields, "Account");
           //querySample(partnerConnection, "Account", "");
           System.out.println("run Ended======>>>>");
    }
}


Any one who faced similar problem. Please help.

we are using salesforce eclipse to execute the code.
If any call is made on partner connection, the control does not come back from the call. For an example, please refer below code. Call to api using partner connection is highlighted in yellow which does not give control back after keep it running 20 mins (or more). The line highlighted in RED is not executed. 
import com.sforce.soap.partner.DescribeSObjectResult;
import com.sforce.soap.partner.Field;
import com.sforce.soap.partner.PartnerConnection;
import com.sforce.soap.partner.QueryResult;
import com.sforce.soap.partner.sobject.SObject;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;
 
public class TestApp {
    public static void main( String[] args ) throws Exception {
   
           ConnectorConfig config = new ConnectorConfig();
           config.setUsername("bigdatasupport@centrica.com.test1");
           config.setPassword("welcome1QN4MUrZwAWZ6qEk5OpX13TEUG");
          config.setAuthEndpoint("https://test.salesforce.com/services/Soap/u/33.0");
           config.setTraceMessage(true);
           config.setPrettyPrintXml(true);
           PartnerConnection partnerConnection = new PartnerConnection(config);
          
           System.out.println("Partner Connection : " + partnerConnection);
          
           DescribeSObjectResult info = partnerConnection.describeSObject("Account");
           Field[] fields = info.getFields();
           System.out.println("Fields : " + fields);
           String query = SalesforceUtils.generateSOQL(fields, "Account");
           //querySample(partnerConnection, "Account", "");
           System.out.println("run Ended======>>>>");
    }
}


Any one who faced similar problem. Please help.

we are using salesforce eclipse to execute the code.