응답 변환 시 한글 깨지는 문제
- 원인은 HTTPProcess에서 어댑터 문자셋에 따라 무조건 charset 마추어 bytes로 변경하는 문제
This commit is contained in:
@@ -273,7 +273,10 @@ public class HTTPProcess extends DefaultProcess {
|
|||||||
try {
|
try {
|
||||||
// 응답전문으로 응답 구조체(resEaiMsg) SET
|
// 응답전문으로 응답 구조체(resEaiMsg) SET
|
||||||
resEaiMsg = setRcvLogInfo(resEaiMsg, this.adptrMsgType, this.resObject, this.outboundCharset);
|
resEaiMsg = setRcvLogInfo(resEaiMsg, this.adptrMsgType, this.resObject, this.outboundCharset);
|
||||||
this.resObject = resEaiMsg.getStandardMessage().getBizDataBytes();
|
// JSON/XML 은 String 으로 넘긴다. byte[] 로 넘기면 charset 정보가 유실되어 변환 시 깨진다.
|
||||||
|
this.resObject = MessageUtil.isBytesMessage(this.adptrMsgType)
|
||||||
|
? resEaiMsg.getStandardMessage().getBizDataBytes()
|
||||||
|
: resEaiMsg.getStandardMessage().getBizData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String[] msgArgs = new String[1];
|
String[] msgArgs = new String[1];
|
||||||
msgArgs[0] = this.reqEaiMsg.getEAISvcCd();
|
msgArgs[0] = this.reqEaiMsg.getEAISvcCd();
|
||||||
@@ -289,7 +292,10 @@ public class HTTPProcess extends DefaultProcess {
|
|||||||
logger.debug(guidLogPrefix + "SUB표준 업무데이터 추출");
|
logger.debug(guidLogPrefix + "SUB표준 업무데이터 추출");
|
||||||
try {
|
try {
|
||||||
this.resEaiMsg = convertToStandardMessage(resEaiMsg, adptrMsgType, this.resObject, this.outboundCharset);
|
this.resEaiMsg = convertToStandardMessage(resEaiMsg, adptrMsgType, this.resObject, this.outboundCharset);
|
||||||
this.resObject = resEaiMsg.getStandardMessage().getBizDataBytes();
|
// JSON/XML 은 String 으로 넘긴다. byte[] 로 넘기면 charset 정보가 유실되어 변환 시 깨진다.
|
||||||
|
this.resObject = MessageUtil.isBytesMessage(this.adptrMsgType)
|
||||||
|
? resEaiMsg.getStandardMessage().getBizDataBytes()
|
||||||
|
: resEaiMsg.getStandardMessage().getBizData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
String[] msgArgs = new String[1];
|
String[] msgArgs = new String[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user