Search in sources :

Example 1 with PrimitiveTextProvider

use of org.apache.cxf.jaxrs.provider.PrimitiveTextProvider in project midpoint by Evolveum.

the class TestSchemaRestService method prepareClient.

@Override
protected WebClient prepareClient(String username, String password) {
    WebClient client = WebClient.create(ENDPOINT_ADDRESS, Arrays.asList(jsonProvider, new PrimitiveTextProvider<>()));
    ClientConfiguration clientConfig = WebClient.getConfig(client);
    clientConfig.getRequestContext().put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE);
    client.accept(MediaType.APPLICATION_JSON_TYPE);
    createAuthorizationHeader(client, username, password);
    return client;
}
Also used : PrimitiveTextProvider(org.apache.cxf.jaxrs.provider.PrimitiveTextProvider) WebClient(org.apache.cxf.jaxrs.client.WebClient) ClientConfiguration(org.apache.cxf.jaxrs.client.ClientConfiguration)

Aggregations

ClientConfiguration (org.apache.cxf.jaxrs.client.ClientConfiguration)1 WebClient (org.apache.cxf.jaxrs.client.WebClient)1 PrimitiveTextProvider (org.apache.cxf.jaxrs.provider.PrimitiveTextProvider)1