ROOTLESSARRAY 원복
This commit is contained in:
+1
-22
@@ -978,16 +978,6 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eaiBody instanceof JSONObject) {
|
|
||||||
JSONObject jsonObject = (JSONObject) eaiBody;
|
|
||||||
if( jsonObject.containsKey("kjbrootlessarray") ) {
|
|
||||||
ContentType contentTypeObj = ContentType.create(contentType, charset);
|
|
||||||
JSONArray array = (JSONArray) jsonObject.get("kjbrootlessarray");
|
|
||||||
StringEntity entity = new StringEntity(array.toJSONString(), contentTypeObj);
|
|
||||||
method.setEntity(entity);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.contains(contentType, "application/x-www-form-urlencoded")) {
|
if (StringUtils.contains(contentType, "application/x-www-form-urlencoded")) {
|
||||||
if (eaiBody instanceof JSONObject) {
|
if (eaiBody instanceof JSONObject) {
|
||||||
@@ -1500,18 +1490,7 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object obj = JSONValue.parse(message);
|
return (JSONObject) JSONValue.parse(message);
|
||||||
|
|
||||||
if (obj instanceof JSONObject) {
|
|
||||||
return (JSONObject) obj;
|
|
||||||
} else if (obj instanceof JSONArray) {
|
|
||||||
// 배열일 경우 새로운 객체로 감싸서 반환
|
|
||||||
JSONObject wrapper = new JSONObject();
|
|
||||||
wrapper.put("kjbrootlessarray", obj);
|
|
||||||
return wrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null; // 혹은 상황에 맞는 예외 처리
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Document convertXmlDocument(String message) throws Exception {
|
private Document convertXmlDocument(String message) throws Exception {
|
||||||
|
|||||||
+1
-24
@@ -185,18 +185,6 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport
|
|||||||
|
|
||||||
String body = new String ( requestBytes,encode);
|
String body = new String ( requestBytes,encode);
|
||||||
|
|
||||||
try {
|
|
||||||
Object root = JSONValue.parse(body);
|
|
||||||
if( root instanceof JSONArray ) {
|
|
||||||
JSONObject wrappedObject = new JSONObject();
|
|
||||||
wrappedObject.put("kjbrootlessarray", root);
|
|
||||||
requestBytes = wrappedObject.toJSONString().getBytes(encode);
|
|
||||||
}
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
|
||||||
// ignore json이 아니기에 해줄것이 없음.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 로컬 서비스 호출
|
// 로컬 서비스 호출
|
||||||
Object result = null;
|
Object result = null;
|
||||||
@@ -247,18 +235,7 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport
|
|||||||
if (addData.length() > 0){
|
if (addData.length() > 0){
|
||||||
responseData = addData + responseData;
|
responseData = addData + responseData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
Object root = JSONValue.parse(responseData);
|
|
||||||
if( root instanceof JSONObject ) {
|
|
||||||
JSONObject wrappedObject = (JSONObject) root;
|
|
||||||
responseData = wrappedObject.get("kjbrootlessarray").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
|
||||||
// ignore json이 아니기에 해줄것이 없음.
|
|
||||||
}
|
|
||||||
// 300응답에서 받은 Header정보 사용하기 위해 읽어옴.
|
// 300응답에서 받은 Header정보 사용하기 위해 읽어옴.
|
||||||
Map<String, Object> responsePropertyMap = new HashMap<String, Object>();
|
Map<String, Object> responsePropertyMap = new HashMap<String, Object>();
|
||||||
responsePropertyMap = (Map<String, Object>) prop.get(OUTBOUND_PROPERTY_MAP);
|
responsePropertyMap = (Map<String, Object>) prop.get(OUTBOUND_PROPERTY_MAP);
|
||||||
|
|||||||
Reference in New Issue
Block a user