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
slaneslane 

Log into different servers via API

Hello all:

 

I've been using the PHP toolkit to do some API work. My question is, how do I control the instance of salesforce to which my code tries to log in? If I create a SOAPClient from my Enterprise WSDL, everything works fine -- it logs me into my development org. But how do I connect to my customer's org without grabbing their WDSL as well? I assume this can be done because apps like the Eclipse IDE happily connect to multiple orgs via the API without needing all the WSDLs (or so it seems).

 

Can anyone point me in the right direction?

Park Walker (TAGL)Park Walker (TAGL)

It's the user name that you log in with that controls the instance that you will connect to. The WSDL file provides the endpoint that you connect to and, in the case of an Enterprise WSDL, the schema of that instance. You'll want to either switch to using the Partner WSDL (and API library) or be sure to grab and use the appropriate Enterprise WSDL for each client instance that you are connecting to.

 

Park