Search in sources :

Example 1 with PolicyFeatureConfigurator

use of com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator in project metro-jax-ws by eclipse-ee4j.

the class PolicyUtil method getPortScopedFeatures.

/**
 * Returns the list of features that correspond to the policies in the policy
 * map for a give port
 *
 * @param policyMap The service policies
 * @param serviceName The service name
 * @param portName The service port name
 * @return List of features for the given port corresponding to the policies in the map
 */
public static Collection<WebServiceFeature> getPortScopedFeatures(PolicyMap policyMap, QName serviceName, QName portName) {
    LOGGER.entering(policyMap, serviceName, portName);
    Collection<WebServiceFeature> features = new ArrayList<>();
    try {
        final PolicyMapKey key = PolicyMap.createWsdlEndpointScopeKey(serviceName, portName);
        for (PolicyFeatureConfigurator configurator : CONFIGURATORS) {
            Collection<WebServiceFeature> additionalFeatures = configurator.getFeatures(key, policyMap);
            if (additionalFeatures != null) {
                features.addAll(additionalFeatures);
            }
        }
    } catch (PolicyException e) {
        throw new WebServiceException(e);
    }
    LOGGER.exiting(features);
    return features;
}
Also used : PolicyFeatureConfigurator(com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator) WebServiceException(jakarta.xml.ws.WebServiceException) PolicyMapKey(com.sun.xml.ws.policy.PolicyMapKey) PolicyException(com.sun.xml.ws.policy.PolicyException) WebServiceFeature(jakarta.xml.ws.WebServiceFeature) ArrayList(java.util.ArrayList)

Aggregations

PolicyException (com.sun.xml.ws.policy.PolicyException)1 PolicyMapKey (com.sun.xml.ws.policy.PolicyMapKey)1 PolicyFeatureConfigurator (com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator)1 WebServiceException (jakarta.xml.ws.WebServiceException)1 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)1 ArrayList (java.util.ArrayList)1