Thursday, November 13, 2008

Web Service Support in JBossESB

I made an assertion that JBossESB 4.4 did not come with an out-of-the-box SOAP listener. As a result, a user has two options to get a SOAP over HTTP message onto the ESB:
  1. Process the message on the ESB through an HTTP listener. The draw back is that is that the payload of the ESB message will be the SOAP envelope instead of domain objects. And the listener will not be able to support WS-* since it does not process SOAP headers.

  2. Process the SOAP message with a web service hosted in JBossWS. This “ESB-aware” web service then pushes an ESB message to the ESB message through the service invoker interface, as shown in diagram below. The advantage of this approach is that QoS policies, including WS-*, can be enforced by the web service. The disadvantage is that the user will not take advantage of the ESB’s support for transport protocol bindings.


I was immediately challenged because some marketing material had said that JBossWS is now part of the ESB. First, that is not what the JBoss download page says:

The jbossesb-server binary distribution is a pre-configured profile based on the JBoss Microkernel architecture. The ESB Server comes pre-installed with JBoss messaging, JBoss Webservices, all of the base ESB capabilities and is the best choice for those who want to get started quickly.

The jbossesb binary distribution is a standalone distribution of JBoss ESB. The distribution comes with installation scripts allowing it to be installed into a full JEE
application server, if required.
Aside from the marketing, however, I think what got people confused is the fact that JBossWS hosted web service can be exposed as an ESB endpoint through the SOAPProcessor action. (Oh, the web service can even be deployed with the ESB achieve…..So great! :)

But what gets exposed by SOAPProcessor is really an ESB endpoint, not a web service endpoint, as pointed by JBossESB Programmer’s Guide:
The SOAPProcessor action allows you to expose JBossWS 2.x and higher Webservice Endpoints through endpoints (listeners) running on the ESB (“SOAP onto the bus”). This allows you to use JBossESB to expose Webservice Endpoints (wrapper Webservices) for services that don't expose a Webservice Interface. JBossWS Webservice Endpoints exposed via this JBossESB action are “ESB Message Aware” and can be used to invoke Webservice Endpoints over any transport channel supported by the ESB.
To be precise, in this approach, JBossWS acts as a service container for some POJO programmed to the conventions of JAX-WS. Because the web service endpoint is not exposed by the ESB through SOAPProcessor action, you will still need to use one of the two alternatives outlined above, as suggested in the diagram below.

No comments: