Package com.ibm.sbt.services.client

Examples of com.ibm.sbt.services.client.ClientServicesException


   public Response<T> checkResponseCode(int expectedCode) throws ClientServicesException {
     if (response != null && getResponse() != null && getRequest()!=null) {
       if (getResponse().getStatusLine() != null && getResponse().getStatusLine().getStatusCode() == expectedCode) {
         return this;
       } else {
         throw new ClientServicesException(getResponse(), getRequest());
       }
     } else {
       throw new ClientServicesException(null, "Response is null");
     }
   }
View Full Code Here


      } catch (BssException be) {
        JsonJavaObject jsonObject = be.getResponseJson();
        if (jsonObject != null) {
          fail("Error creating subscription because: "+jsonObject);
        } else {
          ClientServicesException cse = getClientServicesException(be);
          if (cse != null) {
            fail("Error creating subscription because: "+
              cse.getResponseStatusCode() + " " +
              cse.getReasonPhrase() + " " +
              cse.getResponseBody());
          } else {
            be.printStackTrace();
            fail("Error creating subscription because: "+be.getMessage());
          }
        }
View Full Code Here

  protected T parseContent() throws ClientServicesException {
    try {
      T data = (T)handler.parseContent(null, response, response.getEntity());
      return data;
    } catch (IOException e) {
      throw new ClientServicesException(e);
    }

  }
View Full Code Here

                readFromStore();
                u = getUser();
            }
            return u;
        } catch(AuthenticationException ex) {
            throw new ClientServicesException(ex);
        }
    }
View Full Code Here

            if(StringUtil.isEmpty(u)) {
                return readFromStore();
            }
            return true;
        } catch(AuthenticationException ex) {
            throw new ClientServicesException(ex);
        }
    }
View Full Code Here

                  authPage = PathUtil.concat(authPage,redirectUrl,'=');
                  context.sendRedirect(authPage);
                      
                   
              } catch (IOException e) {
                throw new ClientServicesException(null,"Authentication page not found. Could not redirect to login page");
              }
            } else {
              throw new ClientServicesException(null,"Authentication page is empty in the basic authentication bean");
            }
        }
    }
View Full Code Here

      // XSPContext ctx =
      // XSPContext.getXSPContext(FacesContext.getCurrentInstance());
      try {
        context.sendRedirect(nextPage);
      } catch (IOException e) {
        throw new ClientServicesException(e,"Error redirecting to the following URL"+nextPage);
      }
    }
    }
View Full Code Here

      try {
        return getEntity(requestUrl, parameters, getAtomFeedHandler(false));
      } catch (ClientServicesException e) {
        throw e;
      } catch (Exception e) {
        throw new ClientServicesException(e);
      }
    }
View Full Code Here

      try {
        return getEntity(requestUrl, parameters, getJsonFeedHandler("."));
      } catch (ClientServicesException e) {
        throw e;
      } catch (Exception e) {
        throw new ClientServicesException(e);
      }
    }
View Full Code Here

   * @throws FileServiceException
   */
  public String getDownloadUrl() throws ClientServicesException {
    FileService service = getService();
    if (null == service){
      throw new ClientServicesException(new Exception("FileService not defined"));
    }
    String proxypath = getService().getEndpoint().getProxyPath("connections");
    String fileId = getFileId();
    String libId = getLibraryId();
    HttpServletRequest req = Context.get().getHttpRequest();
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.ClientServicesException

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.