I need to use a shared context to hold the application session across various web service invocations. I found WS-CTX (http://docs.oasis-open.org/ws-caf/ws-context/v1.0/wsctx.html
) supports that. But I am not sure of how to implement it.
Can anyone help with me the details? (with sample code plz :))
Does Axis supports WS-CTX?
If possible, you should avoid being dependent on a shared context in your web service conversation. Without context your web services are easier to scale.
You could make your services more coarse-grained, and do your work in one invocation. Or, you could (re)send all the data related to former web service invocations with later ones, so you can build up whatever you want to put in the context again.
I think WS-Context was designed for different web services to cooperate together in a process/choreography, and it sounds like overkill for most situations...
Thanks for your suggestion.
But my situation is like this. We have to expose fine grained web services and on top of that coarse grained web services will be developed by Clients or Partners as per their customized use cases.
We thought to provide a Global login / logout web services and maintain the application session created in global login across various web service invocation. Hence the need to use WS-CTX.
Then, You need a Single Sign On Technology for Web Services, like SAML 2.0.
WS-Context is for maintain the context about a process' instance between WS's, and not just for single login.
You may also try look at directories about content development some of them are listed;
the other directories;
Yes, you should redesign you Services.
The Client of your services would be who keep up the session's information about the user. Then, the client invokes the service with all information which it needs in order to do the task, I mean, all information needed for recover the state, make some logic processing and store the state.