+ Start a Discussion
Sfdc wonderSfdc wonder 

Invalid Session ID found in SessionHeader

we have developed one salesforce app which is syncing to our web application(used to PHP technology),for that we have to create some soap web service apex classes.
when we are calling to this custom webservices from php we got the following error

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 00Do0000000KoV6!AQUAQCtee76J4OeKpviDwrwQZ9ZI2QeWeTx9aogt4gVCX65h6i1pDArJt9C0x8V.7fjKto.wXSHbPi0W6uWGvkA9Ms7JJdj4
This is expected, it can happen if the session has expired and swept away, or if the user logs out, or if its just someone trying to hack in.

Earlier it's working fine.but now its the above error

can any one help us....

Best Answer chosen by Sfdc wonder
James LoghryJames Loghry
When invoking an Apex soap web service or calling the soap api via the partner / enterprise wsdls, you need to perform at least two requests.  The first is a login request, which returns the session id back in the response.  The second request is your webservice call.  

Depending on how your php integration is architected, you'll need to issue the login call more frequently, preventing your sessions from expiring, and ensuring you have the correct session id.

Additionally, double check that the php integration is pointing to the correct domain.  Occasionally your salesforce org will switch domains, particularly if it was a sandbox and the sandbox was refreshed.  For instance, your integration may be pointing to cs6.salesforce.com, but after a sandbox refresh, that may change to cs16.salesforce.com.