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

INVALID_SESSION_ID: ....Illegal Session

I have a java/Axix 1.4 program that calls a Apex class with a webservice method. 


I was getting this error:


INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key:


My program closely follows the Java/Axis 1.4 example provided by SalesForce.  the Basic steps I followed were:

1) Using IDE, created class with a WebService method.

2) Exported WSDL on Salesforce.

3) Wrote java program, generated stubs and built program following example.


My problem was caused by the mistake I made in step 1.  By default, the class is created with apiVersion set to 16.0.  It seems, it needs to be 17.0 for everything to work.



1) changed apiVersion to 17.0 for the class.

2) export wsdl

3) regen stubs and rebuild client application.



Note, that as I write this, we are currently on the Winter 10 release.  I believe SF is providing a new IDE with the Spring 10 release.  Hopefully, it picks the correct apiVersion by default.


Hope this helps anyone else who encounters this same problem.