1

I have received a partner token from Salesforce which needs to be appended in SOAP header, I am using following code to authenticate a valid session, but I am not sure where I need to append partner token. Following is my code in Java.

ConnectorConfig config = new ConnectorConfig(); config.setAuthEndpoint("https://login.salesforce.com/services/Soap/c/24.0/"); config.setServiceEndpoint(salesforceUserCredentials.getServerURL()); config.setSessionId(salesforceUserCredentials.getSessionId()); connection = new EnterpriseConnection(config); logger.info("Connection Status: "+connection);

GetUserInfoResult userInfo = connection.getUserInfo();

1 Answer 1

1

The Partner Token is set in the CallOption.client field.

At a guess from your example code:

connection = new EnterpriseConnection(config);

connection.CallOptionsValue = new CallOptions();
connection.CallOptionsValue.client = "YourPartnerToken/";

logger.info("Connection Status: "+connection);
GetUserInfoResult userInfo = connection.getUserInfo();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .