Even if the DSB already extends the Petals ESB, you can use it and extend it to add some specific features. Extending means that you may want to add some custom core services to the Service Bus. For example, add a transport layer, use your own registry implementation, expose a service as Web service, ...
Exposing Core Services as Web Services
The DSB provide a simple way to expose core services as Web services without any extra configuration. The only things that is needed are :
- Add JAX-WS annotations to core services
- Adding the core service to the right fractal composite
- There is no 3
Adding Core Services
If you want to add your own services, the best way to follow is to create your own 'kernel' which is extending the DSB kernel. Since we are using the Fractal component model in Petals ESB/DSB, you must also use it for your service.
To illustrate this chapter, let's add a simple and powerful service : The HelloWorld Service!
![]() | The source code for this illustration is available under the DSB samples folder in SVN at https://svn.petalslink.com/svnroot/trunk/research/commons/dsb/samples |
Create a new kernel
Use the dsb-kernel as dependency in your new project POM:
TODO
Create the interface
Let's create a new project for the API definition :