public boolean getGenericPortMappingEntry(int index,
                                              final PortMappingEntry portMappingEntry)
            throws IOException, SAXException {
        Map<String, String> args = new HashMap<String, String>();
        args.put("NewPortMappingIndex", Integer.toString(index));

        Map<String, String> nameValue = simpleUPnPcommand(controlURL,
                serviceType, "GetGenericPortMappingEntry", args);

        if (nameValue.isEmpty() || nameValue.containsKey("errorCode"))
            return false;

        portMappingEntry.setRemoteHost(nameValue.get("NewRemoteHost"));
        portMappingEntry.setInternalClient(nameValue.get("NewInternalClient"));
        portMappingEntry.setProtocol(nameValue.get("NewProtocol"));
        portMappingEntry.setEnabled(nameValue.get("NewEnabled"));
        portMappingEntry.setPortMappingDescription(
                nameValue.get("NewPortMappingDescription"));

        try {
            portMappingEntry.setInternalPort(
                    Integer.parseInt(nameValue.get("NewInternalPort")));
        } catch (Exception e) {
        }

        try {
            portMappingEntry.setExternalPort(
                    Integer.parseInt(nameValue.get("NewExternalPort")));
        } catch (Exception e) {
        }

        return true;
    }