Search in sources :

Example 1 with Locator

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);
    }
}
Also used : Locator(org.apache.cxf.xkms.handlers.Locator) LocateResultType(org.apache.cxf.xkms.model.xkms.LocateResultType) UnverifiedKeyBindingType(org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType)

Aggregations

Locator (org.apache.cxf.xkms.handlers.Locator)1 LocateResultType (org.apache.cxf.xkms.model.xkms.LocateResultType)1 UnverifiedKeyBindingType (org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType)1