// If the response message itself is a fault message, let it pass through.
if ((faultexception != null) && ((response.getMessage() == null)
|| (!response.getMessage().isFault()))) {
MessageFactory factory =
(MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
Message message = factory.create(request.getMessage().getProtocol());
response.setLocalException(faultexception);
response.setMessage(message);
}
// This assumes that we are on the ultimate execution thread