You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by raulvk <ra...@gmail.com> on 2008/03/26 16:55:56 UTC

Re: Transforming request and response

Hi everyone,

I would like to recover this question since it was not answered when
originally posted and I am encountering the same escenario. (as you can see,
I have done my duty of checking for past posts ;))

I am using ServiceMix to expose services offered by heterogeneous platforms
to consumers who interact with the ESB instead of invoking the final
services directly.

However, the idea is to implement a Canonical Data Model, so that services
are agnostic of the interfaces of one another. Hence, when a consumer
invokes the ESB, it will do so in its Particular Data Model and the ESB
should transform the message into the Canonical Data Model. (could use the
pipeline pattern from servicemix-eip to achieve this).

The call should then be routed to the final destination, where there would
be another transformer that understands CDM and transforms the message to
the format understood by the final system.

If the service is synchronous, the same process should be repeated
backwards.

My first question is wheter ServiceMix is suitable for such a scenario...
And if it is, how would I achieve it?

Thanks a lot,

Raul.


Peter Klotz-2 wrote:
> 
> Hi,
> 
> a question regarding transformers, it seems that when I have a component
> that
> implements TransformComponentSupport and send a InOut ME through this
> transformer only the request is received by the onMessageExchange() but
> not the
> response.
> 
> The onMessageExchange() method is called twice, once normal and once with
> status
> DONE. but both have as content of the in an out message the content of the
> request. One never gets the response in the transformer.
> 
> Now I need to have a transformer that does an action both on the request
> and the
> response of a InOut ME, how can I do this?
> 
> req  ---> +-------+ ----> +------+
>           | trans |       | comp |
> resp <--- +-------+ <---- +------+
> 
> 
> Thanks, Peter
> 
> 

-- 
View this message in context: http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Transforming request and response

Posted by Guillaume Nodet <gn...@gmail.com>.
Camel still has some deficiencies (like no support for attachments), but
overall is much more flexible than servicemix-eip.  I would recommend trying
with camel first, but the EIP component will still be supported for a long
time.

On Wed, Mar 26, 2008 at 7:10 PM, raulvk <ra...@gmail.com> wrote:

>
> Hi Guillaume,
>
> Thanks a lot, I was aware of the pipeline pattern, but I hadn't looked at
> the static routing slip. However, would you recommend using servicemix-eip
> for this purpose instead of servicemix-camel? If you were to use
> servicemix-camel, how would you implement this pattern?
>
> (Also, can you give us some insider information as to whether
> servicemix-eip
> is going to be deprecated in favour of servicemix-camel? ;))
>
> Thanks a lot,
>
> Raúl.
>
>
>
> gnodet wrote:
> >
> > Yeah, it's totally doable using servicemix-eip + any transformation
> > (servicemix-saxon).
> > The pipeline can be used if the exchange is InOnly. but if you have a
> > reply,
> > this usually means that the exchange will be an InOut, in which case you
> > would use the eip static routing slip with the following targets:
> >    * the request transformer
> >    * the service to call
> >    * the response transformer
> > This way, the canonical transformation can be done by the two
> > transformers.
> >
> > On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
> >
> >>
> >> Hi everyone,
> >>
> >> I would like to recover this question since it was not answered when
> >> originally posted and I am encountering the same escenario. (as you can
> >> see,
> >> I have done my duty of checking for past posts ;))
> >>
> >> I am using ServiceMix to expose services offered by heterogeneous
> >> platforms
> >> to consumers who interact with the ESB instead of invoking the final
> >> services directly.
> >>
> >> However, the idea is to implement a Canonical Data Model, so that
> >> services
> >> are agnostic of the interfaces of one another. Hence, when a consumer
> >> invokes the ESB, it will do so in its Particular Data Model and the ESB
> >> should transform the message into the Canonical Data Model. (could use
> >> the
> >> pipeline pattern from servicemix-eip to achieve this).
> >>
> >> The call should then be routed to the final destination, where there
> >> would
> >> be another transformer that understands CDM and transforms the message
> to
> >> the format understood by the final system.
> >>
> >> If the service is synchronous, the same process should be repeated
> >> backwards.
> >>
> >> My first question is wheter ServiceMix is suitable for such a
> scenario...
> >> And if it is, how would I achieve it?
> >>
> >> Thanks a lot,
> >>
> >> Raul.
> >>
> >>
> >> Peter Klotz-2 wrote:
> >> >
> >> > Hi,
> >> >
> >> > a question regarding transformers, it seems that when I have a
> >> component
> >> > that
> >> > implements TransformComponentSupport and send a InOut ME through this
> >> > transformer only the request is received by the onMessageExchange()
> but
> >> > not the
> >> > response.
> >> >
> >> > The onMessageExchange() method is called twice, once normal and once
> >> with
> >> > status
> >> > DONE. but both have as content of the in an out message the content
> of
> >> the
> >> > request. One never gets the response in the transformer.
> >> >
> >> > Now I need to have a transformer that does an action both on the
> >> request
> >> > and the
> >> > response of a InOut ME, how can I do this?
> >> >
> >> > req  ---> +-------+ ----> +------+
> >> >           | trans |       | comp |
> >> > resp <--- +-------+ <---- +------+
> >> >
> >> >
> >> > Thanks, Peter
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16309920.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Transforming request and response

