Yes it is possible with BlackBerry WebWorks 2.1.
A new command, create-headless, has been introduced to the CLI of the BlackBerry 10 WebWorks SDK. This command allows you to create a WebWorks app with a headless service.
You have just to follow this tutorial :
https://developer.blackberry.com/html5/documentation/v2_1/creating_a_ww_app_with_headless_app.html