Discussions

XML & Web services: Stateful Web Service?

  1. Stateful Web Service? (2 messages)

    This is probably a naive question, but it's an important one. I'm trying to take an existing app and turn it into a web service. The application has a GUI and needs to maintain state between invocations. I know that stateful EJB's can maintain state, but I don't want to turn this into an EJB - web services should handle the remote aspects of this. I also need to display a GUI persistently between invocations, and I haven't succeded in gettting the GUI to even appear from within the implementation service. What I'm preparing to do is have a thin web service make a socket call on the back end to the actual application. This would solve my problem (assuming there's no constraint on socket communications by Axis); but I lose the advantage of standardized wsdls if I do this, and add another remote link. I'm unclear on how to proceed. Any thoughts on this would be much appreciated.

    Threaded Messages (2)

  2. Stateful Web Service[ Go to top ]

    Try AJAX ..
  3. Re: Stateful Web Service[ Go to top ]

    Hi, What you can try is that from your java client (assuming you have a standalone client) you can set the stub property jaxrpcStub._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE); Also on server side you can try using this Implement a serviceLifeCycle Interface..in the init method you can initialize the ServletEndpointContext. This object provides you a handle to the servlet session... Now you can just use this to do your work and make the WS stateful Hope this helps Rgds Shashank