Hi,
I am running a webapp in Tomcat 5.0 with Axis 1.4
My web app loads on startup.
When I make a SOAP call to the webapp (which is a servlet) it takes a new instance of the servlet instead of the original servlet that is already running.

The wsdd file is deployed using the Axis AdminClient.

Is this a setup problem, or is that the way that Axis Soap works?

I am happy to post the relevant code but I'm ot sure which part of the code is the problem...

Thanks in advance.

Are you sure it's calling the servlet constructor?
That would be really weird.

Remember that your SOAP service classes are NOT servlets (or at least not used as such by the SOAP processes) and are indeed most likely initialised one for each request.
Nothing weird about that (though a SOAP stack I guess might decide to cache them for performance reasons, at the cost of increased complexity and memory requirements).

Hey jwenting,
Thanks for the reply.

So just to clarify.

I have a servlet webapp that initialises variables that are constantly updated. I want to update these variables directly through remote SOAP requests.

Is it possible to access an existing method of servlet that is already running without calling a new instance of the program?
hence updating the variable...

OR

Is the only way to update these variables to pass a soap request to the server which would instantiate a new class and then I could update the variables as session variables and access these from the servlet?


Any reply would be helpfull as I need to persue either one way or the other.

Thanks.

Are you sure it's calling the servlet constructor?
That would be really weird.

Remember that your SOAP service classes are NOT servlets (or at least not used as such by the SOAP processes) and are indeed most likely initialised one for each request.
Nothing weird about that (though a SOAP stack I guess might decide to cache them for performance reasons, at the cost of increased complexity and memory requirements).

You should never have a servlet maintain state outside of a specific HTTP session!
It's highly dangerous, unreliable, and unpredictable.
And what you're trying to do is having sessions in one web application (the SOAP stack) directly influence another web application, which is barred (and rightly so) for security reasons by every well designed application server.

You'll have to find some other way for them to communicate. Most likely that will have to be a database of some sorts.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.