|
|
|
@ -16,6 +16,8 @@ import com.docus.bgts.utils.JAXDynamicClientFactory;
|
|
|
|
|
import com.docus.bgts.utils.XmlUtils;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import org.apache.cxf.endpoint.Client;
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
import org.dom4j.Document;
|
|
|
|
|
import org.dom4j.DocumentHelper;
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
@ -36,6 +38,8 @@ public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
|
@Value("${ws.localMethod}")
|
|
|
|
|
private String wsLocalMethod;
|
|
|
|
|
|
|
|
|
|
private Logger logger= LogManager.getLogger(BgtsServiceImpl.class);
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
IAfCollectTaskService afCollectTaskService;
|
|
|
|
|
|
|
|
|
@ -175,7 +179,15 @@ public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
request.setText(empId);
|
|
|
|
|
String resXml = invokeWs(document.asXML());
|
|
|
|
|
logger.info("-------根据患者主索引号查询多个报告单号,地址:"+wsUrl+",方法:"+wsLocalMethod+"---------");
|
|
|
|
|
String xml = document.asXML();
|
|
|
|
|
logger.info("---------------------------");
|
|
|
|
|
logger.info(xml);
|
|
|
|
|
logger.info("----------------------------");
|
|
|
|
|
String resXml = invokeWs(xml);
|
|
|
|
|
logger.info("---------返回值-------------");
|
|
|
|
|
logger.info(resXml);
|
|
|
|
|
logger.info("-----------------------------");
|
|
|
|
|
//解析XML
|
|
|
|
|
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
|
|
|
|
|
// List<String> dis = new ArrayList<>();
|
|
|
|
@ -224,12 +236,14 @@ public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
|
// call.setTimeout(100000);//超时
|
|
|
|
|
// String result = (String) call.invoke(object);// 远程调用
|
|
|
|
|
// System.out.println(result);
|
|
|
|
|
|
|
|
|
|
logger.info("-----\n客户端调用服务端:",wsUrl,"方法:",wsLocalMethod,"\n------------");
|
|
|
|
|
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
|
|
|
|
|
Client client = dcf.createClient(wsUrl);
|
|
|
|
|
Object[] objects = client.invoke(wsLocalMethod,xml);
|
|
|
|
|
String str = objects[0].toString();
|
|
|
|
|
System.out.println(str);
|
|
|
|
|
logger.info("----------结果---------");
|
|
|
|
|
logger.info(str);
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|