Examples of ErrorCode


Examples of org.apache.hello_world_soap_http.types.ErrorCode

        verifyMAPs();
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.apache.hello_world_soap_http.types.ErrorCode

        /* not called */
    }
   

    public void testDocLitFault(String faultTypethrows BadRecordLitFault, NoSuchCodeLitFault {
        ErrorCode ec = new ErrorCode();
        ec.setMajor((short)1);
        ec.setMinor((short)1);
        NoSuchCodeLit nscl = new NoSuchCodeLit();
        nscl.setCode(ec);
       
        throw new NoSuchCodeLitFault("TestException", nscl);
    }
View Full Code Here

Examples of org.apache.hello_world_soap_http.types.ErrorCode

        verifyMAPs();
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.apache.hello_world_soap_http.types.ErrorCode

        verifyMAPs();
        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
            throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault");
        }
        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

Examples of org.apache.qpid.ErrorCode

            }

            @Override public void connectionClose(Channel context, ConnectionClose connectionClose)
            {
                super.connectionClose(context, connectionClose);
                ErrorCode errorCode = ErrorCode.get(connectionClose.getReplyCode().getValue());
                if (_closedListner == null && errorCode != ErrorCode.NO_ERROR)
                {
                    throw new RuntimeException
                        (new QpidException("Server closed the connection: Reason " +
                                           connectionClose.getReplyText(),
View Full Code Here

Examples of org.apache.solr.common.SolrException.ErrorCode

        if (solrException.getCause() != null
            && ClassUtils.getShortName(solrException.getCause().getClass()).equalsIgnoreCase("ParseException")) {
          return new InvalidDataAccessApiUsageException((solrException.getCause()).getMessage(),
              solrException.getCause());
        } else {
          ErrorCode errorCode = SolrException.ErrorCode.getErrorCode(solrException.code());
          switch (errorCode) {
            case NOT_FOUND:
            case SERVICE_UNAVAILABLE:
            case SERVER_ERROR:
              return new DataAccessResourceFailureException(solrException.getMessage(), solrException);
View Full Code Here

Examples of org.apache.sqoop.common.ErrorCode

    HttpServletResponse response = ctx.getResponse();
    setContentType(response);
    setHeaders(response, SqoopResponseCode.SQOOP_2000);

    if (ex != null) {
      ErrorCode ec = null;
      if (ex instanceof SqoopException) {
        ec = ((SqoopException) ex).getErrorCode();
      } else {
        ec = CoreError.CORE_0000;
      }

      response.setHeader(
          SqoopProtocolConstants.HEADER_SQOOP_INTERNAL_ERROR_CODE,
          ec.getCode());

      response.setHeader(
          SqoopProtocolConstants.HEADER_SQOOP_INTERNAL_ERROR_MESSAGE,
          ex.getMessage());
View Full Code Here

Examples of org.apache.ws.resource.faults.ErrorCode

      }

      m_name          = bfe.getName(  );
      m_timestamp     = bfe.getTimestamp(  );
      m_originator    = bfe.getOriginator(  );
      ErrorCode errorCode = bfe.getErrorCode(  );
      if ( errorCode != null )
      {
         try
         {
            m_errorCode =
               new _BaseFaultType_ErrorCode( toMessageElements( errorCode.getContent(  ) ),
                                             new URI( errorCode.getDialect(  ).toString(  ) ) );
         }
         catch ( URI.MalformedURIException murie )
         {
            throw new RuntimeException( murie );
         }
View Full Code Here

Examples of org.apache.ws.resource.faults.ErrorCode

    * @return  Axis-generated _BaseFaultType_ErrorCode
    */
   private static BaseFaultTypeErrorCode toAxisErrorCode( BaseFaultException base_fault )
   {
      BaseFaultTypeErrorCode axis_error_code = new BaseFaultTypeErrorCode(  );
      ErrorCode                error_code = base_fault.getErrorCode(  );

      if ( error_code != null )
      {
         SOAPElement[]    base_fault_errors = error_code.getContent(  );

         MessageElement[] error_elems = new MessageElement[base_fault_errors.length];

         for ( int i = 0; i < base_fault_errors.length; i++ )
         {
            error_elems[i] = (MessageElement) base_fault_errors[i];
         }

         axis_error_code.set_any( error_elems );

         try
         {
            axis_error_code.setDialect( AxisUtils.toAxisURI( error_code.getDialect(  ) ) );
         }
         catch ( URI.MalformedURIException e )
         {
            throw new RuntimeException( e );
         }
View Full Code Here

Examples of org.dedeler.template.exception.ErrorCode

  @ExceptionHandler(AccessDeniedException.class)
  public @ResponseBody
  Result handleException(AccessDeniedException exception, Locale locale) {
    exception.printStackTrace();
    ErrorCode errorCode = ErrorCode.ACCESS_DENIED;
    logger.error("AccessDeniedException occured", exception);
    return (new Builder(false)).message(messageHelper.getMessage(errorCode, locale)).errorCode(errorCode).build();
  }
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.