An alternative approach could be to develop a small web service at your server which interacts with openfire about new account creation. The web service could call internally some openfire plugin like rest api or user service plugin. So your app can call this web service in order to create a new account.
(maybe not a perfect solution but I am sure that its far better than the one you mentioned)