当前位置:网站首页>WebService client request failed can not create a secure xmlinputfactory
WebService client request failed can not create a secure xmlinputfactory
2022-06-23 23:15:00 【lang20150928】
webService Client request failed :can not create a secure xmlinputfactory
Corresponding cxf Version is
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cxf.version>3.2.14</cxf.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-parent</artifactId>
<version>${cxf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf</artifactId>
<version>${cxf.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Find the corresponding location of the source code (org.apache.cxf.staxutils.StaxUtils Class 338 That's ok )
From the above source code is not difficult to see , If allowInsecureParser Parameter is true Words , You won't get into the logic of throwing exceptions . and allowInsecureParser Parameters are set during class initialization . The approximate source code is as follows
public static final String ALLOW_INSECURE_PARSER =
"org.apache.cxf.stax.allowInsecureParser";
private static boolean allowInsecureParser;
static{
// ...
String s = SystemPropertyAction.getPropertyOrNull(ALLOW_INSECURE_PARSER);
if (!StringUtils.isEmpty(s)) {
allowInsecureParser = "1".equals(s) || Boolean.parseBoolean(s);
}
// ...
}
It is not difficult to see from the above that if ALLOW_INSECURE_PARSER The corresponding value cannot be empty , Also for 1 perhaps true when ,allowInsecureParser by true.
Set system parameters -Dorg.apache.cxf.stax.allowInsecureParser=1 Start again ,webservice Request no error .
边栏推荐
- [technical dry goods] the technical construction route and characteristics of zero trust in ant Office
- Aicon2021 | AI technology helps content security and promotes the healthy development of Internet Environment
- Understand the data consistency between MySQL and redis
- Use elastic security to detect the vulnerability exploitation of cve-2021-44228 (log4j2)
- Website construction column setting form which website construction company is better
- MySQL transaction isolation
- Can postman be integrated into Ci and CD pipelines for automated interface testing?
- The sandbox week is coming!
- Notes to nodejs (IV)
- Pressure measuring tool platform problem case base
猜你喜欢

What is an immunohistochemical experiment? Immunohistochemical experiment

The Sandbox 与 BAYZ 达成合作,共同带动巴西的元宇宙发展

Section 30 high availability (HA) configuration case of Tianrongxin topgate firewall

How to write and read ASM file system data

专业“搬砖”老司机总结的 12 条 SQL 优化方案,非常实用!

生鲜前置仓的面子和里子

解密抖音春节红包背后的技术设计与实践
SQL语句中EXISTS的详细用法大全

谈谈数字化转型晓知识

Giants end up "setting up stalls" and big stalls fall into "bitter battle"
随机推荐
[js] remove the extra zero after the decimal point
TDP "spark" plan - the third phase of new recruitment is launched
Unknown character set index for field ‘255‘ received from server.
Docker中部署Redis集群与部署微服务项目的详细过程
What is the development prospect of face recognition technology?
ASM文件系统 数据如何写和读数据
Analysis and application of ThreadLocal source code
SQL Server Common SQL
Tencent lightweight + pagoda building document online preview project kkfileview
go语言学习
How do new investors open accounts by speculation? Is online account opening safe?
蚂蚁集团自研TEE技术通过国家级金融科技产品认证
How to access the top-level domain name and automatically jump to the secondary domain name?
谈谈数字化转型晓知识
Detailed usage of exists in SQL statements
Use elastic security to detect the vulnerability exploitation of cve-2021-44228 (log4j2)
Source code analysis of jmeter5.1 core class testcompiler
蚂蚁获FinQA竞赛冠军,在长文本数值推理AI技术上取得突破
MySQL transaction isolation
The technical design and practice of decrypting the red envelopes of Tiktok Spring Festival