@Webservice doesn’t work in J2EE 2.4 (J2EE 4)

I’ve been working on Glassfish for a while and all we did for webservices was to use a @Webservice annotation. I was working on a different webapp and I noticed using @Webservice didn’t work any more. It wasn’t generating any webservices during deployment. After spending some time on this, I realized that this application was using <web-app version=”2.4″ in web.xml. As a result, GF wasn’t generating any webservices. Changing it to 2.5 did the trick.