Message fault = exchange.createMessage();
fault.setContent(new Exception("testFaultTransformSequence"));
exchange.sendFault(fault);
}
};
InOutOperation providerContract = new InOutOperation("faultOp",
JavaTypes.toMessageType(String.class), // input
JavaTypes.toMessageType(String.class), // output
JavaTypes.toMessageType(Exception.class)); // fault
InOutOperation consumerContract = new InOutOperation("faultOp",
JavaTypes.toMessageType(String.class), // input
JavaTypes.toMessageType(String.class), // output
JavaTypes.toMessageType(String.class)); // fault
_domain.registerService(serviceName, new InOutService(providerContract), provider);
_domain.getTransformerRegistry().addTransformer(new ExceptionToStringTransformer());