Also, there is nothing in the WSDL telling the client that the state is maintained in the server side. The fact that "session scope" is configured is purely an implementation detail. Therefore, I think the "YES" answer is not as simple as Barry describe.
Rgds, Ricky
At 07:02 AM 1/16/2003 +1100, David Peterson wrote:
Thanks Barry, This was the kind of "statefulness" and "persistence" that I am interested in (though I was also interested to hear what was said re SOAP and sessions by Anne et al., as this was another question I had).Can you tell me, why does the client need to set "maintain sessions" to TRUE (Axis) (or use the cookie container in .NET). I would have thought that for the example (bank account) that you and I describe, preservation of state would be an entirely server-side consideration, with no client-side requirements other than a valid SOAP invocation? Regards David Barry Levinson wrote: >Maybe I'm missing something, but it seems this is really a simple >question with a simple answer. > >Here's the original question : > >For example, can I create a "bank account" web service, which supports >deposit(), withdrawl() and getBalance() operations, and have that web >service preserve the current account balance between separate >invocations? > >The answer is yes. > >You can use axis to do this by simply setting session scope in your >deploy.wsdd. > >Session scope means that class instances are persistant. If you simply >have a private "int ballance" member (*not* static) of you bankAccount >class, it will retain its value across multiple calls. The client needs >to "cooperate" by passing some session info, this is done simply by >adding a cookie container (.net client) or setting maintain session to >true (axis client). > >--Barry > >Anne Thomas Manes wrote: > > > > > >