function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ZatorZator 

Using SOAPUI to login it Salesforce

I am attempting to use SoapUI to login to my company's salesforce environments.  I am getting an INVALID_LOGIN error.

I can use SoapUI to log into my developer playground, so I think I am forming the SOAP envelope correctly.  I have a separate WSDL document for each environment, and I am using the appropriate username, password and security token in each call.  But still, I get the INVALID_LOGIN.

I can use the username, password, and security token to login successfully to a company salesforce instance through Data Loader, so I believe those are correct.  The only difference I can see there is that Data Loader doesn't use WSDL, and logs directly in to the url provided.  I dont think my WSDL document is bad.  The users I am using have Enable API checked.

Is there a setting somewhere in the company instances that would not allow an API login using a SOAP WSDL?

My thanks in advance for any guidance.

ZatorZator
Additional info: the company instances I am trying to log into are sandboxes, and use test.salesforce.com from the generated WSDL.  The generated WSDL for my developer playground specifies login.salesforce.com.  Is there a different way to set up the SOAP envelope for use with sandboxes?  All of the examples online I am seeing are accessing developer playgrounds.
jigarshahjigarshah
@Zator - Salesforce Production or Dev Edition environments are always accessed through https://login.salesforce.com whereas the sandboxes are accessed through https://test.salesforce.com. This could be a potential reason for you not being able to log in. Have you opened up the SOAP WSDL file and checked the endpoint being used there. If not please do so.

In case, you see the login.saalesforce.com url being used, you could replace it with test.salesforce.com using any regular text editor. Once done, reimport the WSDL file where it is being consumed.

Moreover, you can navigate to Setup > Manage Users > Login History within your Salesforce sandbox instance and try to identify the error associated with your login attempt. This should atleast point you in the right direction in identifying the root cause.

Hope this helps.

Don't forget to mark your thread as SOLVED with the answer that best helps you.