public Element handle(FreeColServer server, Player player,
                          Connection connection) {
        ServerPlayer serverPlayer = server.getPlayer(connection);

        Unit unit;
        try {
            unit = player.getFreeColGameObject(unitId, Unit.class);
        } catch (Exception e) {
            return DOMMessage.clientError(e.getMessage());
        }

        Unit carrier;
        try {
            carrier = player.getFreeColGameObject(carrierId, Unit.class);
        } catch (Exception e) {
            return DOMMessage.clientError(e.getMessage());
        }

        Location sourceLocation = unit.getLocation();
        if (directionString == null) {
            // Locations must be the same, or the source is also a
            // carrier in the same location as the carrier, or they
            // must be on the same tile.
            if (!carrier.isAtLocation(sourceLocation)) {
                return DOMMessage.clientError("Unit " + unitId
                    + " at " + ((FreeColGameObject) sourceLocation)
                    + " and carrier " + carrierId
                    + " at " + ((FreeColGameObject) carrier.getLocation())
                    + " are not co-located.");
            }
        } else {
            // Units have to be on the map and have moves left if a
            // move is involved.
            if (unit.getMovesLeft() <= 0) {
                return DOMMessage.clientError("Unit has no moves left: "
                    + unitId);
            }

            Tile destinationTile = null;
            try {
                destinationTile = unit.getNeighbourTile(directionString);
            } catch (Exception e) {
                return DOMMessage.clientError(e.getMessage());
            }
            if (carrier.getTile() != destinationTile) {
                return DOMMessage.clientError("Carrier: " + carrierId
                    + " is not at destination tile: "
                    + destinationTile.toString());
            }
        }

        // Proceed to embark
        return server.getInGameController()
            .embarkUnit(serverPlayer, unit, carrier);
    }