Posted by raulvk <ra...@gmail.com>.
Hi Guillaume,

Thanks a lot, I was aware of the pipeline pattern, but I hadn't looked at
the static routing slip. However, would you recommend using servicemix-eip
for this purpose instead of servicemix-camel? If you were to use
servicemix-camel, how would you implement this pattern? 

(Also, can you give us some insider information as to whether servicemix-eip
is going to be deprecated in favour of servicemix-camel? ;))

Thanks a lot,

Raúl.



gnodet wrote:
> 
> Yeah, it's totally doable using servicemix-eip + any transformation
> (servicemix-saxon).
> The pipeline can be used if the exchange is InOnly. but if you have a
> reply,
> this usually means that the exchange will be an InOut, in which case you
> would use the eip static routing slip with the following targets:
>    * the request transformer
>    * the service to call
>    * the response transformer
> This way, the canonical transformation can be done by the two
> transformers.
> 
> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
> 
>>
>> Hi everyone,
>>
>> I would like to recover this question since it was not answered when
>> originally posted and I am encountering the same escenario. (as you can
>> see,
>> I have done my duty of checking for past posts ;))
>>
>> I am using ServiceMix to expose services offered by heterogeneous
>> platforms
>> to consumers who interact with the ESB instead of invoking the final
>> services directly.
>>
>> However, the idea is to implement a Canonical Data Model, so that
>> services
>> are agnostic of the interfaces of one another. Hence, when a consumer
>> invokes the ESB, it will do so in its Particular Data Model and the ESB
>> should transform the message into the Canonical Data Model. (could use
>> the
>> pipeline pattern from servicemix-eip to achieve this).
>>
>> The call should then be routed to the final destination, where there
>> would
>> be another transformer that understands CDM and transforms the message to
>> the format understood by the final system.
>>
>> If the service is synchronous, the same process should be repeated
>> backwards.
>>
>> My first question is wheter ServiceMix is suitable for such a scenario...
>> And if it is, how would I achieve it?
>>
>> Thanks a lot,
>>
>> Raul.
>>
>>
>> Peter Klotz-2 wrote:
>> >
>> > Hi,
>> >
>> > a question regarding transformers, it seems that when I have a
>> component
>> > that
>> > implements TransformComponentSupport and send a InOut ME through this
>> > transformer only the request is received by the onMessageExchange() but
>> > not the
>> > response.
>> >
>> > The onMessageExchange() method is called twice, once normal and once
>> with
>> > status
>> > DONE. but both have as content of the in an out message the content of
>> the
>> > request. One never gets the response in the transformer.
>> >
>> > Now I need to have a transformer that does an action both on the
>> request
>> > and the
>> > response of a InOut ME, how can I do this?
>> >
>> > req  ---> +-------+ ----> +------+
>> >           | trans |       | comp |
>> > resp <--- +-------+ <---- +------+
>> >
>> >
>> > Thanks, Peter
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16309920.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Transforming request and response

Posted by Guillaume Nodet <gn...@gmail.com>.
We don't really have direct support for that.  I guess it really depends
where these data maps are stored and where the data is retrieved in the JBI
exchange.  If you have to implement that, I would use servicemix-bean to
perform a custom transformation, as it may be easier to access headers if
needed or to load data from a database (unless all the data is in the xml
and servicemix-saxon may be sufficient, if the maps can be defined in the
xslt stylesheets).

