{
if (msgQosData.isErased()) {
String eraseKey = msgQosData.getClientProperty("__eraseKey", updateKey.toXml());
QueryKeyData key = glob.getQueryKeyFactory().readObject(eraseKey);
String eraseQos = msgQosData.getClientProperty("__eraseQos", "<qos/>");
EraseQosServer qos = new EraseQosServer(glob, eraseQos);
String[] ret = erase(sessionInfo, key, qos, true);
if (ret != null && ret.length > 0)
return ret[0];
else
return "<qos/>";
}
else {
PublishQosServer qos = new PublishQosServer(glob, msgQosData);
// Since xmlBlaster 1.6: We need to serialize and replace the original Global with ServerScope
MsgUnit msgUnit = new MsgUnit(glob, updateKey.getData().toXml(), content, qos.getData().toXml());
//MsgUnit msgUnit = new MsgUnit(updateKey.getData(), content, qos.getData());
return publish(sessionInfo, msgUnit, true);
}
}