Hi,
Is not recommended edit directly xml files (is not only one xml file). You need to do using adminconsole or wsadmin.
How do you know that is not saving your master configuration? when you click finish, don't you have a message to save the configuration?
Have you adminconsole security enabled?
You need to solve first why is not saving your configuration, before test connection.
regards