Search in sources :

Example 1 with SoapMetadataResolver

use of org.mule.runtime.soap.api.client.metadata.SoapMetadataResolver in project mule by mulesoft.

the class InvokeKeysResolver method buildServiceKey.

private MetadataKey buildServiceKey(ForwardingSoapClient connection, WebServiceDefinition ws) {
    String serviceId = ws.getServiceId();
    SoapMetadataResolver resolver = connection.getSoapClient(serviceId).getMetadataResolver();
    MetadataKeyBuilder key = newKey(serviceId).withDisplayName(ws.getFriendlyName());
    List<String> excludedOperations = ws.getExcludedOperations();
    resolver.getAvailableOperations().stream().filter(ope -> !excludedOperations.contains(ope)).forEach(ope -> key.withChild(newKey(ope).withDisplayName(NameUtils.titleize(ope))));
    return key.build();
}
Also used : MultilevelMetadataKeyBuilder.newKey(org.mule.runtime.module.extension.api.metadata.MultilevelMetadataKeyBuilder.newKey) ImmutableSet(com.google.common.collect.ImmutableSet) NameUtils(org.mule.runtime.extension.api.util.NameUtils) Set(java.util.Set) WebServiceDefinition(org.mule.runtime.extension.api.soap.WebServiceDefinition) MetadataKeyBuilder(org.mule.runtime.api.metadata.MetadataKeyBuilder) MetadataKey(org.mule.runtime.api.metadata.MetadataKey) List(java.util.List) ConnectionException(org.mule.runtime.api.connection.ConnectionException) MetadataContext(org.mule.runtime.api.metadata.MetadataContext) ForwardingSoapClient(org.mule.runtime.module.extension.soap.internal.runtime.connection.ForwardingSoapClient) MetadataResolvingException(org.mule.runtime.api.metadata.MetadataResolvingException) TypeKeysResolver(org.mule.runtime.api.metadata.resolving.TypeKeysResolver) SoapMetadataResolver(org.mule.runtime.soap.api.client.metadata.SoapMetadataResolver) MetadataKeyBuilder(org.mule.runtime.api.metadata.MetadataKeyBuilder) SoapMetadataResolver(org.mule.runtime.soap.api.client.metadata.SoapMetadataResolver)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 List (java.util.List)1 Set (java.util.Set)1 ConnectionException (org.mule.runtime.api.connection.ConnectionException)1 MetadataContext (org.mule.runtime.api.metadata.MetadataContext)1 MetadataKey (org.mule.runtime.api.metadata.MetadataKey)1 MetadataKeyBuilder (org.mule.runtime.api.metadata.MetadataKeyBuilder)1 MetadataResolvingException (org.mule.runtime.api.metadata.MetadataResolvingException)1 TypeKeysResolver (org.mule.runtime.api.metadata.resolving.TypeKeysResolver)1 WebServiceDefinition (org.mule.runtime.extension.api.soap.WebServiceDefinition)1 NameUtils (org.mule.runtime.extension.api.util.NameUtils)1 MultilevelMetadataKeyBuilder.newKey (org.mule.runtime.module.extension.api.metadata.MultilevelMetadataKeyBuilder.newKey)1 ForwardingSoapClient (org.mule.runtime.module.extension.soap.internal.runtime.connection.ForwardingSoapClient)1 SoapMetadataResolver (org.mule.runtime.soap.api.client.metadata.SoapMetadataResolver)1