You need to sign in to do that
Don't have an account?
INVALID_LOGIN with partner wsdl
when I run the following code:
$mySforceConnection = new SforceEnterpriseClient(); $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml'); $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
I can log in just fine. However, when I try to use the partner wsdl:
$mySforceConnection = new SforcePartnerClient(); $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml'); $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
I receive the following response " INVALID_LOGIN: Invalid username, password, security token; or user locked out."
I am correctly including the SforcePartnerClient.php or SforceEnterpriseClient.php depending on which method I'm trying to use.
Does anyone have an idea as to why I'd be able to log in fine with the enterprise wsdl but not with the partner wsdl? I'm definitely stumped.
Thanks!
ini_set("soap.wsdl_cache_enabled", "0");
All Answers
They are both pointing to test.salesforce......, so both are pointing to the sandbox.
Thanks for the reply.
I have figured out that I can log in using the partner wsdl when I give my live username and password. Inisde the partner client, I see the section:
<!-- Soap Service Endpoint --> <service name="SforceService"> <documentation>Sforce SOAP API</documentation> <port binding="tns:SoapBinding" name="Soap"> <soap:address location="https://test.salesforce.com/services/Soap/u/18.0"/> </port> </service>
Which shows it pointing to test. I have even downloaded a fresh version of the phptoolkit, installed it on a different server, downloaded both the enterprise and partner wsdl's from my org and replaced the standard ones and I have the same issue. It allows me to log into the sandbox using enterprise wsdl, but not the partner.
I hope that I'm just missing something trivial here.
ini_set("soap.wsdl_cache_enabled", "0");
thanks bro this helped!
I solved a similar issue with this instruction. I would hardly figure out by myself. Thanks a lot!