/**
* This method receives an Object (MLP as String) and forwards it to the CIS CIS Core
*
* @param msg the MLP String
* @throws InvalidObjectException when the String is not valid MLP
*/
public void notify(Object msg, Map<DEParameters, String> deParameters, boolean dontEnvelope) throws InvalidObjectException {
log.info("--> notify");
String msgStr = null;
if (msg instanceof String) {
msgStr = (String)msg;
if (msgStr.startsWith("<?xml version")) {
int idx = msgStr.indexOf("<svc_");
if (idx != -1) {
msgStr = msgStr.substring(idx);
}
}
} else {
throw new InvalidObjectException("Given Object is no valid MLP Message!");
}
try {
CISXMLContent xmlCont = new CISXMLContent();
xmlCont.setEmbeddedXMLContent(msgStr);
restSender.notify(CoreConstants.MSGTYPE_MLP, xmlCont, null, false);
} catch (CISCommunicationException | CISInvalidXMLObject e) {
log.error("notify: " + e);
}
log.info("notify -->");
}
MLPConnectorCoreExt.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:CommonInformationSpace
作者:
评论列表
文章目录