How to expose EJB services as web-services?

View: New views
3 Messages — Rating Filter:   Alert me  

How to expose EJB services as web-services?

by Ravi Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Could someone elaborate on how best to use mule with web-services?

Basically, we have implemented several entity-centric service for storing business data. These services are implemented using EJB3 entity beans, persisted using JPA.
We would now like to expose these entity-centric services to be used by front-end applications and by more high-level task services.

What is the best way to do this?

Should we expose the EJB entities (POJOs) via a SLSB facade to Mule and let Mule map them to the canonical data format (XML) before exposing them as web-services or should we add a service layer to our entity services and expose them as web-services directly within the app server? And in that case, should we use Mule to proxy these services?

Thanks,
Stikkos

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: How to expose EJB services as web-services?

by Ravi Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stikkos or Stijn,

It is both possible. If you have a remote interface on your SLSB you can call it directly from Mule using the ejb:connector. On the other hand, it's off course also possible to use cxf or axis to call a webservice (or use a proxy). In my opinion it depends on what you are going to do with the response in mule. If you want to work with the java objects before returning it to the client, use the first method, otherwise I would say to use the latter and annotate your SLSB's with JAX-WS annotations. You can use mule as a proxy.


Have a look at
- WSProxyService (although it has some limitations you should be aware of)

Regards,
Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Parent Message unknown Re: How to expose EJB services as web-services?

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Really, it will depend on other non-functional requirements you might have. One argument in favor of an app server exposing the ws is you won't probably need the remote interface for your slsbs. Mule can then proxy your services and add icing on top.

HTH,
Andrew

On Jul 2, 2009 10:27 AM, "Stijn Janssens" <mule.user.relay@...> wrote:

Hi,

Could someone elaborate on how best to use mule with web-services?

Basically, we have implemented several entity-centric service for storing business data. These services are implemented using EJB3 entity beans, persisted using JPA.
We would now like to expose these entity-centric services to be used by front-end applications and by more high-level task services.

What is the best way to do this?

Should we expose the EJB entities (POJOs) via a SLSB facade to Mule and let Mule map them to the canonical data format (XML) before exposing them as web-services or should we add a service layer to our entity services and expose them as web-services directly within the app server? And in that case, should we use Mule to proxy these services?

Thanks,
Stikkos

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email