i use Quarkus 3.4.3 & Camel 4.0.0, and i have a CXF Endpoint. But when receiver a response SoapFault, i lose the response with this soapFault.
i need keep this soapFault string and use it for next steps of my route.
i have try, many Interceptors , but not work. The one work it is on the OnException(SaopFault.class), create .process retreive some piece of soapFault String and reconstruct all SOAPMessage ..but it is very bad.
it is not possible to do other way with interceptor inFaultInterceptor save the XML (soapFault response) and setBody with this ? easely ? without all recreate message...
thanks.
This is bad, because i dont know many details have the response ...
public void process(Exchange exchange) throws Exception {
SoapFault faultCXF = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, SoapFault.class);
StringWriter sw = new StringWriter();
SOAPMessage message = MessageFactory.newInstance().createMessage();
SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();
SOAPBody body = message.getSOAPBody();
SOAPFault fault = body.addFault();
fault.setFaultCode(faultCXF.getFaultCode());
fault.setFaultString(faultCXF.getReason());
Detail detail = fault.addDetail();