표준메세지 적용.(윤준영차장 반영본)
This commit is contained in:
@@ -36,6 +36,10 @@ import com.eactive.eai.message.StandardMessage;
|
||||
import com.eactive.eai.message.manager.StandardMessageManager;
|
||||
import com.eactive.eai.message.parser.StandardReader;
|
||||
import com.ext.eai.common.stdmessage.STDMessageKeys;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class SocketProcess extends DefaultProcess {
|
||||
static final long serialVersionUID = 1L;
|
||||
@@ -426,6 +430,8 @@ public class SocketProcess extends DefaultProcess {
|
||||
}
|
||||
|
||||
if (com.eactive.eai.adapter.Keys.IF_STANDARD.equals(this.adptrMsgPtrnCd)) {
|
||||
String restOption = this.reqEaiMsg.getCurrentSvcMsg().getRestOption();
|
||||
setStandardRouteInfo(restOption);
|
||||
AdapterManager adapterManager = AdapterManager.getInstance();
|
||||
AdapterGroupVO adptGrpVO = adapterManager.getAdapterGroupVO(adapterGroupName);
|
||||
AdapterVO adptVO = null;
|
||||
@@ -680,6 +686,25 @@ public class SocketProcess extends DefaultProcess {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void setStandardRouteInfo(String routeOption) throws JsonProcessingException {
|
||||
if(StringUtils.isBlank(routeOption)) {
|
||||
return ;
|
||||
}
|
||||
JsonNode rootNode = new ObjectMapper().readTree(routeOption);
|
||||
JsonNode standardCommonFields = rootNode.get("standardCommonFields");
|
||||
|
||||
if (standardCommonFields != null && standardCommonFields.isObject()) {
|
||||
standardCommonFields.fields().forEachRemaining(field -> {
|
||||
String key = field.getKey();
|
||||
String value = field.getValue().asText();
|
||||
|
||||
StandardMessage standardMessage = this.reqEaiMsg.getStandardMessage();
|
||||
standardMessage.setData(key, value);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transControlHeaderTrnsformSinglesRes() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user