File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread safety of Axis client classes

 
M Streit
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
M Streit
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic