+ Start a Discussion
satyaprakash palsatyaprakash pal 

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();
EnterpriseConnection sforceConnection = Connector.newConnection(config);
sforceConnection.setLoginScopeHeader(ORGANIZATIONID, PORTALID);
LoginResult loginResult = sforceConnection.login(username, password);

Lars NielsenLars Nielsen
Would you mind pasting or attaching the entire class in there. It will be much quicker to debug. Also, if you can attach the WSDL that would be helpful...Thx
What I think is that ConnectorConfig is not a stand alone class.
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.