Fixed message parsing to accept different xml message forms. Agents now correctly connect and send messages to the server.