I have received a comment for my previous post - Web Services and Oracle TopLink, about if to try similar sample on Oracle JDeveloper 11g Technical Preview release. Yes, it is interesting, just because you can compare and evaluate new powerful features that will bring JDeveloper 11g Production release. I have tested Web Services development support in 11g using developed sample application - WSTopLink11.zip, this sample implements annotation only Web Service. I have used the same business logic as for previous one.
For persistence layer I'm using JPA entity with two Named Queries - Countries.findAll and Countries.findByName. When creating EJB Session Bean, Web Service Endpoint Interface is declared in the same way as in JDeveloper 10.1.3:
Generated interface for EJB Session Bean contains @WebService annotation, that in fact allows to use EJB Session Bean as Web Service directly:
Developed application structure in Application navigator window:
Oracle JDeveloper 11g provides embedded tool, that allows to test developed Web Service without deploying it to the server - just right click on EJB Session Bean and select - Test Web Service:
HTTP Analyzer window will be opened, where you can choose available operations to test, provide values for parameters and browse through generated result. Four views are provided - SOAP structure, HTTP Content, Hex Content and Raw Message. In our case, queryCountriesFindAll() generates similar result:
And, for queryCountriesByName(parameter) only result that is correct for specified parameter is shown: