You might want to check the logic you have, a common mistake is not
completing your exchanges:

http://goopen.org/confluence/display/SM/Why+does+my+sender+not+send

also check out the ComponentSupport

http://goopen.org/confluence/display/SM/Component+helper+classes

and also worth a look is the POJO support

http://goopen.org/confluence/display/SM/POJO+support

P



On 7/12/06, Charlesh <[EMAIL PROTECTED]> wrote:


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.


Reply via email to