Configuring service encapsulation

View: New views
13 Messages — Rating Filter:   Alert me  

Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm trying to set up a configuration for mule that does not appear to be trivial. I've gone through all the messaging style descriptions and tutorials and still haven't figured it out. Basically what I want is to get some "service encapsulation" that I'm not getting.

I want to call a number of services using multicast routing and then to have each of them call a number of other services in a chaining-router and then that the resulting message of those chains are returned asynchronously to the reply-to address. But regardless of what I do, the service that is called by the multicasting-router always returns the asynch message when the *first* service in the chain returns, and not when the last one returns...

How can I call a series of services in chain so that the asynch message comes from the last service in the chain?

Thanks!
João

Parent Message unknown Re: Configuring service encapsulation

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It could be that you need to strip replyTo headers, a message-properties-transformer can help.

Andrew

On Jun 9, 2009 9:57 AM, "n4d4br0v1tchk4" <n4d4br0v1tchk4@...> wrote:


Hi all,

I'm trying to set up a configuration for mule that does not appear to be
trivial. I've gone through all the messaging style descriptions and
tutorials and still haven't figured it out. Basically what I want is to get
some "service encapsulation" that I'm not getting.

I want to call a number of services using multicast routing and then to have
each of them call a number of other services in a chaining-router and then
that the resulting message of those chains are returned asynchronously to
the reply-to address. But regardless of what I do, the service that is
called by the multicasting-router always returns the asynch message when the
*first* service in the chain returns, and not when the last one returns...

How can I call a series of services in chain so that the asynch message
comes from the last service in the chain?

Thanks!
João
--
View this message in context: http://www.nabble.com/Configuring-service-encapsulation-tp23947021p23947021.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by antoine.borg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One other thing to focus on - if you're using the multicasting router,
you are sending the same message to each endpoint. Is this router
configured to do so synchronously or asynchronously? If asynchronously,
then you may get any response from either service first.

A

Andrew Perepelytsya wrote:

>
> It could be that you need to strip replyTo headers, a
> message-properties-transformer can help.
>
> Andrew
>
>> On Jun 9, 2009 9:57 AM, "n4d4br0v1tchk4" <n4d4br0v1tchk4@...
>> <mailto:n4d4br0v1tchk4@...>> wrote:
>>
>>
>> Hi all,
>>
>> I'm trying to set up a configuration for mule that does not appear to be
>> trivial. I've gone through all the messaging style descriptions and
>> tutorials and still haven't figured it out. Basically what I want is
>> to get
>> some "service encapsulation" that I'm not getting.
>>
>> I want to call a number of services using multicast routing and then
>> to have
>> each of them call a number of other services in a chaining-router and
>> then
>> that the resulting message of those chains are returned asynchronously to
>> the reply-to address. But regardless of what I do, the service that is
>> called by the multicasting-router always returns the asynch message
>> when the
>> *first* service in the chain returns, and not when the last one
>> returns...
>>
>> How can I call a series of services in chain so that the asynch message
>> comes from the last service in the chain?
>>
>> Thanks!
>> João
>> --
>> View this message in context:
>> http://www.nabble.com/Configuring-service-encapsulation-tp23947021p23947021.html
>> Sent from the Mule - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>

--

Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

email: _antoine.borg_@... <mailto:antoine.borg@...> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,
Thanks for your input, but I think I might have not been completely understood... Here's the situation, even without multicast routers... Basically what I want is this execution:
entry-point-service -> generic-service -> generic-service-component-1 -> generic-service-component-2 -> output-service
Of course that in this case I can chain them all, but if I use multicast routers I can't, so bear with this simplification for making my point.

       <service name="entry-point-service">
            <inbound>
                <stdio:inbound-endpoint system="IN" synchronous="false"/>
            </inbound>
            <outbound>
                <chaining-router>
                <vm:outbound-endpoint path="generic-service-in" synchronous="true"/>
                <vm:outbound-endpoint path="output-service-in"/>
                </chaining-router>
            </outbound>
       </service>
       
       <service name="generic-service">
        <inbound>
        <vm:inbound-endpoint path="generic-service-in" synchronous="true"/>
        </inbound>
        <outbound>
        <chaining-router>
        <vm:outbound-endpoint path="generic-service-component-1"/>
                   <vm:outbound-endpoint path="generic-service-component-2" transformer-refs="ToString"/>
        </chaining-router>
        </outbound>
       </service>
       
        <service name="output-service">
            <inbound>
                <vm:inbound-endpoint path="output-service-in" transformer-refs="ToString"/>
            </inbound>
            <outbound>
                <pass-through-router>
                    <stdio:outbound-endpoint system="OUT"/>
                </pass-through-router>
            </outbound>
        </service>

