You need to sign in to do that
Don't have an account?
Partner WSDL help
Warning: SoapClient::__construct() [function.--construct]: I/O warning : failed to load external entity "partner.wsdl.xml" in ....../salesforce/soapclient/SforceBaseClient.php on line 57
There was a problem with your login: SOAP-ERROR: Parsing WSDL: Couldn't load from 'partner.wsdl.xml'
Any ideas on what this error is saying. The other strange thing is I took the exact code I used for other web app and put it into this app. The other app works fine, no problems ever. The only thing different between the two web apps is there location under the root folder. I made the correct adjustments to the files so they point to where they need to, but I still get this error. It seems as if it can't find the wsdl file on my server. The strange thing about that is the page before this error is my log-in page, I don't get any errors on that page then the moment I get to this page I get this error.
Any ideas would be helpful.
Thank you,
Mike
Well that was my thought as well. But I think it is a session problem. I have this page set up like this:
I have the main page that has one frame on it, that frame contains my log-in page. So what I would like to see happen is to have them come to the main page, then click the button in the frame, then the frame goes through its thing and then comes back with the info. And here is where I think the problem is. When it comes back with the info it also displays the button to run the action again. Every time I close the i.e. and re-open it and go to that page it works great. But any time after that I get the error. Could it be that I get the error because I am trying to create two sessions with the same page?
I don't know, it is just a thought.
Any ideas would be great,
Thank you
Mike
A couple of thoughts
- You cannot store the salesforce.com client as a php session variable. You can store the the sessionId and session location as session variables. Then you can create a new salesforce.com client without having to send the login/password again.
- You may want to destroy the current session and restart if the user is logging in, but just use the sessionId and location if they exist.
Something like this
session_start()
if (isset($_SESSION['sessionId'] and isset['$_SESSION['location']) {
// Establish client to sfdc
$client = new SforcePartnerClient();
$client->createConnection($wsdl);
$client->sessionId = $_SESSION['sessionId'];
$client->setSessionHeader($client->sessionId);
$client->setEndpoint($_SESSION['location']);
}
else {
use the login function
}
A couple of thoughts
- You cannot store the salesforce.com client as a php session variable. You can store the the sessionId and session location as session variables. Then you can create a new salesforce.com client without having to send the login/password again.
- You may want to destroy the current session and restart if the user is logging in, but just use the sessionId and location if they exist.
Something like this
session_start()
if (isset($_SESSION['sessionId'] and isset['$_SESSION['location']) {
// Establish client to sfdc
$client = new SforcePartnerClient();
$client->createConnection($wsdl);
$client->sessionId = $_SESSION['sessionId'];
$client->setSessionHeader($client->sessionId);
$client->setEndpoint($_SESSION['location']);
}
else {
use the login function
}
Forgot to add, before you log in, destroy the current session and start a new one.
session_destroy();
session_start();
now login
Then reset $_SESSION['sessionId'] and $_SESSION['location']