I am reading this book Beginning Java™ EE 6 Platform with GlassFish™ 3: From Novice to Professional and I have a question to the image below. I thought I have read somewhere the services such as Web Services are only provided in the EJB Container but from the image below (that shows the services provided by each container: quote book) it seems like the Web Container does provided that service too. Is that correct or have I misinterpreted the image and the image text? And if that is correct then it means that I can package my application as a WAR and deploy it to a Web Container and still use Web Services API?

Someone corrects me if I’m wrong, but historically it’s a bit other way around: it is a EJB service that is able now to be annotated as a
@WebService.So yes, both web and ejb containers can provide web services. And yes, your web service can be packaged in a single war.