Both "generic-service-component-1" and "generic-service-component-2" are services with no outbound routers. The services work, I tested them on a simple chaining router.

This configuration throws me an error, because after "generic-service-component-2", the message is unroutable (from the logs). "generic-service" does not reply the result of "generic-service-component-2" back to the "entry-point-service", despite de synchronous tags. So I changed "entry-point-service" oubound router to this:

                <chaining-router>
                <vm:outbound-endpoint path="generic-service-in" synchronous="true"/>
                <reply-to address="vm://output-service-in"/>
                </chaining-router>

Now what happens is that "output-service" is called right after "generic-service-component-1" completes, and "generic-service-component-2" throws an exception because it fails to get the message:
1. Attempted read on closed stream. (java.io.IOException)

What I need is to learn how to write a synchronous service that has a chaining router and at the *end* replies back to the previous service router or to some reply-to address.

Thanks!
João

antoine.borg wrote:
One other thing to focus on - if you're using the multicasting router,
you are sending the same message to each endpoint. Is this router
configured to do so synchronously or asynchronously? If asynchronously,
then you may get any response from either service first.

A

Andrew Perepelytsya wrote:
>
> It could be that you need to strip replyTo headers, a
> message-properties-transformer can help.
>
> Andrew
>
>> On Jun 9, 2009 9:57 AM, "n4d4br0v1tchk4" <n4d4br0v1tchk4@hotmail.com
>> <mailto:n4d4br0v1tchk4@hotmail.com>> wrote:
>>
>>
>> Hi all,
>>
>> I'm trying to set up a configuration for mule that does not appear to be
>> trivial. I've gone through all the messaging style descriptions and
>> tutorials and still haven't figured it out. Basically what I want is
>> to get
>> some "service encapsulation" that I'm not getting.
>>
>> I want to call a number of services using multicast routing and then
>> to have
>> each of them call a number of other services in a chaining-router and
>> then
>> that the resulting message of those chains are returned asynchronously to
>> the reply-to address. But regardless of what I do, the service that is
>> called by the multicasting-router always returns the asynch message
>> when the
>> *first* service in the chain returns, and not when the last one
>> returns...
>>
>> How can I call a series of services in chain so that the asynch message
>> comes from the last service in the chain?
>>
>> Thanks!
>> João
>> --
>> View this message in context:
>> http://www.nabble.com/Configuring-service-encapsulation-tp23947021p23947021.html
>> Sent from the Mule - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>

--

Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM

See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/

email: _antoine.borg_@ricston.com <mailto:antoine.borg@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Configuring service encapsulation

by Richard Swart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The last endpoint in a chaining router is called a-synchronous, so one solution is to put synchronous=true on the last outbound-endpoint in the chain:

<service name="generic-service">
<inbound>
<vm:inbound-endpoint path="generic-service-in"
synchronous="true"/>
</inbound>
<outbound>
<chaining-router>
<vm:outbound-endpoint path="generic-service-component-1"/>
<vm:outbound-endpoint
path="generic-service-component-2" transformer-refs="ToString" *synchronous="true"*/>
</chaining-router>
</outbound>
</service>

You may also have to add synchronous=true on the inbound endpoints of your generic-service-component-1 and 2.


HTH, otherwise let me know.

Regards,
Mario Klaver

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You were absolutely right Mario! Thanks for the tip, it works!
For the multicast case, only with one endpoint, also seems to be working! :)

João

Mario Klaver wrote:
The last endpoint in a chaining router is called a-synchronous, so one solution is to put synchronous=true on the last outbound-endpoint in the chain:

<service name="generic-service">
<inbound>
<vm:inbound-endpoint path="generic-service-in"
synchronous="true"/>
</inbound>
<outbound>
<chaining-router>
<vm:outbound-endpoint path="generic-service-component-1"/>
<vm:outbound-endpoint
path="generic-service-component-2" transformer-refs="ToString" *synchronous="true"*/>
</chaining-router>
</outbound>
</service>

You may also have to add synchronous=true on the inbound endpoints of your generic-service-component-1 and 2.


HTH, otherwise let me know.

Regards,
Mario Klaver

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The plot thickens...
I now have tried to switch for multicast. Now I have 2 identical generic-services - one calls 2 other components and the other 3, only having synchronous at the last one. generic-service1 is provided as example. The multicast configuration is as follows:

