File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB3.0 + web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB3.0 + web services" Watch "EJB3.0 + web services" New topic
Author

EJB3.0 + web services

J Guinit
Greenhorn

Joined: Jun 13, 2011
Posts: 2
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 ?

thanks
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

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!

Cheers!


OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
J Guinit
Greenhorn

Joined: Jun 13, 2011
Posts: 2
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 ?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EJB3.0 + web services
 
Similar Threads
Beginning EJB3.0
Books for SCBCD
Certification Guide for SCBCD 5.0?
EJB2.0 or EJB3.0?
are entity beans EJB3?