wood burning stoves 2.0*
The moose likes Web Services and the fly likes Thread safety of Axis client classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Thread safety of Axis client classes" Watch "Thread safety of Axis client classes" New topic
Author

Thread safety of Axis client classes

M Streit
Greenhorn

Joined: Jan 16, 2004
Posts: 27
I have a web service deployed in WAS on one machine and I have used the WSDL file to generate Axis 1.1 client classes using the Axis WSDL2Java tool. I want to run a client app from another machine where the client will be a servlet running in Tomcat or possibly JRun. The generated code includes the usual *ServiceLocator and *ServiceBindingStub classes. If I wanted to instantiate these classes, say from inside a servlet (the client using the service) can these generated client classes be instantiated once in the init() of the servlet and used in a thread-safe manner?


Thanks in advance for any input.
[ August 20, 2005: Message edited by: M Streit ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

It depends on whether your Webservice classes are thread safe or not. For example in Axis it is possible to specify the scope of service object - Application , Session and Request.
http://ws.apache.org/axis/java/user-guide.html

For WAS , please read the docs.


Groovy
M Streit
Greenhorn

Joined: Jan 16, 2004
Posts: 27
WAS server is not the issue. The question is again, running Axis client stub classes from within a simple servlet that is part of the client application talking to a web service running somewhere else, possibly WAS. The server end is not in question. It is the CLIENT side of the equation that may be at issue.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread safety of Axis client classes
 
Similar Threads
can I create a web service that generates a .csv or .txt file ?
Axis Web Service Client : NullPointerException
my webservice supports Axis1.x but not Axis2.x ,so is it the compatibility issue?
my webservice supports Axis1.x but not Axis2.x ,so is it the compatibility issue?
Problem in creating the client stubs from WSDL with multiple interfaces using Axis 1.4