<service name="entry-point-service">
<inbound>
<stdio:inbound-endpoint system="IN" synchronous="false"/>
</inbound>
<outbound>
<multicasting-router>
<vm:outbound-endpoint path="generic-service1-in"/>
<vm:outbound-endpoint path="generic-service2-in"/>
<reply-to address="vm://output-service-in" />
</multicasting-router>
</outbound>
</service>

<service name="generic-service1">
<inbound>
<vm:inbound-endpoint path="generic-service1-in"/>
</inbound>
<outbound>
<chaining-router>
<vm:outbound-endpoint path="generic-service-component-1"/>
<vm:outbound-endpoint path="generic-service-component-2" transformer-refs="ToString" synchronous="true"/>
</chaining-router>
</outbound>
</service>

<service name="output-service">
<inbound>
<vm:inbound-endpoint path="output-service-in" transformer-refs="ToString"/>
</inbound>
<outbound>
<pass-through-router>
<stdio:outbound-endpoint system="OUT"/>
</pass-through-router>
</outbound>
</service>

What happens? Sometimes it works, sometimes it doesn't, and sometimes it works while throwing a number of exceptions... From what I can understand, a lot of null messages are being passed along.
Any suggestions? I'm close to desperation right now :(
BR,
João


You were absolutely right Mario! Thanks for the tip, it works!
For the multicast case, only with one endpoint, also seems to be working! :)

João

Mario Klaver wrote:
The last endpoint in a chaining router is called a-synchronous, so one solution is to put synchronous=true on the last outbound-endpoint in the chain:

<service name="generic-service">
<inbound>
<vm:inbound-endpoint path="generic-service-in"
synchronous="true"/>
</inbound>
<outbound>
<chaining-router>
<vm:outbound-endpoint path="generic-service-component-1"/>
<vm:outbound-endpoint
path="generic-service-component-2" transformer-refs="ToString" *synchronous="true"*/>
</chaining-router>
</outbound>
</service>

You may also have to add synchronous=true on the inbound endpoints of your generic-service-component-1 and 2.


HTH, otherwise let me know.

Regards,
Mario Klaver

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by Richard Swart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi João,

Don't give up, you are almost there ;-)

First, I don't know if you made a typo but I miss the synchronous=true on the inbound endpoint of generic-service1.

Second, have you tried to set the synchronous=true on the outbound-endpoints of the multicasting-router? If these are set to synchronous then each endpoint processes the original message sequentially, and the results are collected into a single reply and then sent to the reply-to address. If this works you can go one step further and let the endpoints process the message simultaneously by setting the endpoints to asynchronous (synchronous="false").

Good luck

Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Mario,

I tried your suggestions, but no effect. Meanwhile, I found out my exceptions were just transformers and my debug wrongly handling the exceptions. I have re-added the synchronous=true on the inbound endpoint of the generic-services (i had removed it in one of the attempts to make it work) but with no effect. Anyway, it stays.
Also tried synchronous outbound endpoints at the multicast router and i get the same. In order to find out what the same is, i coded a custom router (CustomRouter) and added a debug transformer (MessagePrinter) to the reply-to inbound endpoint. What happens i can now see it's always the same. Here it is in sequence:

* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a generic-service1 message
* MessagePrinter receives an equal generic-service1 message from another dispatcher
* CustomRouter identifies both messages as generic-service1 messages but fails since he has no generic-service2 message
* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a generic-service2 message
* MessagePrinter receives an equal generic-service2 message

I dont understand why the CustomRouter does not wait for the generic-service2 message!

I tried different times and sometimes the order changes: the generic-service2 message is received (and correcly processed) first, and generic-service1 message comes late and is ignored by the CustomRouter. This only happens when the outbound endpoints on the multicast router are *not* synchronous - if they are is always generic-service1 message first as you would expect.

Tried to change the enableCorrelation value on the multicasting router with no apparent effect. Also tried the async-reply timeout set to 3 different values (1000, 3000 and 5000) with also no efect.

I think I'm almost there but I really need to get this to work asap :\

Thanks and cheers,
João

Mario Klaver wrote:
Hi João,

Don't give up, you are almost there ;-)

First, I don't know if you made a typo but I miss the synchronous=true on the inbound endpoint of generic-service1.

Second, have you tried to set the synchronous=true on the outbound-endpoints of the multicasting-router? If these are set to synchronous then each endpoint processes the original message sequentially, and the results are collected into a single reply and then sent to the reply-to address. If this works you can go one step further and let the endpoints process the message simultaneously by setting the endpoints to asynchronous (synchronous="false").

