So, i did that on my testing server. It had xmpp.domain - wroot. All my users had name@wroot JIDs. I have stopped the server, edited the /openfire/conf/openfire.xml (make sure you do this with admin rights if doing this on Windows 7+, run Notepad with Run as admin and then open this file, edit and save). You need to change setup tag at the bottom to false. Then run Openfire and go to Admin Console. It will show the setup again. On the second page, i have put wroot2 into domain field. On the admin password page repeat your admin password 3 times. Once the setup is completed, stop the server again. Edit openfire.xml again and put admin@newdomain (admin@wroot2 in my case) into tag (uncomment this tag). Run the server, go to Admin Console, login with admin. Go to System properties, make sure that xmpp.domain is now newdomain. Login with users, make sure their JIDs are now name@newdomain. If you use shared groups, just go to Users, click on some user, the Roster menu and see how users are listed for shared groups. Mine are all user@wroot2.
That will change the domain and users on the server. Your server’s (machine) name or hostname will stay the same. So if your user login using its hostname as a servername in Spark or other client, they should be able to login. Though maybe it is better to change the hostname as well and change the servername on login window in the client for every user to use the new hostname.