I am crating new player for tizen but ones register display but database
displayTypeId = 8 not updating db null only posting
this is my register.js file code
function registerDisplay() {
const cmsUrl = document.getElementById(“cmsUrl”).value.trim();
const serverKey = document.getElementById(“serverKey”).value.trim();
const displayName = document.getElementById(“displayName”).value.trim();
const hardwareKey = “tizen-” + Math.random().toString(36).substring(2, 10);
const osJson = JSON.stringify({
model: “SmartTV”,
version: “7.0”,
manufacturer: “Samsung”,
brand: “Samsung”
});
const soapXml =
<?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <RegisterDisplay xmlns="urn:xmds"> <serverKey>${serverKey}</serverKey> <hardwareKey>${hardwareKey}</hardwareKey> <displayName>${displayName}</displayName> <clientType>sssp</clientType> <clientVersion>4.0</clientVersion> <clientCode>0</clientCode> <operatingSystem>${osJson}</operatingSystem> <macAddress>00:11:22:33:44:55</macAddress> <xmrChannel>tizen-xmr</xmrChannel> <xmrPubKey></xmrPubKey> <licenceResult>trial</licenceResult> </RegisterDisplay> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
;
const xhr = new XMLHttpRequest();
const url = cmsUrl.replace(//$/, “”) + “/xmds.php?v=5”;
xhr.open(“POST”, url, true);
xhr.setRequestHeader(“Content-Type”, “text/xml; charset=utf-8”);
xhr.setRequestHeader(“SOAPAction”, “urn:xmds#RegisterDisplay”);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
const response = xhr.responseText;
const statusElement = document.getElementById(“status”);
if (response.includes('status="1"') && response.includes('code="ADDED"')) {
statusElement.innerText = "✅ Display registered! Awaiting CMS approval.\n\n" + response;
} else if (response.includes('status="0"') && response.includes('code="READY"')) {
statusElement.innerText = "✅ Display already approved and ready.\n\n" + response;
} else {
statusElement.innerText = "❌ Registration failed or unknown response.\n\n" + response;
}
}
};
xhr.onerror = function () {
document.getElementById(“status”).innerText = “ Network or connection error.”;
};
xhr.send(soapXml);
}