Ejemplo n.º 1
0
 // This method is used when the service invoked synchronously. It should really
 // be used independantly of if the service is invoked synchronously when we are
 // using an out-only outbound message exchange pattern
 protected MuleMessage sendToOutboundRouter(MuleEvent event, MuleMessage result)
     throws MessagingException {
   if (event.isStopFurtherProcessing()) {
     logger.debug(
         "MuleEvent stop further processing has been set, no outbound routing will be performed.");
   }
   if (result != null && !event.isStopFurtherProcessing()) {
     if (getOutboundRouter().hasEndpoints()) {
       // Here we need to use a copy of the message instance because there
       // is an inbound response so that transformers executed as part of
       // the outbound phase do not affect the inbound response. MULE-3307
       MuleMessage outboundReturnMessage =
           getOutboundRouter()
               .route(new DefaultMuleMessage(result), event.getSession(), event.isSynchronous());
       if (outboundReturnMessage != null) {
         result = outboundReturnMessage;
       }
     } else {
       logger.debug(
           "Outbound router on service '"
               + getName()
               + "' doesn't have any endpoints configured.");
     }
   }
   return result;
 }
Ejemplo n.º 2
0
 // This method is used when the service invoked asynchronously. It should really
 // be used independantly of if the service is invoked asynchronously when we are
 // using an out-in or out-optional-in outbound message exchange pattern
 protected void dispatchToOutboundRouter(MuleEvent event, MuleMessage result)
     throws MessagingException {
   if (event.isStopFurtherProcessing()) {
     logger.debug(
         "MuleEvent stop further processing has been set, no outbound routing will be performed.");
   }
   if (result != null && !event.isStopFurtherProcessing()) {
     if (getOutboundRouter().hasEndpoints()) {
       // Here we can use the same message instance because there is no inbound response.
       getOutboundRouter().route(result, event.getSession(), event.isSynchronous());
     }
   }
 }