Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Single vs Mutiple Web Services  RSS feed

 
Saravanan Muthiah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am in the process of creating a Webservice for my application which needs to provide two operations/functions to handle different request.
I am having two options in my mind.
1)First one is creating a single webservice with 2 operations/functions like below
Ex: TestService
a)AddNum
b)Mutilply
2)second one is creating a web service for each operations/functions like below
Ex:AddNumService
MutilplyService

I am not sure which is one the right option.

Please share your thoughts on this.

Saravanan




 
Anurag Verma
Ranch Hand
Posts: 168
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The base behind this decision should be exactly same as the base of writing classes. Similar operations in one service. In the example you mentioned, you can have one MathService or CalculationService & put related operations into it. but if there is something else ..lets take login/logout for example, then there should be another service for login/logout.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!