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
Jamz_2010Jamz_2010 

INVALID_SESSION_ID in Web Service Call

Hi all,

 

I am getting the error:

 

 

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 00DA0000000HWvb!ARkAQJ8YeEOP6HqR1R5qF8hTf9U6A8W09DLZgxFRKEnHiaHy1BbyY.GUSG0aHRr_F0SmCqPb_ySEG4wjJwHb2L1dVzFOR3aG

 

When I try to invoke my apex class externally, this seems to only happen for a new org that I have recently created (after the upgrade to Winter '10). I have checked and the code before to login and get the login session id and put it into the stub header:

 

 

sf.operations.login(sarrCredentials[0], sarrCredentials[1], sarrCredentials[2]);SessionHeader sh = new SessionHeader();sh.setSessionId(sf.operations.loginResult.getSessionId());stub.setHeader(new billAccountsServiceLocator().getServiceName().getNamespaceURI(), "SessionHeader", sh);stub.generateBills(); 

 

Does anyone know what I am doing wrong here?

 

Thanks

 

James 

 

Best Answer chosen by Admin (Salesforce Developers) 
Jamz_2010Jamz_2010

Hi all,

 

I have found the fix for this problem, the error message was quite misleading as the actual error was that the method it was looking for was in a package but in the org it existed out of the package. To fix this I regenerated the jar file from the new wsdl.

 

Hope this helps anyone else having the same problem.

 

James 

All Answers

Rick.BanisterRick.Banister
Is this consistent and immediate, or does it happen after a long time and somewhat unpredictably?
Jamz_2010Jamz_2010
It appears to be totally consistent. It happens every time I try to invoke the Web Service for this org - it doesn't happen for any other org though.
 James 
Jamz_2010Jamz_2010

Hi all,

 

I have found the fix for this problem, the error message was quite misleading as the actual error was that the method it was looking for was in a package but in the org it existed out of the package. To fix this I regenerated the jar file from the new wsdl.

 

Hope this helps anyone else having the same problem.

 

James 

This was selected as the best answer