sfb.getOutInterceptors().add(new CopyAttachmentOutInterceptor());
if (isProxyEnvelope())
{
sfb.getInInterceptors().add(new ReversibleStaxInInterceptor());
sfb.getInInterceptors().add(new ResetStaxInterceptor());
}
/* Even if the payload is body, if validation is enabled, then we need to use a ReversibleXMLStreamReader to
* avoid the message from being consumed during schema validation.
*/
else if(isValidationEnabled())
{
sfb.getInInterceptors().add(new ReversibleValidatingInterceptor());
sfb.getInInterceptors().add(new ResetStaxInterceptor());
}
}