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());
ServiceReference service = _domain.registerServiceReference(serviceName, new InOutService(consumerContract));
// Consume the service
Exchange exchange = service.createExchange(new MockHandler());
exchange.send(exchange.createMessage());