permaculture playing cards*
The moose likes Web Services and the fly likes Writing web services with AXIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Writing web services with AXIS" Watch "Writing web services with AXIS" New topic
Author

Writing web services with AXIS

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
In order to write a web service for AXIS , you code a Java class and deploy it into AXIS (which is in turn deployed in a web container).
My question is :
Is this class ready for concurrent access (like Servlets) ? What about 10 or even 100 requests trying to access this service ?
In J2EE 1.4 we can code web services using two approaches , EJB and Servlets , what about AXIS ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
Axis is implemented as a servlet, which largely determines its runtime concurrency characteristics. I think it instantiates the WS class for each call, so as long as you don't use static fields in a thread-unsafe way, the code should be fine.

I'm not sure what you mean by the last sentence of your question - can you elaborate?


Ping & DNS - my free Android networking tools app
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
I'm moving this question to the Web Services forum, where the Axis experts hang out. Find it there to continue the discussion!
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

My last sentence means , in order to code a web service in J2EE , we can code it as an EJB or a Servlet (a special Servlet called Endpoint, as far as I remember).
So in AXIS we just code a simple plain class (not extending any special AXIS class or interface) and it is ready for real-world job ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
That's correct. You simply declare certain public methods to be WS-accessible in the deployment descriptor, and Axis does the rest.
 
Consider Paul's rocket mass heater.
 
subject: Writing web services with AXIS