Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to add some kind of Fault Handling after a cCXF Service Call. For example if the Service is not available I would like to reattempt the Service-Call after 10 seconds.
I looked at the cErrorHandler Component, but when I get the org.apache.cxf.interceptor.Fault message nothing happends.
The same with the cTry - catch component. Catching the org.apache.cxf.interceptor.Fault does not work. The same with the cException component.
So what could I do?
Thanks in advance!
PhaseInterceptorChain WARN Interceptor for {http://auftragsverwaltung.masterarbeit.isst.fraunhofer.de/}NotifyShipmentUnitServerService#{http://www.openapplications.org/oagis/9/ws}NotifyShipmentUnit has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:532)
exchange.getOut().setBody("<NOTIFYSHIPMENTUNIT xmlns="http://www.openapplications.org/oagis/9" XSI="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://www.openapplications.org/oagis/9 ../../Developer/BODs/NotifyShipmentUnit.xsd"><APPLICATIONAREA><SENDER><LOGICALID>normalizedString</LOGICALID></SENDER><CREATIONDATETIME>1967-08-13</CREATIONDATETIME><BODID>normalizedString</BODID></APPLICATIONAREA><DATAAREA><NOTIFY></NOTIFY><SHIPMENTUNIT><SHIPMENTUNITITEM><DESCRIPTION>String</DESCRIPTION><SHIPPEDQUANTITY>3</SHIPPEDQUANTITY></SHIPMENTUNITITEM></SHIPMENTUNIT></DATAAREA></NOTIFYSHIPMENTUNIT>");
Thanks for your answers, but I could not get it to work.
I have a cContext var with "camelContext.sethandleFault(true)",
I have a cErrorHandler with retries and so on,
I have a cOnException component with java.lang.Exception, RuntimeException and org.apache.cxf.interceptor.Fault
I am calling the cCXF from a try component and catch it to a cLog with "Exception.class"