EJB3.0 newbie and hoping someone may be able to help.
Currently looking at creating a new service that has a requirement to have both Restful and SOAP WS interfaces available. I'm wondering if this is possible in EJB3.0 or does anyone have a better solution ?
Also, if using this can I deploy in Jetty (can I embed it ?) or would JBoss be more suitable ?
Creating WS from an EJB is quite easy and all you need is add few annotations. The point is that the EJB container must support JAX-WS and, as far as I remember, this specification implementation (JAX-WS) is required only in Java EE 6 Full Profile. The Web Profile is not enough and I think that Jetty is not even a Web Profile server but just a servlet container.
You've got following options:
- use a full profile Java EE server like Glassfish,
- use a web profile Java EE server like JBoss (which, I think!, adds the JAX-WS implementation to their server),
- use plain servlet container like your Jetty and add an OpenEJB container (which supports JAX-WS).
Hope that helps!
posted 5 years ago
Thanks for the reply.
If I use an application server such as JBoss can the EJB3.0 annotations be used to specify both Restful services and SOAP services. I'm looking to have alot of simple service checks that would be restful and some complex transactional services that I read would be more suited to SOAP. Would this be correct ?
You have to be odd to be #1 - Seuss. An odd little ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user