sure it can be done this way. Not sure which esb you are thinking of and what kind of services you'd like to integrate. If it is JBoss ESB, you could ask in the jbossesb forum
I'm trying to integrate BPEL as a service in the Petals ESB, which is JBI compliant.
I really dont know how and where to start because I had never developped any ESB component before...
Any help or advice would be much appreciated !