Examples of MessageContext

  • org.springframework.binding.message.MessageContext
    A context for recording and retrieving messages for display.
  • org.springframework.ws.context.MessageContext
    Context holder for message requests.

    Contains both the message request as well as the response. Response message are usually lazily created (but do not have to be).

    Also contains properties, which can be used to by {@link EndpointInterceptor interceptors} to pass information on toendpoints. @author Arjen Poutsma @since 1.0.0

  • xsul.message_router.MessageContext

  • Examples of org.jibx.ws.context.MessageContext

        /**
         * {@inheritDoc}
         */
        public void invoke(OutConnection oconn, InConnection iconn) throws IOException, WsException {
            MessageContext msgCtx = m_exchangeCtx.getCurrentMessageContext();
            while (msgCtx != null) {
                if (msgCtx.isOutbound()) {
                    sendMessage(oconn);
                } else {
                    receiveMessage(iconn);
                }
                m_exchangeCtx.switchMessageContext();
    View Full Code Here

    Examples of org.jibx.ws.context.MessageContext

                args = new Object[m_idxs.m_paramCount];
                if (m_idxs.m_payloadIndex != -1) {
                    args[m_idxs.m_payloadIndex] = payload;
                }
                if (m_idxs.m_inContextIndex != -1) {
                    MessageContext currentContext = processor.getCurrentMessageContext();
                    if (!(currentContext instanceof InContext)) {
                        throw new WsException(
                            "Error - attempt to invoke operation when current context is not an InContext");
                    }
                    args[m_idxs.m_inContextIndex] = currentContext;
                }
                if (m_idxs.m_outContextIndex != -1) {
                    MessageContext nextContext = processor.getNextMessageContext();
                    if (!(nextContext instanceof OutContext)) {
                        throw new WsException(
                            "Error - attempt to invoke 2-way operation when next message context is not an OutContext");
                    }
                    args[m_idxs.m_outContextIndex] = nextContext;
    View Full Code Here

    Examples of org.jibx.ws.context.MessageContext

       
        /**
         * {@inheritDoc}
         */
        public void invoke(OutConnection oconn, InConnection iconn) throws IOException, WsException {
            MessageContext msgCtx = m_exchangeCtx.getCurrentMessageContext();
            while (msgCtx != null) {
                if (msgCtx.isOutbound()) {
                    sendMessage(oconn);
                } else {
                    receiveMessage(iconn);
                }
                m_exchangeCtx.switchMessageContext();
    View Full Code Here

    Examples of org.kurron.foundation.MessageContext

                try
                {
                    final LoggingEvent event = theQueue.poll( 1, TimeUnit.SECONDS );
                    if( null != event )
                    {
                        final MessageContext context = event.getContext();
                        final Formatter format = new Formatter().format( context.template(), event.getArguments() );
                        final String completeMessage = format.toString();
                        final Logger logger = LoggerFactory.getLogger( event.getComponentId() );
                        MDC.put( "instanceId", event.getInstanceId() );
                        MDC.put( "major", Integer.toString( context.getMajorCode() ) );
                        MDC.put( "minor", Integer.toString( context.getMinorCode() ) );
                        sendMessageToLogger( context, completeMessage, logger );
                        MDC.clear();
                    }
                }
                catch( InterruptedException e )
    View Full Code Here

    Examples of org.mule.el.context.MessageContext

        @Override
        public Object call(Object[] params, ExpressionLanguageContext context)
        {
            validateParams(params);

            final MessageContext ctx = context.getVariable("message");
            final String xpathExpression = getXpathExpression(params);
            final XPathReturnType returnType = getReturnType(params);
            final MuleEvent event = getMuleEvent(context);
            final Object input = getInput(params, event);

            try
            {
                Node node = toDOMNode(input, event);
                Object result = xpathEvaluatorSupplier.get().evaluate(xpathExpression, node, returnType, event);

                MuleMessage message = event.getMessage();
                if (input == message.getPayload() && ((DefaultMuleMessage) message).isConsumable())
                {
                    ctx.setPayload(node);
                }

                return result;
            }
            catch (Exception e)
    View Full Code Here

    Examples of org.springframework.binding.message.MessageContext

        public void setAmenities(Amenity amenities) {
      this.amenities = amenities;
        }

        public void validateEnterBookingDetails(ValidationContext context) {
      MessageContext messages = context.getMessageContext();
      if (checkinDate.before(today())) {
          messages.addMessage(new MessageBuilder().error().source("checkinDate").code(
            "booking.checkinDate.beforeToday").build());
      } else if (checkoutDate.before(checkinDate)) {
          messages.addMessage(new MessageBuilder().error().source("checkoutDate").code(
            "booking.checkoutDate.beforeCheckinDate").build());
      }
        }
    View Full Code Here

    Examples of org.springframework.ws.context.MessageContext

        @Test
        public void testResolveExceptionClientSoap11() throws Exception {
            MessageFactory saajFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
            SoapMessageFactory factory = new SaajSoapMessageFactory(saajFactory);
            MessageContext context = new DefaultMessageContext(factory);

            boolean result = resolver.resolveException(context, null, new MyClientException());
            Assert.assertTrue("resolveException returns false", result);
            Assert.assertTrue("Context has no response", context.hasResponse());
            SoapMessage response = (SoapMessage) context.getResponse();
            Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
            Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
            Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                    fault.getFaultCode());
            Assert.assertEquals("Invalid fault string on fault", "Client error", fault.getFaultStringOrReason());
    View Full Code Here

    Examples of xsul.message_router.MessageContext

            // /C=US/O=National Center for Supercomputing Applications/CN=LEAD
            // Community User

    //        return "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
            String userDN = null;
             MessageContext mc = xsul.xhandler_context.ServerContextAccessHandler.getContext();
            if (mc != null) {
                userDN = mc.getIncomingUserDn();
            }
           
            if(userDN == null){
                userDN = XregistryConstants.ANONYMOUS_USER;
            }
    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.