About Sign In and Authentication with Web Services

The Client side must use a web service method (for example signIn(StringuserName, String password) for authentication.

and then the client can call other services offered by server by means ofits session info.

Do you have an refrence , pattern or sample code for this problem?

I try to use ServiceLifeCycle interface and use its initialization Contextobject which is pass during calling the init method of Implemented Service.In this Context we can use getSession for retreiving the HttpSession Object.

Is It Ok? or you suggest using another method (like writing handlers or ...)