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:
0 comments:
Post a Comment