Examples of ExceptionPayload


Examples of org.mule.api.ExceptionPayload

            {
                assertEquals(expected, result.getPayload());
            }
            else
            {
                ExceptionPayload payload = result.getExceptionPayload();
                assertNotNull(payload);
                assertTrue(payload.getException().getMessage().contains(construct));
            }
        }
    }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            fail("Was expecting a timeout");
        }
        catch (CompositeRoutingException e)
        {
            MuleEvent response = e.getEvent();
            ExceptionPayload ep = response.getMessage().getExceptionPayload();
            assertNotNull(ep);
            assertSame(e, ep.getException());

            Map<Integer, Throwable> exceptions = e.getExceptions();
            assertEquals(1, exceptions.size());
            assertTrue(exceptions.get(2) instanceof ResponseTimeoutException);
        }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            fail("Was expecting a failure");
        }
        catch (CompositeRoutingException e)
        {
            MuleEvent response = e.getEvent();
            ExceptionPayload ep = response.getMessage().getExceptionPayload();
            assertNotNull(ep);
            assertSame(e, ep.getException());

            Map<Integer, Throwable> exceptions = e.getExceptions();
            assertEquals(1, exceptions.size());
            assertTrue(exceptions.get(1) instanceof DispatchException);
        }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            try
            {
                logger.warn("Failed to read message: " + readingException);

                MuleMessage msg = new DefaultMuleMessage(NullPayload.getInstance(), getEndpoint().getMuleContext());
                ExceptionPayload exceptionPayload = new DefaultExceptionPayload(readingException);
                msg.setExceptionPayload(exceptionPayload);
                List msgList = new ArrayList(1);
                msgList.add(msg);

                handleResults(msgList);
View Full Code Here

Examples of org.mule.api.ExceptionPayload

    public void testAuthenticationNotAuthorised() throws Exception
    {
        Map<String, Object> props = createMessageProperties();
        MuleMessage reply = muleContext.getClient().send("vm://echo", "An unsigned message", props);
        assertNotNull(reply.getExceptionPayload());
        ExceptionPayload excPayload = reply.getExceptionPayload();
        assertEquals(MESSAGE_EXCEPTION, excPayload.getMessage());
    }
View Full Code Here

Examples of org.mule.api.ExceptionPayload

            } else {
                MuleMessage muleMessage = client.send(destinationEndpointUrl,
                                                      payload != null ? payload : processInstance,
                                                      null, timeout);
                if (muleMessage != null) {
                    ExceptionPayload exceptionPayload = muleMessage.getExceptionPayload();
                    if (exceptionPayload != null) {
                        logger.log(Level.SEVERE, "Mule step has failed: " + exceptionPayload.getMessage(), exceptionPayload.getException());
                        return "FAIL";
                    }
                    Object payload = muleMessage.getPayload();
                    if (payload instanceof String) {
                        return (String)payload;
View Full Code Here

Examples of org.mule.impl.message.ExceptionPayload

                    event.getEventType() == MessageExchangeEvent.OUT_FAULT_EVENT) {
                com.fs.pxe.sfwk.spi.MessageExchange me = event.getMessageExchange();
                //todo what needs to be passed in here??
                Message fault = me.lastFault(null);
                result = new MuleMessage(fault.getMessage());
                result.setExceptionPayload(new ExceptionPayload(new Exception("Failed to process PXE Bpel event. See Message payload for details: " + fault.getDescription())));

            }
            lock.countDown();

        } catch (Exception e) {
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.