cxf - 将 org.apache.cxf 从 3.0.7 更新到 3.3.10 后自定义异常返回 MashallingError
问题描述
映射的异常
@WebFault(name = "InvalidInputException", faultBean = "InvalidInputException")
public class InvalidInputException extends RuntimeException {
private static final long serialVersionUID = 1L;
public InvalidInputException(String msg) {
super(msg);
}
}
正在返回 Marshall 错误。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Marshalling Error: class app.exception.InvalidInputException nor any of its super class is known to this context.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
InvalidInputException 类中是否需要进行任何更改?
解决方案
推荐阅读
- java - 为什么会发生 PoolingException?
- node.js - 如何通过 Postman 发送嵌套数组
- php - 字母数字正则表达式不适用于非罗马字符
- c - Linux信号父子[c]
- android - 三星 Galaxy s9 能否将其操作系统从 10 升级到 11?
- nginx - nginx 上 docker 中的 Wordpress - 502 Bad Gateway
- javascript - Prisma with Next-Auth,用户创建失败导致Keycloak的api响应键名
- python-3.x - 安装 Wordcloud for Python 等包:要安装哪些工具?
- python - 如何添加十六进制字符串列表以获得总十六进制值
- jenkins - 参数化远程触发器正在阻止作业,直到远程作业被触发