杰克逊封送SoapFaultClientException失败

时间:2018-09-21 21:30:41

标签: soap jackson spring-ws

使用jackson序列化SoapFaultClientException时出现以下错误

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Operation not supported by SOAP 1.1 (through reference chain: com.almundo.commons.exception.error.ApiError["cause"]->org.springframework.ws.soap.client.SoapFaultClientException["web_service_message"]->org.springframework.ws.soap.saaj.SaajSoapMessage["saaj_message"]->com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl["action"])

调试中,我发现杰克逊正在反序列化操作方法,并且不支持soap 1.1:

public String getAction() {
    log.log(Level.SEVERE, "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1", new String[]{"Action"});
    throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
}

我没有机会将客户端迁移到Soap 1.2(接受:application / soap + xml),因为我正在使用的端点是外部端点,并且正在返回SOAP 1.1消息。(内容类型:text / html)我需要一种方法告诉杰克逊避免序列化 但是我无法将@jsonIgnore添加到Message1_1Impl。有什么方法可以配置吗?

谢谢, 豪尔赫

0 个答案:

没有答案