I can login to our main salesforce (salesforce.com) system with the Soap api w/o any issues. We have a Sandbox site (test.salesforce.com) and I have working credentials for this site as well. In need to test my code against the test ste before deploying to the main site.
The Soap login always fails with an invalid login when I use the test site credentials.
I am assuming that soap login is hitting salesforce.com instead of test.salesforce.com.. I so not see an obvious way to change this behavior.
There is the LoginScopeHeader ... It has an organizationId (which I have) and a portalId (which I have not located). I have tried this with the organizationId to no avail.
login(nothing, mainsiteusername, mainsitepassword) = This works! login(nothing, textsiteusername, testsitepassword) = fails login(scopeheader, textsiteusername, testsitepassword) = fails *note scopeheader only populated with organizationId.