Examples of OpenESBClientException


Examples of net.openesb.sdk.OpenESBClientException

                    break;
                case HEAD:
                    httpRequest = new HttpHead(uri);
                    break;
                default:
                    throw new OpenESBClientException("Unknown HTTP method name: " + req.method());
            }

            if (req.headers() != null && !req.headers().isEmpty()) {
                for (Map.Entry<String, String> header : req.headers().entrySet()) {
                    httpRequest.addHeader(header.getKey(), header.getValue());
                }
            }
           
            if (authorizationToken != null) {
                httpRequest.addHeader(HttpHeaders.AUTHORIZATION, "Token " + authorizationToken);
            }

            return httpClient.execute(host, httpRequest, responseHandler);
        } catch (Exception ex) {
            //    Logger.getLogger(OpenESBClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            throw new OpenESBClientException(ex.getMessage(), ex);
        }
    }
View Full Code Here

Examples of net.openesb.sdk.OpenESBClientException

            multipartEntity.addPart(name, new FileBody(new File(archiveUrl.toURI())));

            return multipartEntity.build();
        } catch (URISyntaxException ex) {
            logger.log(Level.SEVERE, "Unable to create an HTTP entity to upload file : " + archiveUrl, ex);
            throw new OpenESBClientException("Unable to create an HTTP entity to upload file : " + archiveUrl, ex);
        }
    }
View Full Code Here

Examples of net.openesb.sdk.OpenESBClientException

        } else if (request.getHttpMethod() == HttpMethodName.DELETE) {
            httpRequest = new HttpDelete(uri);
        } else if (request.getHttpMethod() == HttpMethodName.HEAD) {
            httpRequest = new HttpHead(uri);
        } else {
            throw new OpenESBClientException("Unknown HTTP method name: " + request.getHttpMethod());
        }
       
        return httpRequest;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.