camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to control what is sent to client
Date Tue, 02 Feb 2010 13:38:38 GMT
On Tue, Feb 2, 2010 at 1:58 PM, lekkie <lekkie.aydot@gmail.com> wrote:
>
> Thanks for your response. Much appreciated.
>
> Is there any other EIP that I can use to split a message which will be
> re-captured together with another message with an aggregator and the result
> from the aggregator will be sent to the http client?
>

The Camel splitter have a build in aggregator, see the split aggregate
request/reply sample at
http://camel.apache.org/splitter.html

> kr.
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> If you buy the EIP book
>> http://www.enterpriseintegrationpatterns.com/index.html
>>
>> And read about the wiretap pattern you will not be surprise the output
>> from the processor is NOT send back to the HTTP client.
>>
>> Its a wiretap, the original message will continue to be routed as if
>> it was newer wiretapped.
>> So you have to set the reply to be send back to HTTP client from the
>> original route.
>>
>>
>> On Mon, Feb 1, 2010 at 5:53 PM, lekkie <lekkie.aydot@gmail.com> wrote:
>>>
>>> Hi guys,
>>>
>>> I have this sample I am working. hte processor works fine except that the
>>> response sent to the client is not the output form the processor.
>>>
>>> Here is my snippet:
>>>
>>> <route>
>>>        <from
>>> uri="jetty:http://0.0.0.0:9001/service?matchOnUriPrefix=true" />
>>>        <to uri="xslt:requestToSOAP.xsl"/>
>>>        <wireTap uri="direct:tap"/>
>>>        <to uri="xslt:XMLRequestToManagerRequest.xsl"/>
>>>        <convertBodyTo type="javax.xml.transform.dom.DOMSource" />
>>>        <to
>>> uri="nmr:{http://services.locator/}ServicesService:ServicesPort"/>
>>>        <to uri="xslt:ResponseToXMLRequest.xsl"/>
>>>        <to uri="direct:tap"/>
>>> </route>
>>>
>>> <route>
>>>                <from uri="direct:tap"/>
>>>                <aggregate batchSize="2" batchTimeout="5000"
>>> strategyRef="myStrategy">
>>>
>>>  <correlationExpression><constant>true</constant></correlationExpression>
>>>                        <to uri="direct:aggregated"/>
>>>                </aggregate>
>>> </route>
>>>
>>> <route>
>>>                <from uri="direct:aggregated"/>
>>>                <to uri="log:Response3"/>
>>> </route>
>>>
>>> What is logged in log:response3 is the aggregation performed in
>>> myStrategy
>>> bean (which is what I expected), however, what I receive on the client
>>> that
>>> made this request (and what I see in my network analyzer) is the output
>>> from
>>> <to uri="xslt:ResponseToXMLRequest.xsl"/>  which is the transformed
>>> response
>>> from nmr:{http://services.locator/}ServicesService:ServicesPort service.
>>>
>>> I will appreciate any clue on this.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/How-to-control-what-is-sent-to-client-tp27407409p27407409.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/How-to-control-what-is-sent-to-client-tp27407409p27419927.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message