From 33c477a30c5ac759563c73ebc649b71bdd6bfba6 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Wed, 4 Jul 2018 17:06:29 +0800 Subject: [PATCH] fixedDocument --- .../manage/ofei/core/impl/OfeiClientImpl.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java b/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java index 8630029bf..4935aedf5 100644 --- a/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java @@ -1,14 +1,15 @@ package au.com.royalpay.payment.manage.ofei.core.impl; -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import au.com.royalpay.payment.core.exceptions.ChannelNetworkException; +import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper; +import au.com.royalpay.payment.manage.ofei.core.OfeiClient; +import au.com.royalpay.payment.manage.ofei.enums.OfeiType; +import au.com.royalpay.payment.tools.codec.MD5Hash; +import au.com.royalpay.payment.tools.exceptions.BadRequestException; +import au.com.royalpay.payment.tools.exceptions.ServerErrorException; +import au.com.royalpay.payment.tools.fixing.FixedDocumentHelper; -import javax.annotation.Resource; +import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.time.DateFormatUtils; @@ -16,7 +17,6 @@ import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.dom4j.Document; import org.dom4j.DocumentException; -import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,15 +24,15 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMethod; -import com.alibaba.fastjson.JSONObject; +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import au.com.royalpay.payment.core.exceptions.ChannelNetworkException; -import au.com.royalpay.payment.manage.mappers.ofei.TopUpOrderMapper; -import au.com.royalpay.payment.manage.ofei.core.OfeiClient; -import au.com.royalpay.payment.manage.ofei.enums.OfeiType; -import au.com.royalpay.payment.tools.codec.MD5Hash; -import au.com.royalpay.payment.tools.exceptions.BadRequestException; -import au.com.royalpay.payment.tools.exceptions.ServerErrorException; +import javax.annotation.Resource; import cn.yixblog.platform.http.HttpRequestGenerator; import cn.yixblog.platform.http.HttpRequestResult; @@ -259,7 +259,7 @@ public class OfeiClientImpl implements OfeiClient { byte[] respArr = res.getResponseContentBytes(); String respStr = new String(respArr, "GB2312"); logger.debug("ofei server response:" + respStr); - Document respXml = DocumentHelper.parseText(respStr); + Document respXml = FixedDocumentHelper.parseText(respStr); Element respRoot = respXml.getRootElement(); return respRoot; } else {