Examples of wrapInExceptionResponse()


Examples of org.apache.olingo.odata2.core.ODataExceptionWrapper.wrapInExceptionResponse()

    context.setPathInfo(request.getPathInfo());
    context.setServiceFactory(serviceFactory);
    ODataExceptionWrapper exceptionWrapper =
        new ODataExceptionWrapper(context, request.getQueryParameters(), request.getAcceptHeaders());
    ODataResponse response =
        exceptionWrapper.wrapInExceptionResponse(new ODataNotImplementedException(messageReference));
    return RestUtil.convertResponse(response);
  }

  @OPTIONS
  public Response handleOptions() throws ODataException {
View Full Code Here

Examples of org.apache.olingo.odata2.core.ODataExceptionWrapper.wrapInExceptionResponse()

  }

  private ODataResponse handleException(final Exception exception) {
    ODataExceptionWrapper exceptionWrapper =
        new ODataExceptionWrapper(uriInfo, httpHeaders, servletConfig, servletRequest);
    ODataResponse oDataResponse = exceptionWrapper.wrapInExceptionResponse(exception);
    return oDataResponse;
  }

  private ODataResponse handleWebApplicationException(final Exception exception) throws ClassNotFoundException,
      InstantiationException, IllegalAccessException, EntityProviderException {
View Full Code Here

Examples of org.apache.olingo.odata2.core.rest.ODataExceptionWrapper.wrapInExceptionResponse()

    //
    Map<String, String> queryParameters = Collections.emptyMap();
    List<String> acceptContentTypes = Arrays.asList("text/html");
    ODataExceptionWrapper exceptionWrapper = createWrapper(context, queryParameters, acceptContentTypes);
    ODataResponse response = exceptionWrapper.wrapInExceptionResponse(new Exception());

    // verify
    assertNotNull(response);
    assertEquals(HttpStatusCodes.BAD_REQUEST.getStatusCode(), response.getStatus().getStatusCode());
    String errorMessage = (String) response.getEntity();
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.