Search in sources :

Example 6 with LocateRequestType

use of org.apache.cxf.xkms.model.xkms.LocateRequestType in project cxf by apache.

the class XKMSServiceTest method testLocatePKIX.

@Test
public void testLocatePKIX() throws URISyntaxException, Exception {
    LocateRequestType request = XKMS_OF.createLocateRequestType();
    setGenericRequestParams(request);
    QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();
    UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
    useKeyWithType.setIdentifier("CN=Dave, OU=Apache, O=CXF, L=CGN, ST=NRW, C=DE");
    useKeyWithType.setApplication(Applications.PKIX.getUri());
    locateCertificate(request, queryKeyBindingType, useKeyWithType);
}
Also used : QueryKeyBindingType(org.apache.cxf.xkms.model.xkms.QueryKeyBindingType) UseKeyWithType(org.apache.cxf.xkms.model.xkms.UseKeyWithType) LocateRequestType(org.apache.cxf.xkms.model.xkms.LocateRequestType) BasicIntegrationTest(org.apache.cxf.xkms.itests.BasicIntegrationTest) Test(org.junit.Test)

Example 7 with LocateRequestType

use of org.apache.cxf.xkms.model.xkms.LocateRequestType in project cxf by apache.

the class XKMSServiceTest method testLocateByEndpoint.

@Test
public void testLocateByEndpoint() throws URISyntaxException, Exception {
    LocateRequestType request = XKMS_OF.createLocateRequestType();
    setGenericRequestParams(request);
    QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();
    UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
    useKeyWithType.setIdentifier("http://localhost:8080/services/TestService");
    useKeyWithType.setApplication(Applications.SERVICE_ENDPOINT.getUri());
    locateCertificate(request, queryKeyBindingType, useKeyWithType);
}
Also used : QueryKeyBindingType(org.apache.cxf.xkms.model.xkms.QueryKeyBindingType) UseKeyWithType(org.apache.cxf.xkms.model.xkms.UseKeyWithType) LocateRequestType(org.apache.cxf.xkms.model.xkms.LocateRequestType) BasicIntegrationTest(org.apache.cxf.xkms.itests.BasicIntegrationTest) Test(org.junit.Test)

Aggregations

LocateRequestType (org.apache.cxf.xkms.model.xkms.LocateRequestType)7 QueryKeyBindingType (org.apache.cxf.xkms.model.xkms.QueryKeyBindingType)5 UseKeyWithType (org.apache.cxf.xkms.model.xkms.UseKeyWithType)5 Test (org.junit.Test)3 BasicIntegrationTest (org.apache.cxf.xkms.itests.BasicIntegrationTest)2 LocateResultType (org.apache.cxf.xkms.model.xkms.LocateResultType)2 InputStream (java.io.InputStream)1 URL (java.net.URL)1 Path (java.nio.file.Path)1 Certificate (java.security.cert.Certificate)1 CertificateFactory (java.security.cert.CertificateFactory)1 X509Certificate (java.security.cert.X509Certificate)1 QName (javax.xml.namespace.QName)1 Service (javax.xml.ws.Service)1 Bus (org.apache.cxf.Bus)1 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)1 XKMSLocateException (org.apache.cxf.xkms.exception.XKMSLocateException)1 PrototypeKeyBindingType (org.apache.cxf.xkms.model.xkms.PrototypeKeyBindingType)1 RegisterRequestType (org.apache.cxf.xkms.model.xkms.RegisterRequestType)1 RegisterResultType (org.apache.cxf.xkms.model.xkms.RegisterResultType)1