private List<Add> appendAddConfiguration(Operation operation) throws WindowsOperationException { List<Add> addList = new ArrayList<Add>(); Gson gson = new Gson(); if (SyncmlCommandType.WIFI.getValue().equals(operation.getCode())) { Add add = new Add(); String operationCode = operation.getCode(); Wifi wifiObject = gson.fromJson((String) operation.getPayLoad(), Wifi.class); String data = "<?xml version="1.0"?><WLANProfile" + "xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"><name>" + wifiObject.getNetworkName() + "</name><SSIDConfig><SSID><name>" + wifiObject.getSsid() + "</name></SSID></SSIDConfig><connectionType>" + wifiObject.getConnectionType() + "</connectionType><connectionMode>" + wifiObject.getConnectionMode() + "</connectionMode><MSM><security><" + "authEncryption><authentication>" + wifiObject.getAuthentication() + "</authentication><encryption>" + wifiObject.getEncryption() + "</encryption></authEncryption><sharedKey><keyType>" + wifiObject.getKeyType() + "</keyType><protected>" + wifiObject.getProtection() + "</protected><keyMaterial>" + wifiObject.getKeyMaterial() + "</keyMaterial></sharedKey></security></MSM></WLANProfile>"; Meta meta = new Meta(); meta.setFormat("chr"); List<Item> items = new ArrayList<Item>(); for (Configure configure : Configure.values()) { if (operationCode != null && operationCode.equals(configure.name())) { Target target = new Target(); target.setLocURI(configure.getCode()); items.get(0).setTarget(target); } } items.get(0).setMeta(meta); items.get(0).setData(data); add.setCommandId(301); add.setItems(items); addList.add(add); return addList; } return null; }