Look at the samples/quickstarts/publish_as_webservice example of how to publish ESB service as a web service.
Thanks for your help. I have 2 more questions here:
1) I don't see any code which publishes as web service in the sample. Where is this?
2) The service doesn't do any thing except sending one hard coded message as response, not even dynamic response. Am I missing something?
Next sample talks about publishing one way web service. Did it work fine?