J'ai une application Mule qui utilise Apache CXF pour consommer un service Web externe. J'essaie d'enregistrer un intercepteur d'erreur comme suit.Intercepteur d'erreur Apache CXF non invoqué
<cxf:proxy-client payload="body" doc:name="SOAP">
<!-- outgoing interceptor chain for the client and an incoming chain for the cxf server -->
<cxf:outFaultInterceptors>
<spring:ref bean="faultOutInterceptor" />
</cxf:outFaultInterceptors>
</cxf:proxy-client>
<spring:bean id="faultOutInterceptor" name="faultOutInterceptor" class="mypackage.soap.FaultOutInterceptor"/>
Où faultOutInterceptor est ...
public class FaultOutInterceptor extends AbstractSoapInterceptor {
private static final Logger log = LoggerFactory.getLogger(FaultOutInterceptor.class);
public FaultOutInterceptor() {
super(Phase.USER_LOGICAL);
}
@Override
public void handleMessage(SoapMessage m) throws Fault {
log.info("Start in Fault Interceptor");
log.info("SoapMessage Interceptor" + m);
Fault fault = (Fault) m.getContent(Exception.class);
log.info("Received fault response from error: " + fault);
}
}
Lorsqu'un défaut SOAP est jeté intercepteur n'est pas invoquée. Il y a certainement d'autres intercepteurs qui sont invoqués mais malheureusement pas les miens. Voir le journal ci-dessous ...
DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Chain [email protected] was modified. Current flow:
setup [PolicyOutInterceptor, CopyAttachmentOutInterceptor]
pre-logical [OutputPayloadInterceptor, SoapHeaderOutFilterInterceptor]
post-logical [SoapPreProtocolOutInterceptor]
prepare-send [MessageSenderInterceptor]
pre-stream [AttachmentOutInterceptor, MuleProtocolHeadersOutInterceptor, StaxOutInterceptor, org.mule.module.cxf.transport.MuleUniversalConduit$2]
pre-protocol [MuleHeadersOutInterceptor]
write [SoapOutInterceptor]
marshal [BareOutInterceptor]
write-ending [SoapOutEndingInterceptor]
pre-stream-ending [StaxOutEndingInterceptor]
prepare-send-ending [MessageSenderEndingInterceptor]
DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor [email protected]
DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.bindi[email protected]4a09a8da
DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor [email protected]
DEBUG org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.cxf.inte[email protected]18c65fc3
Quelqu'un peut-il m'aider avec ce que je pourrais faire mal?
grâce