I really don’t see the point of making EJB’s into web services. The first thing that comes to mind is security. How do I keep the entire world from using my business methods? How would you authenticate a user to use a service. The second it seems hard to pass objects or if it’s even possible to pass lists into a web service.
I can see some justifications such as having services for multiple applications that use the same methods. But why not just have a library or deploy an ear with all the business methods?
Thanks for your help.
How would you like to deploy your Java package to .NET client? Or better how would you like to deploy your Java package to 1.000.000 iPhones?
Web services are here because of interoperability. You will use them to pass data between processes without making the processes dependent on concrete technology. The communication will only be dependent on some interoperable and broadly supported protocols and data structures represented in XML or other interchangable format (like JSON).
If you need some advanced protocols for transaction flow, message level security or reliable messaging you will build SOAP service. If you need lightweight service for broad variety of clients you will build REST service.
Web services have its place and once you will have to build interoperable application or generally logic used by non Java code you will find them useful.