use of org.mule.runtime.extension.api.soap.ContextAwareMessageDispatcherProvider in project mule by mulesoft.
the class ForwardingSoapClientConnectionProvider method validate.
@Override
public ConnectionValidationResult validate(ForwardingSoapClient connection) {
try {
serviceProvider.validateConfiguration();
MessageDispatcher messageDispatcher;
if (transportProvider instanceof ContextAwareMessageDispatcherProvider) {
messageDispatcher = ((ContextAwareMessageDispatcherProvider) transportProvider).connect(new DefaultDispatchingContext(client));
} else {
messageDispatcher = transportProvider.connect();
}
ConnectionValidationResult result = transportProvider.validate(messageDispatcher, serviceProvider);
transportProvider.disconnect(messageDispatcher);
return result;
} catch (Exception e) {
return failure(e.getMessage(), e);
}
}
Aggregations