Package javax.ws.rs

Examples of javax.ws.rs.ProcessingException


     */
    public void filterRequest(ClientRequestContext request) {
        HttpAuthenticationFilter.Credentials credentials = HttpAuthenticationFilter.getCredentials(request,
                defaultCredentials, HttpAuthenticationFilter.Type.BASIC);
        if (credentials == null) {
            throw new ProcessingException(LocalizationMessages.AUTHENTICATION_CREDENTIALS_MISSING_BASIC());
        }
        request.getHeaders().add(HttpHeaders.AUTHORIZATION, calculateAuthentication(credentials));
    }
View Full Code Here


        if (authenticate != null && authenticate.trim().startsWith("Basic")) {
            HttpAuthenticationFilter.Credentials credentials = HttpAuthenticationFilter
                    .getCredentials(request, defaultCredentials, HttpAuthenticationFilter.Type.BASIC);

            if (credentials == null) {
                throw new ProcessingException(LocalizationMessages.AUTHENTICATION_CREDENTIALS_MISSING_BASIC());
            }

            return HttpAuthenticationFilter.repeatRequest(request, response, calculateAuthentication(credentials));
        }
        return false;
View Full Code Here

                });

        try {
            randomGenerator = SecureRandom.getInstance("SHA1PRNG");
        } catch (NoSuchAlgorithmException e) {
            throw new ProcessingException(LocalizationMessages.ERROR_DIGEST_FILTER_GENERATOR(), e);
        }
    }
View Full Code Here

            for (ProviderInfo<ClientResponseFilter> filter : filters) {
                InjectionUtils.injectContexts(filter.getProvider(), filter, inMessage);
                try {
                    filter.getProvider().filter(reqContext, respContext);
                } catch (IOException ex) {
                    throw new ProcessingException(ex);
                }
            }
        }
    }
View Full Code Here

            }
        } catch (Exception ex) {
            Throwable t = ex instanceof WebApplicationException
                ? (WebApplicationException)ex
                : ex instanceof ProcessingException
                ? (ProcessingException)ex : new ProcessingException(ex);
            cb.handleException(message, t);
            return;
        }
        if (r == null) {
            try {
View Full Code Here

            }
        } catch (Exception ex) {
            throw ex instanceof WebApplicationException
                ? (WebApplicationException)ex
                : ex instanceof ProcessingException
                ? (ProcessingException)ex : new ProcessingException(ex);
        }
       
        Response response = null;
        Object entity = null;
        try {
View Full Code Here

            getState().setResponse(r);
            ((ResponseImpl)r).setOutMessage(outMessage);
            return r;
        } catch (Throwable ex) {
            throw (ex instanceof ProcessingException) ? (ProcessingException)ex
                                                  : new ProcessingException(ex);
        } finally {
            ClientProviderFactory.getInstance(outMessage).clearThreadLocalProxies();
        }
    }
View Full Code Here

            return secConfig.getSslContext();
        } else if (secConfig.getTlsClientParams().getTrustManagers() != null) {
            try {
                return SSLUtils.getSSLContext(secConfig.getTlsClientParams());
            } catch (Exception ex) {
                throw new ProcessingException(ex);
            }
        } else {
            return null;
        }
    }
View Full Code Here

            KeyManagerFactory tmf =
                KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
            tmf.init(store, password);
            secConfig.getTlsClientParams().setKeyManagers(tmf.getKeyManagers());
        } catch (Exception ex) {
            throw new ProcessingException(ex);
        }
        return this;
    }
View Full Code Here

            TrustManagerFactory tmf =
                TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
            tmf.init(store);
            secConfig.getTlsClientParams().setTrustManagers(tmf.getTrustManagers());
        } catch (Exception ex) {
            throw new ProcessingException(ex);
        }
       
        return this;
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.ProcessingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.