*
The moose likes Web Services and the fly likes How do I set the scope with axis and TomCat7? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How do I set the scope with axis and TomCat7?" Watch "How do I set the scope with axis and TomCat7?" New topic
Author

How do I set the scope with axis and TomCat7?

Charlie Meyers
Greenhorn

Joined: Aug 08, 2011
Posts: 2
Hello,

I use a tomcat7 server and created a war-file by using eclipse and axis. the problem is my classes lose their values after a client request. So I have to set the scope to session I've read. But everthing I tried failed. I added scope tags or attributes in the files deploy.wsdd and server-config.wsdd in the TomCat HOME > webapps > MyProject > ... folders . This didn't help. Does anybody know how to solve this problem ???

Thank you.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Exactly what does
my classes lose their values after a client request.

mean?

Can you verify that a request is being accepted by the service and a SOAP formatted response returned?

Bill
Charlie Meyers
Greenhorn

Joined: Aug 08, 2011
Posts: 2
That means that no value, set by a method from a former request, can be saved in a class variable. The value is lost after a request. The webservice works correctly for one request but I need to establish a session to save the values from a former one. Therefore you have to set a parameter in a configuration file but I don't know where exactly. everything I've found until now didn't work.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
That means that no value, set by a method from a former request, can be saved in a class variable


Exactly!

You have to provide some form of storage between requests. For web applications people use sessions because the client browser handles the cookie that identifies the session.

Web services dealing with non-browser clients need to create a data preserving method - popular choices include a database.

Bill

 
 
subject: How do I set the scope with axis and TomCat7?