use of org.apache.cxf.xkms.handlers.Locator in project cxf by apache.
the class XKMSService method locate.
@Override
public LocateResultType locate(LocateRequestType request) {
LocateResultType response = XKMSResponseFactory.createResponse(request, new LocateResultType());
try {
validateRequest(request);
// Search
for (Locator locator : locators) {
UnverifiedKeyBindingType keyBinding = locator.locate(request);
if (keyBinding != null) {
response.getUnverifiedKeyBinding().add(keyBinding);
return response;
}
}
// No matches found
response.setResultMinor(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH.value());
return response;
} catch (Exception e) {
return handleException("locate", e, response);
}
}
Aggregations