On Wed, Mar 26, 2008 at 7:16 PM, raulvk <ra...@gmail.com> wrote:

>
>
> I completely agree with you, and I would like to augment your suggestion
> with a few other ones. Very often, when you are communicating across
> different systems and sharing some information, it is very frequent that a
> certain referential key is defined/represented in several ways across
> those
> systems.
>
> Take for example the case where a CRM system refers to countries by
> identificative initials (Spain=SP, France=FR), whereas a ERP system refers
> to them by their international dialling code (for example: Spain=34,
> France=33). If they were to interact, there would need to be a a mechanism
> that could do the proper transformations when the message is passing
> through
> the proxy service. (This is what Oracle calls "Domain-value maps" in their
> ESB).   (Ideally, if there is a CDM, it should establish a "neutral common
> ground" for these referential keys, leaving it up to the proxy to convert
> from and to the CDM values and thus removing the need to cross-analyse the
> equivalences between systems.)
>
> For example, in the above situation, you could define the CDM values as
> "SPAIN" and "FRANCE", so the consumer proxy would do SP-->SPAIN  and the
> provider proxy would do  SPAIN-->34.
>
> Actually, if you were to implement such a mechanism, could you suggest a
> way
> of doing so in ServiceMix?
>
> Another interesting feature would be for the proxy service to detect and
> support "faults" and support call-outs when this happen (inserting for
> example an entry in an error registry).
>
> Thanks a lot,
>
> Raul.
>
>
> gnodet wrote:
> >
> > Btw, the servicemix-saxon  should really be enhanced to support natively
> > this pattern which is imho quite common.  A single endpoint would be
> used
> > and configured with one or two xslt and act as as a proxy between the
> > consumer and the provider and perform the transformation on both ways.
> >
> > On Wed, Mar 26, 2008 at 5:01 PM, Guillaume Nodet <gn...@gmail.com>
> wrote:
> >
> >> Yeah, it's totally doable using servicemix-eip + any transformation
> >> (servicemix-saxon).
> >> The pipeline can be used if the exchange is InOnly. but if you have a
> >> reply, this usually means that the exchange will be an InOut, in which
> >> case
> >> you would use the eip static routing slip with the following targets:
> >>    * the request transformer
> >>    * the service to call
> >>    * the response transformer
> >> This way, the canonical transformation can be done by the two
> >> transformers.
> >>
> >>
> >> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
> >>
> >> >
> >> > Hi everyone,
> >> >
> >> > I would like to recover this question since it was not answered when
> >> > originally posted and I am encountering the same escenario. (as you
> can
> >> > see,
> >> > I have done my duty of checking for past posts ;))
> >> >
> >> > I am using ServiceMix to expose services offered by heterogeneous
> >> > platforms
> >> > to consumers who interact with the ESB instead of invoking the final
> >> > services directly.
> >> >
> >> > However, the idea is to implement a Canonical Data Model, so that
> >> > services
> >> > are agnostic of the interfaces of one another. Hence, when a consumer
> >> > invokes the ESB, it will do so in its Particular Data Model and the
> ESB
> >> > should transform the message into the Canonical Data Model. (could
> use
> >> > the
> >> > pipeline pattern from servicemix-eip to achieve this).
> >> >
> >> > The call should then be routed to the final destination, where there
> >> > would
> >> > be another transformer that understands CDM and transforms the
> message
> >> > to
> >> > the format understood by the final system.
> >> >
> >> > If the service is synchronous, the same process should be repeated
> >> > backwards.
> >> >
> >> > My first question is wheter ServiceMix is suitable for such a
> >> > scenario...
> >> > And if it is, how would I achieve it?
> >> >
> >> > Thanks a lot,
> >> >
> >> > Raul.
> >> >
> >> >
> >> > Peter Klotz-2 wrote:
> >> > >
> >> > > Hi,
> >> > >
> >> > > a question regarding transformers, it seems that when I have a
> >> > component
> >> > > that
> >> > > implements TransformComponentSupport and send a InOut ME through
> this
> >> > > transformer only the request is received by the onMessageExchange()
> >> > but
> >> > > not the
> >> > > response.
> >> > >
> >> > > The onMessageExchange() method is called twice, once normal and
> once
> >> > with
> >> > > status
> >> > > DONE. but both have as content of the in an out message the content
> >> of
> >> > the
> >> > > request. One never gets the response in the transformer.
> >> > >
> >> > > Now I need to have a transformer that does an action both on the
> >> > request
> >> > > and the
> >> > > response of a InOut ME, how can I do this?
> >> > >
> >> > > req  ---> +-------+ ----> +------+
> >> > >           | trans |       | comp |
> >> > > resp <--- +-------+ <---- +------+
> >> > >
> >> > >
> >> > > Thanks, Peter
> >> > >
> >> > >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
> >> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> >
> >> >
> >>
> >>
> >> --
> >> Cheers,
> >> Guillaume Nodet
> >> ------------------------
> >> Blog: http://gnodet.blogspot.com/
> >
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16310376.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Transforming request and response

