Hi,
Can you try to set the ID into the message header instead of the message
body ? In this way you can the Request object back :)
>> <route>
>> <from uri="jetty:http://0.0.0.0:8080/endpoint"/>
>> <inOnly uri="seda:sendASync"/>
>> <setHeader headerName="id">
>> <simple>${id}</simple>
>> </setHeader>
>> </route>
>>
>> <route>
>> <from uri="seda:sendASync"/>
>> <to uri="bean:myBean"/>
>> </route>
You bean's method could
public String controller(@Header("id")String body, Exchange exchange) ;
Willem
Wayne Keenan wrote:
Hi,
Apologies, I didn't word my previous email very well; what I should have
also mentioned for clarity is that if I do this:
<route>
<from uri="jetty:http://0.0.0.0:8080/endpoint"/>
<to uri="bean:myBean"/>
<transform>
<simple>${id}</simple>
</transform>
</route>
The same bean is able to obtain the HTTPServletRequest to get the POST data
(base64 encoded binary) andthe URL parameters, however, if I introduce the
SEDA
call the same bean can't get the HTTPServletRequest. The salient bean code
is:
public String controller(String body, Exchange exchange) {
try {
HttpServletRequest req =
exchange.getIn().getBody(HttpServletRequest.class);
Regards
Wayne
On Wed, Jan 20, 2010 at 9:02 AM, Wayne Keenan <wayne.kee...@gmail.com>wrote:
Hi,
I have a Jetty endpoint that when recieving a message will perform the
processing asynchronously and syncronously return a correlationId so the
client can come back later to another endpoint to see how processsing is
going.
I found an example on the mailing list of how to pass the HttpSession
object using Java, but I can't seem to find out how
to reference or pass the HttpRequest using SpringDSL. What I have at the
moment is:
<route>
<from uri="jetty:http://0.0.0.0:8080/endpoint"/>
<inOnly uri="seda:sendASync"/>
<transform>
<simple>${id}</simple>
</transform>
</route>
<route>
<from uri="seda:sendASync"/>
<to uri="bean:myBean"/>
</route>
Is there a way to say 'pass the HTTP stuff through please Mr SEDA'?
Should I really be setting a header property to that of a HTTP Object? How
do I obtain it?
Should I architect this differently?
All the best,
Wayne