logger.debug("No result was returned for sync call to: " + endpoint.getEndpointURI());
if (logger.isDebugEnabled()) { logger.debug("No result was returned for sync call to: " + endpoint.getEndpointURI()); }
    public UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException    {        List list = getRecipients(message);        List results = new ArrayList();        if(enableCorrelation != ENABLE_CORREATION_NEVER) {            boolean correlationSet = message.getCorrelationGroupSize()!=-1;            if(correlationSet && (enableCorrelation == ENABLE_CORREATION_IF_NOT_SET)) {                logger.debug("CorrelationId is already set, not setting Correlation group size");            } else {                //the correlationId will be set by the AbstractOutboundRouter                message.setCorrelationGroupSize(list.size());            }        }        UMOMessage result = null;        //synchronized(list) {        UMOEndpoint endpoint;        for (Iterator iterator = list.iterator(); iterator.hasNext();)        //for (int i =0; i < list.size(); i++)        {            String recipient = (String) iterator.next();            endpoint = getRecipientEndpoint(message, recipient);            try            {                if (synchronous)                {                    result = send(session, message, endpoint);                    if(result!=null) {                        results.add(result.getPayload());                    } else {                        logger.debug("No result was returned for sync call to: " + endpoint.getEndpointURI());                    }                } else                {                    dispatch(session, message, endpoint);                }            } catch (UMOException e)            {                throw new CouldNotRouteOutboundMessageException(message, endpoint, e);            }        }                if(results != null && results.size()==1) {            return new MuleMessage(results.get(0), ((UMOMessage)result).getProperties());        } else if(results.size()==0 ) {            return null;        }else {            return new MuleMessage(results, (result==null ? null : result.getProperties()));        }        //}    }