Also, i want to ask whether it works with web services or just for session beans?
SessionContext is specific to beans. From the Javadoc:
The SessionContext interface provides access to the runtime session context that the container provides for a session enterprise Bean instance. The container passes the SessionContext interface to an instance after the instance has been created. The session context remains associated with the instance for the lifetime of the instance.