Hi

If you want to do a request-response with JMS you need to use InOut.

You can use the requestBody method instead as its based on InOut.

Are you sure the destination receives the JMS message? And that it
returns a reply?

Have you tried with some other transport than JMS, you can eg try a
direct:foo and just produce a result manually in Camel to simulate the
JMS stuff, to ensure the other parts is working okay. So its only the
JMS reqeust-reply that is not working.

BTW: We just recently added a new DSL enrich() for the content
enricher EIP pattern:
http://camel.apache.org/content-enricher.html




On Sat, Feb 14, 2009 at 3:17 AM, Nick Heudecker <nheudec...@gmail.com> wrote:
> Hi,
>
> I'm using camel 2.0 snapshot and trying to get a response back from the
> first condition in the following choice():
>
>        from(JMS_JIS)
>            .choice()
>                .when().xpath("/jis:ListSupportedFeaturesRequest",
> cisNamespace)
>                    .unmarshal("camelJaxbDataFormat")
>                    .setHeader("responsetype", constant(new
> ListFeaturesResponseType()))
>                    .to(ExchangePattern.InOut,
> "filter:cisListSupportedFeaturesFilterChain")
>                .when().xpath("/jis:ContentQueryRequest", cisNamespace)
>                    .unmarshal("camelJaxbDataFormat")
>                    .setHeader("responsetype", constant(new
> ContentQueryResponseType()))
>                    .to(ExchangePattern.InOut,
> "filter:cisContentQueryRequestFilterChain")
>                .otherwise()
>                    .unmarshal("camelJaxbDataFormat")
>                    .setHeader("responsetype", constant(new
> ServiceCheckResponseType()))
>                    .to(ExchangePattern.InOut,
> "filter:serviceCheckFilterChain")
>                .end();
>
> The "filter" component is one I created.  I can see that the result object
> is being set at the end of my FilterProcessor, but the response returned
> from:
>
> Object response = producerTemplate.sendBody(CamelRoutes.JMS_JIS,
> ExchangePattern.InOut, xmlRequestBody);
>
> is null.  "xmlRequestBody" is just an XML string.  As far as I can tell,
> everything is working fine except for getting back the result object.
> Interestingly, if I change the sendBody(...) call to:
>
> Object response = producerTemplate.sendBody(CamelRoutes.JMS_JIS,
> xmlRequestBody);
>
> I get the original XML returned as the response object.  I'm not sure what
> that indicates, but it's not what I need to have happen.
>
> There is nothing in the logs to indicate an error in from the JMS or JAXB
> components.
>
> I've been beating my head against this for a few hours and I don't know what
> else I could try.  Any help is very much appreciated.  Thanks for your
> time.
>
> Regards,
> Nick
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to