Posted by raulvk <ra...@gmail.com>.

I completely agree with you, and I would like to augment your suggestion
with a few other ones. Very often, when you are communicating across
different systems and sharing some information, it is very frequent that a
certain referential key is defined/represented in several ways across those
systems. 

Take for example the case where a CRM system refers to countries by
identificative initials (Spain=SP, France=FR), whereas a ERP system refers
to them by their international dialling code (for example: Spain=34,
France=33). If they were to interact, there would need to be a a mechanism
that could do the proper transformations when the message is passing through
the proxy service. (This is what Oracle calls "Domain-value maps" in their
ESB).   (Ideally, if there is a CDM, it should establish a "neutral common
ground" for these referential keys, leaving it up to the proxy to convert
from and to the CDM values and thus removing the need to cross-analyse the
equivalences between systems.) 

For example, in the above situation, you could define the CDM values as
"SPAIN" and "FRANCE", so the consumer proxy would do SP-->SPAIN  and the
provider proxy would do  SPAIN-->34.

Actually, if you were to implement such a mechanism, could you suggest a way
of doing so in ServiceMix?

Another interesting feature would be for the proxy service to detect and
support "faults" and support call-outs when this happen (inserting for
example an entry in an error registry). 

Thanks a lot,

Raul.


gnodet wrote:
> 
> Btw, the servicemix-saxon  should really be enhanced to support natively
> this pattern which is imho quite common.  A single endpoint would be used
> and configured with one or two xslt and act as as a proxy between the
> consumer and the provider and perform the transformation on both ways.
> 
> On Wed, Mar 26, 2008 at 5:01 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> 
>> Yeah, it's totally doable using servicemix-eip + any transformation
>> (servicemix-saxon).
>> The pipeline can be used if the exchange is InOnly. but if you have a
>> reply, this usually means that the exchange will be an InOut, in which
>> case
>> you would use the eip static routing slip with the following targets:
>>    * the request transformer
>>    * the service to call
>>    * the response transformer
>> This way, the canonical transformation can be done by the two
>> transformers.
>>
>>
>> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
>>
>> >
>> > Hi everyone,
>> >
>> > I would like to recover this question since it was not answered when
>> > originally posted and I am encountering the same escenario. (as you can
>> > see,
>> > I have done my duty of checking for past posts ;))
>> >
>> > I am using ServiceMix to expose services offered by heterogeneous
>> > platforms
>> > to consumers who interact with the ESB instead of invoking the final
>> > services directly.
>> >
>> > However, the idea is to implement a Canonical Data Model, so that
>> > services
>> > are agnostic of the interfaces of one another. Hence, when a consumer
>> > invokes the ESB, it will do so in its Particular Data Model and the ESB
>> > should transform the message into the Canonical Data Model. (could use
>> > the
>> > pipeline pattern from servicemix-eip to achieve this).
>> >
>> > The call should then be routed to the final destination, where there
>> > would
>> > be another transformer that understands CDM and transforms the message
>> > to
>> > the format understood by the final system.
>> >
>> > If the service is synchronous, the same process should be repeated
>> > backwards.
>> >
>> > My first question is wheter ServiceMix is suitable for such a
>> > scenario...
>> > And if it is, how would I achieve it?
>> >
>> > Thanks a lot,
>> >
>> > Raul.
>> >
>> >
>> > Peter Klotz-2 wrote:
>> > >
>> > > Hi,
>> > >
>> > > a question regarding transformers, it seems that when I have a
>> > component
>> > > that
>> > > implements TransformComponentSupport and send a InOut ME through this
>> > > transformer only the request is received by the onMessageExchange()
>> > but
>> > > not the
>> > > response.
>> > >
>> > > The onMessageExchange() method is called twice, once normal and once
>> > with
>> > > status
>> > > DONE. but both have as content of the in an out message the content
>> of
>> > the
>> > > request. One never gets the response in the transformer.
>> > >
>> > > Now I need to have a transformer that does an action both on the
>> > request
>> > > and the
>> > > response of a InOut ME, how can I do this?
>> > >
>> > > req  ---> +-------+ ----> +------+
>> > >           | trans |       | comp |
>> > > resp <--- +-------+ <---- +------+
>> > >
>> > >
>> > > Thanks, Peter
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
>> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >
>> >
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
> 
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16310376.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Transforming request and response

