throws UnsupportedEncodingException, ExecutionException {
// First try with path routing
String lookupService = genLookupName(key.getService(), key.getHost(), key.getFirstPathPart());
EndpointStrategy endpointStrategy = discover(lookupService);
if (endpointStrategy.pick() == null) {
// Try without path routing
lookupService = genLookupName(key.getService(), key.getHost());
endpointStrategy = discover(lookupService);
}