You need to sign in to do that
Don't have an account?

SOAP webservice Login functionality
I wrote one SOAP webservice Class and I have created one connected app. I want to write login functionality in SOAP webservice.
I am using connected app for authentication.
I used below login code but it's showing Error: Compile Error: Invalid type: ConnectorConfig. error.
ConnectorConfig config = new ConnectorConfig();
config.setManualLogin(true);
EnterpriseConnection sforceConnection = Connector.newConnection(config);
sforceConnection.setLoginScopeHeader(ORGANIZATIONID, PORTALID);
LoginResult loginResult = sforceConnection.login(username, password);
config.setServiceEndpoint(loginResult.getServerUrl());
sforceConnection.setSessionHeader(loginResult.getSessionId());
I am using connected app for authentication.
I used below login code but it's showing Error: Compile Error: Invalid type: ConnectorConfig. error.
ConnectorConfig config = new ConnectorConfig();
config.setManualLogin(true);
EnterpriseConnection sforceConnection = Connector.newConnection(config);
sforceConnection.setLoginScopeHeader(ORGANIZATIONID, PORTALID);
LoginResult loginResult = sforceConnection.login(username, password);
config.setServiceEndpoint(loginResult.getServerUrl());
sforceConnection.setSessionHeader(loginResult.getSessionId());
ConnectorConfig config = new ConnectorConfig();
If it is a part of some other other class, maybe you will have to refer it as
<ClassName>.ConnectorConfig config = new <ClassName>.ConnectorConfig();
This info you can get from the WSDL that you have consumed, by referring the stub classes that got created.