|
|
|
@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import javax.jws.WebService;
|
|
|
|
|
import java.io.ByteArrayInputStream;
|
|
|
|
|
import java.io.StringReader;
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -178,6 +179,7 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
} catch (RuntimeException e) {
|
|
|
|
|
logger.info("发送错误:" + e.getMessage());
|
|
|
|
|
mrReportErrorService.insert(xml);
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return ResultUtils.fail(e.getMessage());
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.info("发送错误:" + e.getMessage());
|
|
|
|
@ -194,8 +196,8 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
* @param xml
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private CanlcelDto getCanlCelDtoByXml(String xml) {
|
|
|
|
|
XmlUtils xmlUtils = new XmlUtils(xml);
|
|
|
|
|
private CanlcelDto getCanlCelDtoByXml(String xml) throws UnsupportedEncodingException {
|
|
|
|
|
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(xml.getBytes("UTF-8")));
|
|
|
|
|
//采集流水号所在位置目录
|
|
|
|
|
List<String> repealDirectory = (List<String>) FileUtils.getJsonByName("repealDirectory");
|
|
|
|
|
Element element = xmlUtils.getElement(repealDirectory);
|
|
|
|
@ -223,21 +225,22 @@ public class TBasicWebService implements ITBasicWebService {
|
|
|
|
|
private String getElementText(Element element, String[] args) {
|
|
|
|
|
String resText = "";
|
|
|
|
|
Element byElement = (Element) element.clone();
|
|
|
|
|
Element byElement1 = null;
|
|
|
|
|
String[] split;
|
|
|
|
|
for (String arg : args) {
|
|
|
|
|
split = arg.split("&");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
for (String spi : split) {
|
|
|
|
|
byElement = byElement.element(spi);
|
|
|
|
|
if (byElement != null) {
|
|
|
|
|
byElement1 = byElement.element(spi);
|
|
|
|
|
if (byElement1 != null) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
byElement = byElement.element(arg);
|
|
|
|
|
byElement1 = byElement.element(arg);
|
|
|
|
|
}
|
|
|
|
|
if (byElement != null) {
|
|
|
|
|
resText = byElement.getText();
|
|
|
|
|
if (byElement1 != null) {
|
|
|
|
|
resText = byElement1.getText();
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|