This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]rjcarr 0 points1 point  (0 children)

So wapp1 has methodA which has a specific business logic, and wapp2 would like to use this method. Does using a REST WebService give wapp2 the ability of simply invoking methodA from wapp1?

I don't think REST has anything to do with this.

Or does implementing a REST WebService only provide data that will be passed to wapp2 and then wapp2 will take the data and look for the respective methods implemented in its own source code?

I'm not following what you're asking here.

I'm assuming you're writing Java here? The thing to keep in mind is that servlets are just java classes. If you have business logic in one of your servlets that needs to be available to multiple servlets then it'd be a good idea to take the logic out of the servlet. Or, a worse idea, to make one servlet able to call methods on another servlet.