Good luck

Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh, yeah, just to be sure, here is the new part of the configuration with the Printer and Router:

           <outbound>
                <multicasting-router>
                <vm:outbound-endpoint path="generic-service1-in" synchronous="true"/>
                <vm:outbound-endpoint path="generic-service2-in"  synchronous="true"/>
                <reply-to address="vm://aggregator-async" />
                </multicasting-router>
            </outbound>
           
            <async-reply timeout="3000">
                <vm:inbound-endpoint path="aggregator-async" transformer-refs="MessagePrinter" />
                <custom-async-reply-router class="my.package.CustomRouter" />
            </async-reply>


Hey Mario,

I tried your suggestions, but no effect. Meanwhile, I found out my exceptions were just transformers and my debug wrongly handling the exceptions. I have re-added the synchronous=true on the inbound endpoint of the generic-services (i had removed it in one of the attempts to make it work) but with no effect. Anyway, it stays.
Also tried synchronous outbound endpoints at the multicast router and i get the same. In order to find out what the same is, i coded a custom router (CustomRouter) and added a debug transformer (MessagePrinter) to the reply-to inbound endpoint. What happens i can now see it's always the same. Here it is in sequence:

* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a generic-service1 message
* MessagePrinter receives an equal generic-service1 message from another dispatcher
* CustomRouter identifies both messages as generic-service1 messages but fails since he has no generic-service2 message
* MessagePrinter receives a org.mule.transport.http.ReleasingInputStream message
* CustomRouter fails to get the 2 expected messages
* MessagePrinter receives a generic-service2 message
* MessagePrinter receives an equal generic-service2 message

I dont understand why the CustomRouter does not wait for the generic-service2 message!

I tried different times and sometimes the order changes: the generic-service2 message is received (and correcly processed) first, and generic-service1 message comes late and is ignored by the CustomRouter. This only happens when the outbound endpoints on the multicast router are *not* synchronous - if they are is always generic-service1 message first as you would expect.

Tried to change the enableCorrelation value on the multicasting router with no apparent effect. Also tried the async-reply timeout set to 3 different values (1000, 3000 and 5000) with also no efect.

I think I'm almost there but I really need to get this to work asap :\

Thanks and cheers,
João

Mario Klaver wrote:
Hi João,

Don't give up, you are almost there ;-)

First, I don't know if you made a typo but I miss the synchronous=true on the inbound endpoint of generic-service1.

Second, have you tried to set the synchronous=true on the outbound-endpoints of the multicasting-router? If these are set to synchronous then each endpoint processes the original message sequentially, and the results are collected into a single reply and then sent to the reply-to address. If this works you can go one step further and let the endpoints process the message simultaneously by setting the endpoints to asynchronous (synchronous="false").

Good luck

Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by Richard Swart :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

João,

Hereby a working config file for your problem. I must say I didn't get it working with the replyTo in the multicasting router. Therefore I had to set synchronous=true on the endpoints of the multicasting-router. To send the response of the 'startpoint' service to the output-service-in, I used another chaining-router. For test purposes I created a component nl.endpoint.component.WrapMessageWithTag, which just wraps the message with an XML tag. In the example below I left out generic-service-component-2 through 4, but these are equivalent with generic-service-component-1.

<stdio:connector name="stdioConnector" promptMessage="Enter text"/>
   
   <model name="Test">
     
      <service name="entry-point-service">
         <inbound>
            <stdio:inbound-endpoint system="IN"
               synchronous="false" connector-ref="stdioConnector"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="startpoint" />
               <vm:outbound-endpoint path="output-service-in" synchronous="true"/>
            </chaining-router>
         </outbound>
      </service>

     <service name="startpoint">
         <inbound>
            <vm:inbound-endpoint path="startpoint" synchronous="true"/>
         </inbound>
         <outbound>
            <multicasting-router>
               <vm:outbound-endpoint path="generic-service1-in" synchronous="true"/>
               <vm:outbound-endpoint path="generic-service2-in" synchronous="true"/>
            </multicasting-router>
         </outbound>
      </service>
     
      <service name="generic-service1">
         <inbound>
            <vm:inbound-endpoint path="generic-service1-in"  synchronous="true"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="generic-service-component-1"  />
               <vm:outbound-endpoint path="generic-service-component-2" synchronous="true" />
            </chaining-router>
         </outbound>
      </service>

      <service name="generic-service2">
         <inbound>
            <vm:inbound-endpoint path="generic-service2-in" synchronous="true"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="generic-service-component-3"  />
               <vm:outbound-endpoint path="generic-service-component-4" synchronous="true" />
            </chaining-router>
         </outbound>
      </service>

      <service name="output-service">
         <inbound>
            <vm:inbound-endpoint path="output-service-in" />
         </inbound>
         <outbound>
            <pass-through-router>
               <stdio:outbound-endpoint system="OUT" />
            </pass-through-router>
         </outbound>
      </service>

      <service name="generic-service-component-1">
         <inbound>
            <vm:inbound-endpoint path="generic-service-component-1" synchronous="true"/>
         </inbound>
         <component >
           <singleton-object class="nl.endpoint.component.WrapMessageWithTag">
               <property key="tag" value="generic-service-component-1"/>
           </singleton-object>
         </component>
      </service>

   </model>

