Package com.ibm.sbt.services.client.ClientService

Examples of com.ibm.sbt.services.client.ClientService.Args


            String path = request.getParameter("path");

            // DropboxFiles Service - https://api-content.dropbox.com/<version>/files/dropbox/<path>
            DropboxService svc = new DropboxService(buildHref(path, bean));
            BasicHttpResponse httpResp = null;
            Args args = new Args();
            try {
                httpResp = (BasicHttpResponse) svc.get(args).getData();
            } catch (ClientServicesException e) {
                throw new FacesExceptionEx(e, "Failed to execute proxy request");
            }
View Full Code Here


    return PathUtil.concat(baseUrl, serviceUrl, '/');
  }

  private void xhr(HttpServletRequest request, HttpServletResponse response, String serviceUrl, Map<String, String[]> parameters, Map<String, String> headers, Content content, Handler format)
      throws ClientServicesException, ClientProtocolException, IOException, ServletException, URISyntaxException {
    Args args = new Args();
    args.setServiceUrl(serviceUrl);
    args.setHandler(format);
    args.setHeaders(headers);

    String smethod = request.getMethod();
    HttpRequestBase method = createMethod(smethod, new URI(composeRequestUrl(args, parameters)), request);
    DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
    if (endpoint.isForceTrustSSLCertificate()) {
      defaultHttpClient = SSLUtil.wrapHttpClient(defaultHttpClient);
    }
    if (endpoint.isForceDisableExpectedContinue()) {
      defaultHttpClient.getParams().setParameter(
          CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
    }
    endpoint.initialize(defaultHttpClient);

    for (Map.Entry<String, String> e : args.getHeaders().entrySet()) {
      String headerName = e.getKey();
      String headerValue = e.getValue();
      method.addHeader(headerName, headerValue);
    }
    if (content != null) {
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.ClientService.Args

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.