Posted by raulvk <ra...@gmail.com>.

I completely agree with you, and I would like to augment your suggestion
with a few other ones. Very often, when you are communicating across
different systems and sharing some information, it is very frequent that a
certain referential key is defined/represented in several ways across those
systems. 

Take for example the case where a CRM system refers to countries by
identificative initials (Spain=SP, France=FR), whereas a ERP system refers
to them by their international dialling code (for example: Spain=34,
France=33). If they were to interact, there would need to be a a mechanism
that could do the proper transformations when the message is passing through
the proxy service. (This is what Oracle calls "Domain-value maps" in their
ESB).   (Ideally, if there is a CDM, it should establish a "neutral common
ground" for these referential keys, leaving it up to the proxy to convert
from and to the CDM values and thus removing the need to cross-analyse the
equivalences between systems.) 

For example, in the above situation, you could define the CDM values as
"SPAIN" and "FRANCE", so the consumer proxy would do SP-->SPAIN  and the
provider proxy would do  SPAIN-->34.

Actually, if you were to implement such a mechanism, could you suggest a way
of doing so in ServiceMix?

Another interesting feature would be for the proxy service to detect and
support "faults" and support call-outs when this happen (inserting for
example an entry in an error registry). 

Thanks a lot,

Raul.


gnodet wrote:
> 
> Btw, the servicemix-saxon  should really be enhanced to support natively
> this pattern which is imho quite common.  A single endpoint would be used
> and configured with one or two xslt and act as as a proxy between the
> consumer and the provider and perform the transformation on both ways.
> 
> On Wed, Mar 26, 2008 at 5:01 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> 
>> Yeah, it's totally doable using servicemix-eip + any transformation
>> (servicemix-saxon).
>> The pipeline can be used if the exchange is InOnly. but if you have a
>> reply, this usually means that the exchange will be an InOut, in which
>> case
>> you would use the eip static routing slip with the following targets:
>>    * the request transformer
>>    * the service to call
>>    * the response transformer
>> This way, the canonical transformation can be done by the two
>> transformers.
>>
>>
>> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
>>
>> >
>> > Hi everyone,
>> >
>> > I would like to recover this question since it was not answered when
>> > originally posted and I am encountering the same escenario. (as you can
>> > see,
>> > I have done my duty of checking for past posts ;))
>> >
>> > I am using ServiceMix to expose services offered by heterogeneous
>> > platforms
>> > to consumers who interact with the ESB instead of invoking the final
>> > services directly.
>> >
>> > However, the idea is to implement a Canonical Data Model, so that
>> > services
>> > are agnostic of the interfaces of one another. Hence, when a consumer
>> > invokes the ESB, it will do so in its Particular Data Model and the ESB
>> > should transform the message into the Canonical Data Model. (could use
>> > the
>> > pipeline pattern from servicemix-eip to achieve this).
>> >
>> > The call should then be routed to the final destination, where there
>> > would
>> > be another transformer that understands CDM and transforms the message
>> > to
>> > the format understood by the final system.
>> >
>> > If the service is synchronous, the same process should be repeated
>> > backwards.
>> >
>> > My first question is wheter ServiceMix is suitable for such a
>> > scenario...
>> > And if it is, how would I achieve it?
>> >
>> > Thanks a lot,
>> >
>> > Raul.
>> >
>> >
>> > Peter Klotz-2 wrote:
>> > >
>> > > Hi,
>> > >
>> > > a question regarding transformers, it seems that when I have a
>> > component
>> > > that
>> > > implements TransformComponentSupport and send a InOut ME through this
>> > > transformer only the request is received by the onMessageExchange()
>> > but
>> > > not the
>> > > response.
>> > >
>> > > The onMessageExchange() method is called twice, once normal and once
>> > with
>> > > status
>> > > DONE. but both have as content of the in an out message the content
>> of
>> > the
>> > > request. One never gets the response in the transformer.
>> > >
>> > > Now I need to have a transformer that does an action both on the
>> > request
>> > > and the
>> > > response of a InOut ME, how can I do this?
>> > >
>> > > req  ---> +-------+ ----> +------+
>> > >           | trans |       | comp |
>> > > resp <--- +-------+ <---- +------+
>> > >
>> > >
>> > > Thanks, Peter
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
>> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >
>> >
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
> 
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16310376.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Transforming request and response