Regards,
Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Configuring service encapsulation

by n4d4br0v1tchk4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you again :) it works!
My final challenge is to build a Splitter that sends one of the resulting messages back, and the other to a certain endpoint! Off to implementing my AbstractMessageSplitter.

Thx again Mario. Cheers.

Mario Klaver wrote:
João,

Hereby a working config file for your problem. I must say I didn't get it working with the replyTo in the multicasting router. Therefore I had to set synchronous=true on the endpoints of the multicasting-router. To send the response of the 'startpoint' service to the output-service-in, I used another chaining-router. For test purposes I created a component nl.endpoint.component.WrapMessageWithTag, which just wraps the message with an XML tag. In the example below I left out generic-service-component-2 through 4, but these are equivalent with generic-service-component-1.

<stdio:connector name="stdioConnector" promptMessage="Enter text"/>
   
   <model name="Test">
     
      <service name="entry-point-service">
         <inbound>
            <stdio:inbound-endpoint system="IN"
               synchronous="false" connector-ref="stdioConnector"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="startpoint" />
               <vm:outbound-endpoint path="output-service-in" synchronous="true"/>
            </chaining-router>
         </outbound>
      </service>

     <service name="startpoint">
         <inbound>
            <vm:inbound-endpoint path="startpoint" synchronous="true"/>
         </inbound>
         <outbound>
            <multicasting-router>
               <vm:outbound-endpoint path="generic-service1-in" synchronous="true"/>
               <vm:outbound-endpoint path="generic-service2-in" synchronous="true"/>
            </multicasting-router>
         </outbound>
      </service>
     
      <service name="generic-service1">
         <inbound>
            <vm:inbound-endpoint path="generic-service1-in"  synchronous="true"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="generic-service-component-1"  />
               <vm:outbound-endpoint path="generic-service-component-2" synchronous="true" />
            </chaining-router>
         </outbound>
      </service>

      <service name="generic-service2">
         <inbound>
            <vm:inbound-endpoint path="generic-service2-in" synchronous="true"/>
         </inbound>
         <outbound>
            <chaining-router>
               <vm:outbound-endpoint path="generic-service-component-3"  />
               <vm:outbound-endpoint path="generic-service-component-4" synchronous="true" />
            </chaining-router>
         </outbound>
      </service>

      <service name="output-service">
         <inbound>
            <vm:inbound-endpoint path="output-service-in" />
         </inbound>
         <outbound>
            <pass-through-router>
               <stdio:outbound-endpoint system="OUT" />
            </pass-through-router>
         </outbound>
      </service>

      <service name="generic-service-component-1">
         <inbound>
            <vm:inbound-endpoint path="generic-service-component-1" synchronous="true"/>
         </inbound>
         <component >
           <singleton-object class="nl.endpoint.component.WrapMessageWithTag">
               <property key="tag" value="generic-service-component-1"/>
           </singleton-object>
         </component>
      </service>

   </model>

Regards,
Mario

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: Configuring service encapsulation

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would have the splitter do what it has to - split. Then you can forward the results and use filtering router (filter on payload type).

HTH,
Andrew

On Jul 2, 2009 7:40 AM, "n4d4br0v1tchk4" <n4d4br0v1tchk4@...> wrote:


Thank you again :) it works!
My final challenge is to build a Splitter that sends one of the resulting
messages back, and the other to a certain endpoint! Off to implementing my
AbstractMessageSplitter.

Thx again Mario. Cheers.

Mario Klaver wrote: > > João, > > Hereby a working config file for your problem. I must say I di...

--
View this message in context: http://www.nabble.com/Configuring-service-encapsulation-tp23947021p24305273.html

Sent from the Mule - User mailing list archive at Nabble.com. ------------------------------------...

To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email