Examples of ErrorMessage


Examples of org.jibx.ws.soap.testdata.basic.ErrorMessage

        m_inCtx.addHandler(SoapPhase.BODY_FAULT, new UnmarshallingInHandler(ErrorMessage.class));
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        expected.addDetail(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        expected.addDetail(new ErrorType("Severe"));
       
        assertEquals(expected, m_inCtx.getBody());
    }
View Full Code Here

Examples of org.jibx.ws.soap.testdata.basic.ErrorMessage

     * @throws Exception
     */
    public void testSendFaultMessageWithCustomHandlers() throws Exception {
        SoapFault fault = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format",
            "http://example.org/someactor");
        MarshallingOutHandler detail1 = new MarshallingOutHandler(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        MarshallingOutHandler detail2 = new MarshallingOutHandler(new ErrorType("Severe"));
        fault.addDetailWriter(detail1);
        fault.addDetailWriter(detail2);
        m_processor.sendFaultMessage(fault, StubbedChannel.getOutConnection());

View Full Code Here

Examples of org.jibx.ws.soap.testdata.basic.ErrorMessage

        assertEquals("Character Encoding", conn.getCharacterEncoding(), "ENC");
    }

    public void testSendFaultMessageWithCustomHandlers() throws Exception {
        SoapFault fault = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        MarshallingOutHandler detail1 = new MarshallingOutHandler(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        MarshallingOutHandler detail2 = new MarshallingOutHandler(new ErrorType("Severe"));
        fault.addDetailWriter(detail1);
        fault.addDetailWriter(detail2);
        m_OutInProcessor.sendFaultMessage(fault, StubbedChannel.getOutConnection());
View Full Code Here

Examples of org.kaminoite.ranka.kido.ipad.tools.sgf.util.ErrorMessage

        {
            useByoyomi = true;
            preByoyomi = parseTime(s.substring(0, idx));
            int idx2 = s.indexOf('/');
            if (idx2 <= idx)
                throw new ErrorMessage("Invalid time specification");
            byoyomi = parseTime(s.substring(idx + 1, idx2));
            try
            {
                byoyomiMoves = Integer.parseInt(s.substring(idx2 + 1));
            }
            catch (NumberFormatException e)
            {
                throw new ErrorMessage("Invalid specification for byoyomi"
                                       + " moves");
            }
        }
        if (preByoyomi <= 0)
            throw new ErrorMessage("Pre-byoyomi time must be positive");
        if (useByoyomi)
        {
            if (byoyomi <= 0)
                throw new ErrorMessage("Byoyomi time must be positive");
            if (byoyomiMoves <= 0)
                throw new ErrorMessage("Byoyomi moves must be positive");
            return new TimeSettings(preByoyomi, byoyomi, byoyomiMoves);
        }
        else
            return new TimeSettings(preByoyomi);
    }
View Full Code Here

Examples of org.kuali.rice.krad.util.ErrorMessage

      String principalId = document.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId();
      String initiatorPrincipalName = KimApiServiceLocator.getIdentityService().getPrincipal(principalId).getPrincipalName();
      if (isPrincipalNameInAssigneeList(matterWork, initiatorPrincipalName)) {
        return true;
      } else {
        ErrorMessage errMsg = new ErrorMessage(MartinlawConstants.MessageKeys.ERROR_NOT_ASSIGNED, initiatorPrincipalName,
                Matter.class.getSimpleName());
        errMsg.setNamespaceCode(MartinlawConstants.MODULE_NAMESPACE_CODE);
        getRulesHelper().addMatterIdError(errMsg);
        return false;
      }
    } else {
      return true;
View Full Code Here

Examples of org.modelmapper.spi.ErrorMessage

        return converter.convert(source);
    return source;
  }

  public Errors addMessage(Throwable cause, String message, Object... arguments) {
    addMessage(new ErrorMessage(format(message, arguments), cause));
    return this;
  }
View Full Code Here

Examples of org.red5.compatibility.flex.messaging.messages.ErrorMessage

   * @param faultString fault string
   * @param faultDetail fault detail
   * @return error message
   */
  public static ErrorMessage returnError(AbstractMessage request, String faultCode, String faultString, String faultDetail) {
    ErrorMessage result = new ErrorMessage();
    result.timestamp = System.currentTimeMillis();
    result.headers = request.headers;
    result.destination = request.destination;
    result.correlationId = request.messageId;
    result.faultCode = faultCode;
View Full Code Here

Examples of org.sdnplatform.sync.thrift.ErrorMessage

                         + "(" + type + ")", error);
        }
        SyncError m = new SyncError();
        m.setErrorCode(ec);
        m.setMessage(error.getMessage());
        ErrorMessage em = new ErrorMessage();
        em.setError(m);
        em.setType(type);
        AsyncMessageHeader header = new AsyncMessageHeader();
        header.setTransactionId(transactionId);
        em.setHeader(header);
        SyncMessage bsm = new SyncMessage(MessageType.ERROR);
        bsm.setError(em);
        return bsm;
    }
View Full Code Here

Examples of org.sonatype.nexus.rest.model.ErrorMessage

            String content = response.getEntity(String.class);
            if (content.contains("<nexus-error")) {
                errors = unmarshal(ErrorResponse.class, content).getErrors();
            }
            else {
                ErrorMessage msg = new ErrorMessage();
                msg.setId("unknown-error-response");
                msg.setMsg(content);
                errors = new ArrayList<ErrorMessage>(1);
                errors.add(msg);
            }

            throw new RequestFailed(status, errors);
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.error.ErrorMessage

    ErrorResponse payload = (ErrorResponse) representation.getPayload(new ErrorResponse());

    List errors = payload.getErrors();
    assertThat((Collection<?>) errors, hasSize(1));
    ErrorMessage error = (ErrorMessage) errors.get(0);
    String msg = error.getMsg();

    msg = msg.replaceAll(
        "Cannot parse '([^']*)':.*",
        "$1");

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.