use of org.mule.runtime.module.extension.internal.loader.java.property.ConnectivityModelProperty in project mule by mulesoft.
the class SoapInvokeOperationDeclarer method declare.
/**
* Declares the invoke operation.
*
* @param configDeclarer the soap config declarer
* @param loader a {@link ClassTypeLoader} to load some parameters types.
* @param soapErrors the {@link ErrorModel}s that this operation can throw.
*/
void declare(ConfigurationDeclarer configDeclarer, ClassTypeLoader loader, Set<ErrorModel> soapErrors) {
ReflectionCache reflectionCache = new ReflectionCache();
OperationDeclarer operation = configDeclarer.withOperation(OPERATION_NAME).describedAs(OPERATION_DESCRIPTION).requiresConnection(true).blocking(true).withModelProperty(new ComponentExecutorModelProperty(new SoapOperationExecutorFactory())).withModelProperty(new ConnectivityModelProperty(ForwardingSoapClient.class));
soapErrors.forEach(operation::withErrorModel);
declareMetadata(operation, loader);
declareOutput(operation, loader);
declareMetadataKeyParameters(operation, loader, reflectionCache);
declareRequestParameters(operation, loader);
}
use of org.mule.runtime.module.extension.internal.loader.java.property.ConnectivityModelProperty in project mule by mulesoft.
the class ConfigurationInstanceFactoryTestCase method before.
@Before
public void before() throws Exception {
mockConfigurationInstance(configurationModel, new TestConfig());
mockInterceptors(configurationModel, asList(() -> interceptor1, () -> interceptor2));
when(configurationModel.getOperationModels()).thenReturn(ImmutableList.of());
when(configurationModel.getSourceModels()).thenReturn(ImmutableList.of());
when(extensionModel.getOperationModels()).thenReturn(asList(operationModel));
when(extensionModel.getSourceModels()).thenReturn(asList(sourceModel));
when(operationModel.getModelProperty(ConnectivityModelProperty.class)).thenReturn(of(new ConnectivityModelProperty(Banana.class)));
when(sourceModel.getModelProperty(ConnectivityModelProperty.class)).thenReturn(of(new ConnectivityModelProperty(Banana.class)));
when(sourceModel.getErrorCallback()).thenReturn(of(sourceCallbackModel));
when(sourceModel.getSuccessCallback()).thenReturn(of(sourceCallbackModel));
when(muleContext.getConfiguration().getDefaultEncoding()).thenReturn(ENCODING);
resolverSet = ConfigurationObjectBuilderTestCase.createResolverSet();
factory = new ConfigurationInstanceFactory<>(extensionModel, configurationModel, resolverSet, new ReflectionCache(), muleContext);
}
Aggregations