use of org.apache.cxf.xkms.model.xkms.RegisterRequestType in project cxf by apache.
the class XKMSServiceTest method testEmptyRegister.
@Test
public void testEmptyRegister() throws URISyntaxException, Exception {
RegisterRequestType request = new RegisterRequestType();
setGenericRequestParams(request);
RegisterResultType result = xkmsService.register(request);
Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER.value(), result.getResultMajor());
Assert.assertEquals(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value(), result.getResultMinor());
}
use of org.apache.cxf.xkms.model.xkms.RegisterRequestType in project cxf by apache.
the class XKRSSDisableTest method testRegisterShouldBeDisabled.
@Test
public void testRegisterShouldBeDisabled() {
RegisterRequestType request = new RegisterRequestType();
request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
request.setId(UUID.randomUUID().toString());
RegisterResultType result = xkmsService.register(request);
Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER.value(), result.getResultMajor());
Assert.assertEquals(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_MESSAGE_NOT_SUPPORTED.value(), result.getResultMinor());
ResultDetails message = (ResultDetails) result.getMessageExtension().get(0);
Assert.assertEquals("XKRSS Operations are disabled", message.getDetails());
}
use of org.apache.cxf.xkms.model.xkms.RegisterRequestType in project cxf by apache.
the class CheckXKRSS method checkRegisterWithoutXKRSS.
@Test
public void checkRegisterWithoutXKRSS() {
RegisterRequestType request = new RegisterRequestType();
request.setId("1");
request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
createXKMSService(false).register(request);
RegisterResultType result = createXKMSService(false).register(request);
assertNotSupported(result);
}
use of org.apache.cxf.xkms.model.xkms.RegisterRequestType in project cxf by apache.
the class CheckXKRSS method checkRevokeWithXKRSS.
@Test
public void checkRevokeWithXKRSS() {
RegisterRequestType request = new RegisterRequestType();
request.setId("1");
request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
ResultType result = createXKMSService(true).register(request);
assertSuccess(result);
}
use of org.apache.cxf.xkms.model.xkms.RegisterRequestType in project cxf by apache.
the class XKMSServiceTest method testRegisterWithoutKey.
@Test
public void testRegisterWithoutKey() throws URISyntaxException, Exception {
RegisterRequestType request = new RegisterRequestType();
setGenericRequestParams(request);
PrototypeKeyBindingType binding = new PrototypeKeyBindingType();
KeyInfoType keyInfo = new KeyInfoType();
binding.setKeyInfo(keyInfo);
request.setPrototypeKeyBinding(binding);
RegisterResultType result = xkmsService.register(request);
Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER.value(), result.getResultMajor());
Assert.assertEquals(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value(), result.getResultMinor());
}
Aggregations