You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "anirban.gupta4" <an...@gmail.com> on 2017/03/27 11:01:19 UTC

Unable to send response to webservice

Hi,

My scenario is like:

1. Expose a CXF endpoint and accept the request message
2. Transform the request message
3. Put the message in a JMS queue
4. Send a response to the caller that the message is successfully posted in
the queue

My route is as follows

from("cxf:bean:someEndpoint")
		.streamCaching()
		.process(new MappingProcessor())
		.log("Reached1")         
		.setHeader("INTERFACE_NAME", constant("some-interface"))
		.to("jms:queue:queueName")
		.setBody(constant("Item has been inserted to Queue Successfully"))
		.end();

In the above route, the message is getting inserted into the queue
successfully but the response "Item has been inserted to Queue Successfully"
is not sent to the calling app, Please help.

Regards,
Anirban.



--
View this message in context: http://camel.465427.n5.nabble.com/Unable-to-send-response-to-webservice-tp5796276.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unable to send response to webservice

Posted by Claus Ibsen <cl...@gmail.com>.
What you use as response must fit what the SOAP webservice is defined
to use as response, eg in all that WSDL / SOAP spec stuff.

In your use case you use a bean as the endpoint so must match that
bean endpoint as well.

And study some of the CXF examples from Camel, or from 3rd party
blogs, or in some of the Camel books

On Mon, Mar 27, 2017 at 1:01 PM, anirban.gupta4
<an...@gmail.com> wrote:
> Hi,
>
> My scenario is like:
>
> 1. Expose a CXF endpoint and accept the request message
> 2. Transform the request message
> 3. Put the message in a JMS queue
> 4. Send a response to the caller that the message is successfully posted in
> the queue
>
> My route is as follows
>
> from("cxf:bean:someEndpoint")
>                 .streamCaching()
>                 .process(new MappingProcessor())
>                 .log("Reached1")
>                 .setHeader("INTERFACE_NAME", constant("some-interface"))
>                 .to("jms:queue:queueName")
>                 .setBody(constant("Item has been inserted to Queue Successfully"))
>                 .end();
>
> In the above route, the message is getting inserted into the queue
> successfully but the response "Item has been inserted to Queue Successfully"
> is not sent to the calling app, Please help.
>
> Regards,
> Anirban.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unable-to-send-response-to-webservice-tp5796276.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2