Stateful web service
Hello, How can I write a simple stateful web service service and how can I call this in a standalone Java application ? Is there any simple example? Best regards, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateful web service
Two common ways are with soap sessions or rolling your own via something like ehcache and java.util.UUID. Both have their advantages and disadvantages. The latter comes with axis2 but AFAIK doesn't have recovery after server shutdown, though something like sandesha might. The former also has a lot of rules to be aware of. The latter requires some coding yourself but its pretty simple. It also is independent of axis2 . The latter has the disadvantage that there are few docs showing how to do it, but again its just a cache and passing and returning a token on login and then passing it back in. The former (may have something more current around) : http://www.developer.com/java/web/article.php/3620661 The latter - in português from me and needs a better example - just ignore if not interested. Search on SWA Session State. http://www.braziloutsource.com/wss2.html HTH, Robert On 2/9/07, Eric Chow [EMAIL PROTECTED] wrote: Hello, How can I write a simple stateful web service service and how can I call this in a standalone Java application ? Is there any simple example? Best regards, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] how to create an admin module for stateful web service
Hi all, I have to set up a web application to monitor a stateful web service. I guess the result should be like the axis2 admin module. Is there any way to do this? If yes, how can I do it? Any advice would be appreciated, Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stateful web service
please create a JIRA. Thanks Shaowei Mao wrote: Engaging addressing module fixed the problem. I also need to extract service group id and set it in soap header for all requests in the same session. It would be nice to have a option in wsdl2java to generate these codes. Thanks -Original Message- From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] Sent: Sunday, July 30, 2006 10:38 PM To: axis-user@ws.apache.org Subject: Re: stateful web service did you engage addressing module ? if yes serviceGroupId is inside the was:ReplyTo header. Shaowei Mao wrote: Hi, I implemented a web service by generating stub and skeleton from wsdl. Now I want to turn them into stateful. I have been looking through mailing list and found that I need to set service scope to soapsession and store state in the service group context. I did set the service scope to soapsession in the services.xml, but service didn't return service group id to the client and each time I invoked service, axis2 created a new instance for service implementation class. What else do I need to change in order to make it work? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] website: www.amindsolutions.com -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: stateful web service
Engaging addressing module fixed the problem. I also need to extract service group id and set it in soap header for all requests in the same session. It would be nice to have a option in wsdl2java to generate these codes. Thanks -Original Message- From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] Sent: Sunday, July 30, 2006 10:38 PM To: axis-user@ws.apache.org Subject: Re: stateful web service did you engage addressing module ? if yes serviceGroupId is inside the was:ReplyTo header. Shaowei Mao wrote: Hi, I implemented a web service by generating stub and skeleton from wsdl. Now I want to turn them into stateful. I have been looking through mailing list and found that I need to set service scope to soapsession and store state in the service group context. I did set the service scope to soapsession in the services.xml, but service didn't return service group id to the client and each time I invoked service, axis2 created a new instance for service implementation class. What else do I need to change in order to make it work? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] website: www.amindsolutions.com -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stateful web service
In the client call you need to set MaintainSession true. Excuse the brief reply but I'm BAAF. Shaowei Mao wrote: Hi, I implemented a web service by generating stub and skeleton from wsdl. Now I want to turn them into stateful. I have been looking through mailing list and found that I need to set service scope to soapsession and store state in the service group context. I did set the service scope to soapsession in the services.xml, but service didn't return service group id to the client and each time I invoked service, axis2 created a new instance for service implementation class. What else do I need to change in order to make it work? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stateful web service
did you engage addressing module ? if yes serviceGroupId is inside the was:ReplyTo header. Shaowei Mao wrote: Hi, I implemented a web service by generating stub and skeleton from wsdl. Now I want to turn them into stateful. I have been looking through mailing list and found that I need to set service scope to soapsession and store state in the service group context. I did set the service scope to soapsession in the services.xml, but service didn’t return service group id to the client and each time I invoked service, axis2 created a new instance for service implementation class. What else do I need to change in order to make it work? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] website: www.amindsolutions.com -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
stateful web service
Hi, I implemented a web service by generating stub and skeleton from wsdl. Now I want to turn them into stateful. I have been looking through mailing list and found that I need to set service scope to soapsession and store state in the service group context. I did set the service scope to soapsession in the services.xml, but service didnt return service group id to the client and each time I invoked service, axis2 created a new instance for service implementation class. What else do I need to change in order to make it work? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com
Re: Stateful Web Service
This is how i have done it.. Some of the people over in this forum suggested the same.. Make your servlet webservice endpoint interface implement javax.xml.rpc.server.ServiceLifecycle interface Than you need to define init() and destroy() methods. Using ServletEndpointContext you can retrieve HTTPSession and thats what you need to maintain state. Implement your backend logic in stateless EJBs given below is a small snippet from my servlet endpoint Cheers javax.xml.rpc.server.ServletEndpointContext servletContext; /** * */ public void init(Object context) {servletContext = (javax.xml.rpc.server.ServletEndpointContext) context;} /** * */public void destroy() {servletContext = null;} On 3/21/06, Jyotishman Pathak [EMAIL PROTECTED] wrote: The WSRF specs provide a standard way of implementing/interacting with stateful Web services. I recommend having a look at: http://ws.apache.org/wsrf/- Jyoti On 3/20/06, Nayana Hegde [EMAIL PROTECTED] wrote: Hi, Is it possible to implement a stateful web service using Axis? If yes please do let me know the details. Thanks and Regards, Nayana -- Jyotishman PathakWWW: http://www.cs.iastate.edu/~jpathak
Re: Stateful Web Service
Hi Prashanth, Can you let me know as to how to retreive the HTTPSession from ServletEndpointContext ? Thanks and Regards, Nayana On 3/21/06, prashanth shivakumar [EMAIL PROTECTED] wrote: This is how i have done it.. Some of the people over in this forum suggested the same.. Make your servlet webservice endpoint interface implement javax.xml.rpc.server.ServiceLifecycle interface Than you need to define init() and destroy() methods. Using ServletEndpointContext you can retrieve HTTPSession and thats what you need to maintain state. Implement your backend logic in stateless EJBs given below is a small snippet from my servlet endpoint Cheers javax.xml.rpc.server.ServletEndpointContext servletContext; /** * */ public void init(Object context) {servletContext = (javax.xml.rpc.server.ServletEndpointContext) context;} /** * */public void destroy() {servletContext = null;} On 3/21/06, Jyotishman Pathak [EMAIL PROTECTED] wrote: The WSRF specs provide a standard way of implementing/interacting with stateful Web services. I recommend having a look at: http://ws.apache.org/wsrf/- Jyoti On 3/20/06, Nayana Hegde [EMAIL PROTECTED] wrote: Hi, Is it possible to implement a stateful web service using Axis? If yes please do let me know the details. Thanks and Regards, Nayana -- Jyotishman PathakWWW: http://www.cs.iastate.edu/~jpathak
Re: Stateful Web Service
Use its getHTTPSession() method. You might want to learn to use APIs' javadocs. Just google for ServletEndpointContext, the Javadoc is its first find. Nayana Hegde wrote: Hi Prashanth, Can you let me know as to how to retreive the HTTPSession from ServletEndpointContext ? Thanks and Regards, Nayana On 3/21/06, prashanth shivakumar [EMAIL PROTECTED] wrote: This is how i have done it.. Some of the people over in this forum suggested the same.. Make your servlet webservice endpoint interface implement javax.xml.rpc.server.ServiceLifecycle interface Than you need to define init() and destroy() methods. Using ServletEndpointContext you can retrieve HTTPSession and thats what you need to maintain state. Implement your backend logic in stateless EJBs given below is a small snippet from my servlet endpoint Cheers javax.xml.rpc.server.ServletEndpointContext servletContext; /** * */ public void init(Object context) { servletContext = (javax.xml.rpc.server.ServletEndpointContext) context; } /** * */ public void destroy() { servletContext = null; } On 3/21/06, Jyotishman Pathak [EMAIL PROTECTED] wrote: The WSRF specs provide a standard way of implementing/interacting with stateful Web services. I recommend having a look at: http://ws.apache.org/wsrf/ - Jyoti On 3/20/06, Nayana Hegde [EMAIL PROTECTED] wrote: Hi, Is it possible to implement a stateful web service using Axis? If yes please do let me know the details.
Re: Stateful Web Service
Hi, I actually got it. I had notadded the servlet jar file into the project in eclipse and therefore was not getting the getHttpSession Method. Anyways thanks for the reply. Thanks and Regards, Nayana On 3/21/06, Dies Koper [EMAIL PROTECTED] wrote: Use its getHTTPSession() method.You might want to learn to use APIs' javadocs. Just google forServletEndpointContext, the Javadoc is its first find. Nayana Hegde wrote: Hi Prashanth, Can you let me know as to how to retreive the HTTPSession from ServletEndpointContext ? Thanks and Regards, Nayana On 3/21/06, prashanth shivakumar [EMAIL PROTECTED] wrote: This is how i have done it.. Some of the people over in this forum suggested the same.. Make your servlet webserviceendpoint interface implement javax.xml.rpc.server.ServiceLifecycle interface Than you need to define init() and destroy() methods. Using ServletEndpointContext you can retrieve HTTPSession and thats what you need to maintain state. Implement your backend logic in stateless EJBs given below is a small snippet from my servlet endpoint Cheers javax.xml.rpc.server.ServletEndpointContext servletContext;/** * */public void init(Object context) { servletContext = (javax.xml.rpc.server.ServletEndpointContext) context;}/** * */public void destroy() { servletContext = null; } On 3/21/06, Jyotishman Pathak [EMAIL PROTECTED] wrote: The WSRF specs provide a standard way of implementing/interacting with stateful Web services. I recommend having a look at: http://ws.apache.org/wsrf/ - Jyoti On 3/20/06, Nayana Hegde [EMAIL PROTECTED] wrote: Hi, Is it possible to implement a stateful web service using Axis? If yes please do let me know the details.
Re: Stateful Web Service
The WSRF specs provide a standard way of implementing/interacting with stateful Web services. I recommend having a look at: http://ws.apache.org/wsrf/- Jyoti On 3/20/06, Nayana Hegde [EMAIL PROTECTED] wrote: Hi, Is it possible to implement a stateful web service using Axis? If yes please do let me know the details. Thanks and Regards, Nayana -- Jyotishman PathakWWW: http://www.cs.iastate.edu/~jpathak