Package org.apache.wink.client

Examples of org.apache.wink.client.ClientWebException


            createClientRequest(method, responseEntity, responseEntityType, requestEntity);
        HandlerContext context = createHandlerContext();
        try {
            ClientResponse response = context.doChain(request);
            if (ClientUtils.isErrorCode(response.getStatusCode())) {
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here


        try {
            ClientResponse response = context.doChain(request);
            int statusCode = response.getStatusCode();
            if (ClientUtils.isErrorCode(statusCode)) {
                logger.info(Messages.getMessage("clientResponseIsErrorCode"), statusCode);
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here

        try {
            ClientResponse response = context.doChain(request);
            int statusCode = response.getStatusCode();
            if (ClientUtils.isErrorCode(statusCode)) {
                logger.info(Messages.getMessage("clientResponseIsErrorCode"), statusCode);
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here

            ClientResponse response = context.doChain(request);
            int statusCode = response.getStatusCode();
            if (ClientUtils.isErrorCode(statusCode)) {
                logger.trace(Messages.getMessage("clientResponseIsErrorCode", String //$NON-NLS-1$
                    .valueOf(statusCode)));
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here

        try {
            ClientResponse response = context.doChain(request);
            int statusCode = response.getStatusCode();
            if (ClientUtils.isErrorCode(statusCode)) {
                logger.debug(Messages.getMessage("clientResponseIsErrorCode", statusCode));
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here

     */
    public void delete(String id) {
        Resource resource = restClient.resource(URL + id);
        ClientResponse response = resource.delete(ClientResponse.class);
        if (response.getStatusCode() != 200) {
            throw new ClientWebException(null, response);
        }
    }
View Full Code Here

                .contentType(mapContentType(filename)).post(ClientResponse.class,
                                                            new FileInputStream(file));
        if (clientResponse.getStatusCode() == Status.CREATED.getStatusCode()) {
            return clientResponse.getHeaders().getFirst(HttpHeaders.LOCATION);
        }
        throw new ClientWebException(null, clientResponse);

    }
View Full Code Here

            ClientResponse response = context.doChain(request);
            int statusCode = response.getStatusCode();
            if (ClientUtils.isErrorCode(statusCode)) {
                logger.trace(Messages.getMessage("clientResponseIsErrorCode", String //$NON-NLS-1$
                    .valueOf(statusCode)));
                throw new ClientWebException(request, response);
            }
            return response;
        } catch (ClientWebException e) {
            throw e;
        } catch (ClientRuntimeException e) {
View Full Code Here

TOP

Related Classes of org.apache.wink.client.ClientWebException

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.