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
waylonatcimwaylonatcim 

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!

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
waylonatcimwaylonatcim

ini_set("soap.wsdl_cache_enabled", "0");

 

Solved the issue

All Answers

SuperfellSuperfell
did you perhaps get one from sandbox and one from prod, check that both wsdls have the same host name in the service URL at the bottom.
waylonatcimwaylonatcim

They are both pointing to test.salesforce......, so both are pointing to the sandbox. 

 

 

Thanks for the reply.

waylonatcimwaylonatcim

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.

 

 

waylonatcimwaylonatcim

ini_set("soap.wsdl_cache_enabled", "0");

 

Solved the issue
This was selected as the best answer
Umer NaseerUmer Naseer

thanks bro this helped!

SerchSerch

I solved a similar issue with this instruction. I would hardly figure out by myself. Thanks a lot!