I don?t get fault and error on exchange.
This my source:
public class MessageReprocessComponent extends PollingComponentSupport{
.
.
public void poll() throws Exception {
RobustInOnly roi = mef.createRobustInOnlyExchange();
NormalizedMessage nm = roi.createMessage();
nm.setContent(new StringSource("TESTE"));
roi.setInMessage(nm);
boolean sent = sendSync(roi, 6000L);
if(!sent){
log.info("ERROR SENT");
}
log.info("Status "+roi.getStatus());
log.info("Fault "+roi.getFault());
log.info("Error "+roi.getError().getCause());
}
.
.
.
}
public class MessageConfirmer extends TransformComponentSupport {
.
.
protected boolean transform(MessageExchange exchange, NormalizedMessage in,
NormalizedMessage out)
throws MessagingException{
log.info("Content - "+in.getContent().toString());
Fault fault = exchange.createFault();
fault.setProperty("TEST Fault", "Fault");
fault.setContent(new StringSource("Fault "));
exchange.setFault(fault);
exchange.setError(new MessagingException("Test Exception"));
return true;
}
.
.
.
}
Out:
roi.getStatus() = Done
roi.getFault() is null and
roi.getError() is null.
Which is the problem?
Thanks!
--
View this message in context:
http://www.nabble.com/Fault-and-Error-tf1934001.html#a5298806
Sent from the ServiceMix - Dev forum at Nabble.com.