现在在开发一个安卓收费终端,但是看到官方给的SDK只有JAVA版本,于是想移植JAVA SDK用于安卓系统。最后移植过程中碰到了XXE防护程序跳出 ParserConfiguration 的错误,查看安卓源码发现
documentBuilderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
documentBuilderFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
documentBuilderFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
documentBuilderFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
documentBuilderFactory.setXIncludeAware(false);
这几项均不能实现。目前安卓SDK版本为26,应该不存在版本过低的问题。
请问有解决方法吗?还是说这个刷卡支付只能在服务器端实现?
你好,我也遇到你这样的问题了,同样是在前端实现收费终端,在请求接口的时候给我返回http://apache.org/xml/features/disallow-doctype-decl这个链接,你目前是怎么解决的
您好,暂不支持该操作。