package com.chinaztt.mes.mould.util; import cn.hutool.json.JSONObject; import cn.hutool.json.XML; import org.apache.commons.lang3.StringUtils; /** * @Author: Zero * @Date: 2022/12/2 09:37 * @Description: */ public class SoapUtil { public static String parseReadTempCollectionRecordResult(String result) { if (StringUtils.isBlank(result)) { return StringUtils.EMPTY; } JSONObject data = XML.toJSONObject(result); return data.getJSONObject("soap:Envelope").getJSONObject("soap:Body").getJSONObject( "Read_temp_collection_recordResponse").get("Read_temp_collection_recordResult").toString(); } public static String parseInsertTempLifeRecordResult(String result) { if (StringUtils.isBlank(result)) { return StringUtils.EMPTY; } JSONObject data = XML.toJSONObject(result); return data.getJSONObject("soap:Envelope").getJSONObject("soap:Body").getJSONObject( "Insert_temp_life_recordResponse").get("Insert_temp_life_recordResult").toString(); } }