Hi All,

I have a bit of a newbie question in relation to web services:

Do SOAP-based web services support the concept of state and persistence? That is, can I easily create a web service where state is preserved between invocations?

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?

I imagine that I could achieve this with web services by using an external persistence component, eg an EJB, or a JDBC call to a database. What I want to know is whether I can preserve state internally (inside a web service component) by simply declaring an instance variable appopriately (e.g. "static" - though this might not be the right approach).

On the other hand, is my only "stateful web service" option to use an external persistence layer (JDBC or EJB?)

Thanks.

David Peterson



Reply via email to