Posted by Guillaume Nodet <gn...@gmail.com>.
Btw, the servicemix-saxon  should really be enhanced to support natively
this pattern which is imho quite common.  A single endpoint would be used
and configured with one or two xslt and act as as a proxy between the
consumer and the provider and perform the transformation on both ways.

On Wed, Mar 26, 2008 at 5:01 PM, Guillaume Nodet <gn...@gmail.com> wrote:

> Yeah, it's totally doable using servicemix-eip + any transformation
> (servicemix-saxon).
> The pipeline can be used if the exchange is InOnly. but if you have a
> reply, this usually means that the exchange will be an InOut, in which case
> you would use the eip static routing slip with the following targets:
>    * the request transformer
>    * the service to call
>    * the response transformer
> This way, the canonical transformation can be done by the two
> transformers.
>
>
> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
>
> >
> > Hi everyone,
> >
> > I would like to recover this question since it was not answered when
> > originally posted and I am encountering the same escenario. (as you can
> > see,
> > I have done my duty of checking for past posts ;))
> >
> > I am using ServiceMix to expose services offered by heterogeneous
> > platforms
> > to consumers who interact with the ESB instead of invoking the final
> > services directly.
> >
> > However, the idea is to implement a Canonical Data Model, so that
> > services
> > are agnostic of the interfaces of one another. Hence, when a consumer
> > invokes the ESB, it will do so in its Particular Data Model and the ESB
> > should transform the message into the Canonical Data Model. (could use
> > the
> > pipeline pattern from servicemix-eip to achieve this).
> >
> > The call should then be routed to the final destination, where there
> > would
> > be another transformer that understands CDM and transforms the message
> > to
> > the format understood by the final system.
> >
> > If the service is synchronous, the same process should be repeated
> > backwards.
> >
> > My first question is wheter ServiceMix is suitable for such a
> > scenario...
> > And if it is, how would I achieve it?
> >
> > Thanks a lot,
> >
> > Raul.
> >
> >
> > Peter Klotz-2 wrote:
> > >
> > > Hi,
> > >
> > > a question regarding transformers, it seems that when I have a
> > component
> > > that
> > > implements TransformComponentSupport and send a InOut ME through this
> > > transformer only the request is received by the onMessageExchange()
> > but
> > > not the
> > > response.
> > >
> > > The onMessageExchange() method is called twice, once normal and once
> > with
> > > status
> > > DONE. but both have as content of the in an out message the content of
> > the
> > > request. One never gets the response in the transformer.
> > >
> > > Now I need to have a transformer that does an action both on the
> > request
> > > and the
> > > response of a InOut ME, how can I do this?
> > >
> > > req  ---> +-------+ ----> +------+
> > >           | trans |       | comp |
> > > resp <--- +-------+ <---- +------+
> > >
> > >
> > > Thanks, Peter
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/




-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Transforming request and response

Posted by raulvk <ra...@gmail.com>.
Hi Guillaume,

Thanks a lot, I was aware of the pipeline pattern, but I hadn't looked at
the static routing slip. However, would you recommend using servicemix-eip
for this purpose instead of servicemix-camel? If you were to use
servicemix-camel, how would you implement this pattern? 

(Also, can you give us some insider information as to whether servicemix-eip
is going to be deprecated in favour of servicemix-camel? ;))

Thanks a lot,

Raúl.



