return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
}
private static Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
{
Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
if (port == null)
return configuration.getDefaultConfig();
Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
if (operation == null)
{
//if the operation name was not available or didn't match any wsse configured operation,
//we fall back to the port wsse config (if available) or the default config.
Config portConfig = port.getDefaultConfig();
return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;
}
return operation.getConfig();
}