gnodet wrote:
> 
> Yeah, it's totally doable using servicemix-eip + any transformation
> (servicemix-saxon).
> The pipeline can be used if the exchange is InOnly. but if you have a
> reply,
> this usually means that the exchange will be an InOut, in which case you
> would use the eip static routing slip with the following targets:
>    * the request transformer
>    * the service to call
>    * the response transformer
> This way, the canonical transformation can be done by the two
> transformers.
> 
> On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:
> 
>>
>> Hi everyone,
>>
>> I would like to recover this question since it was not answered when
>> originally posted and I am encountering the same escenario. (as you can
>> see,
>> I have done my duty of checking for past posts ;))
>>
>> I am using ServiceMix to expose services offered by heterogeneous
>> platforms
>> to consumers who interact with the ESB instead of invoking the final
>> services directly.
>>
>> However, the idea is to implement a Canonical Data Model, so that
>> services
>> are agnostic of the interfaces of one another. Hence, when a consumer
>> invokes the ESB, it will do so in its Particular Data Model and the ESB
>> should transform the message into the Canonical Data Model. (could use
>> the
>> pipeline pattern from servicemix-eip to achieve this).
>>
>> The call should then be routed to the final destination, where there
>> would
>> be another transformer that understands CDM and transforms the message to
>> the format understood by the final system.
>>
>> If the service is synchronous, the same process should be repeated
>> backwards.
>>
>> My first question is wheter ServiceMix is suitable for such a scenario...
>> And if it is, how would I achieve it?
>>
>> Thanks a lot,
>>
>> Raul.
>>
>>
>> Peter Klotz-2 wrote:
>> >
>> > Hi,
>> >
>> > a question regarding transformers, it seems that when I have a
>> component
>> > that
>> > implements TransformComponentSupport and send a InOut ME through this
>> > transformer only the request is received by the onMessageExchange() but
>> > not the
>> > response.
>> >
>> > The onMessageExchange() method is called twice, once normal and once
>> with
>> > status
>> > DONE. but both have as content of the in an out message the content of
>> the
>> > request. One never gets the response in the transformer.
>> >
>> > Now I need to have a transformer that does an action both on the
>> request
>> > and the
>> > response of a InOut ME, how can I do this?
>> >
>> > req  ---> +-------+ ----> +------+
>> >           | trans |       | comp |
>> > resp <--- +-------+ <---- +------+
>> >
>> >
>> > Thanks, Peter
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16309920.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Transforming request and response

Posted by Guillaume Nodet <gn...@gmail.com>.
Yeah, it's totally doable using servicemix-eip + any transformation
(servicemix-saxon).
The pipeline can be used if the exchange is InOnly. but if you have a reply,
this usually means that the exchange will be an InOut, in which case you
would use the eip static routing slip with the following targets:
   * the request transformer
   * the service to call
   * the response transformer
This way, the canonical transformation can be done by the two transformers.

On Wed, Mar 26, 2008 at 4:55 PM, raulvk <ra...@gmail.com> wrote:

>
> Hi everyone,
>
> I would like to recover this question since it was not answered when
> originally posted and I am encountering the same escenario. (as you can
> see,
> I have done my duty of checking for past posts ;))
>
> I am using ServiceMix to expose services offered by heterogeneous
> platforms
> to consumers who interact with the ESB instead of invoking the final
> services directly.
>
> However, the idea is to implement a Canonical Data Model, so that services
> are agnostic of the interfaces of one another. Hence, when a consumer
> invokes the ESB, it will do so in its Particular Data Model and the ESB
> should transform the message into the Canonical Data Model. (could use the
> pipeline pattern from servicemix-eip to achieve this).
>
> The call should then be routed to the final destination, where there would
> be another transformer that understands CDM and transforms the message to
> the format understood by the final system.
>
> If the service is synchronous, the same process should be repeated
> backwards.
>
> My first question is wheter ServiceMix is suitable for such a scenario...
> And if it is, how would I achieve it?
>
> Thanks a lot,
>
> Raul.
>
>
> Peter Klotz-2 wrote:
> >
> > Hi,
> >
> > a question regarding transformers, it seems that when I have a component
> > that
> > implements TransformComponentSupport and send a InOut ME through this
> > transformer only the request is received by the onMessageExchange() but
> > not the
> > response.
> >
> > The onMessageExchange() method is called twice, once normal and once
> with
> > status
> > DONE. but both have as content of the in an out message the content of
> the
> > request. One never gets the response in the transformer.
> >
> > Now I need to have a transformer that does an action both on the request
> > and the
> > response of a InOut ME, how can I do this?
> >
> > req  ---> +-------+ ----> +------+
> >           | trans |       | comp |
> > resp <--- +-------+ <---- +------+
> >
> >
> > Thanks, Peter
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Transforming-request-and-response-tp5154324s12049p16304064.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/