You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sushmita chandra <fl...@gmail.com> on 2013/02/22 09:52:26 UTC

Issue in a camel route having webservice and active-mq as endpoints

I have created a simple camel route which will read from a cxf
webservice(soap based) endpoint and put the data into a jms queue. I am
using active mq.

I am using Spring DSL, below mentioned entry is present in my context file.
My route is getting created successfully, but the data is going into DLQ
instead of queue craeted by me that is "pil".
Not sure what i am doing wrong.

	<camel:camelContext id="camel">
		<camel:route>
			<camel:from uri="cxf:bean:webserviceEndpoint" />
			<camel:convertBodyTo type="java.lang.String" />
			<camel:choice>
				<camel:when>
					<camel:simple>${body} == 'testing'</camel:simple>
					<camel:transform>
						<camel:simple>Hello ${bodyAs(String)} how are you?</camel:simple>
					</camel:transform>
				</camel:when>
			</camel:choice>			
			<camel:to uri="testmq:pil" />
		<camel:route>		
	</camel:camelContext> 

Also, I am getting fault string as my response in webservice request
 <faultstring>The OUT message was not received within: 20000 millis due
reply message with correlationID: ID-BASE08R2-51001-1361515760957-3-6 not
received. Exchange[Message: Hello testing how are you?]</faultstring>





--
View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-having-webservice-and-active-mq-as-endpoints-tp5728006.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue in a camel route having webservice and active-mq as endpoints

Posted by Sushmita chandra <fl...@gmail.com>.
Thanks Claus, It resolved my issue.

I modified my route and issue is resolved now.

         <camel:camelContext id="camel">
                 <camel:route>
                         <camel:from uri="cxf:bean:webserviceEndpoint" />
                         <camel:convertBodyTo type="java.lang.String" />
                         <camel:choice>
                                 <camel:when>
                                         <camel:simple>${body} ==
'testing'</camel:simple>
                                         <camel:transform>
                                                 <camel:simple>Hello
${bodyAs(String)} how are you?</camel:simple>
                                         </camel:transform>
                                 </camel:when>
                         </camel:choice>
                         <camel:setExchangePattern pattern="InOnly"/>
                         <camel:to uri="testmq:pil" />
                <camel:route>
         </camel:camelContext> 





--
View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-having-webservice-and-active-mq-as-endpoints-tp5728006p5728211.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Issue in a camel route having webservice and active-mq as endpoints

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

If you just want to send the message to the queue, and not do
request/reply over JMS, then you need to use the InOnly MEP

 <camel:to uri="testmq:pil" pattern="InOnly"/>

See details at
http://camel.apache.org/event-message.html
http://camel.apache.org/request-reply.html

On Fri, Feb 22, 2013 at 9:52 AM, Sushmita chandra
<fl...@gmail.com> wrote:
> I have created a simple camel route which will read from a cxf
> webservice(soap based) endpoint and put the data into a jms queue. I am
> using active mq.
>
> I am using Spring DSL, below mentioned entry is present in my context file.
> My route is getting created successfully, but the data is going into DLQ
> instead of queue craeted by me that is "pil".
> Not sure what i am doing wrong.
>
>         <camel:camelContext id="camel">
>                 <camel:route>
>                         <camel:from uri="cxf:bean:webserviceEndpoint" />
>                         <camel:convertBodyTo type="java.lang.String" />
>                         <camel:choice>
>                                 <camel:when>
>                                         <camel:simple>${body} == 'testing'</camel:simple>
>                                         <camel:transform>
>                                                 <camel:simple>Hello ${bodyAs(String)} how are you?</camel:simple>
>                                         </camel:transform>
>                                 </camel:when>
>                         </camel:choice>
>                         <camel:to uri="testmq:pil" />
>                 <camel:route>
>         </camel:camelContext>
>
> Also, I am getting fault string as my response in webservice request
>  <faultstring>The OUT message was not received within: 20000 millis due
> reply message with correlationID: ID-BASE08R2-51001-1361515760957-3-6 not
> received. Exchange[Message: Hello testing how are you?]</faultstring>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-having-webservice-and-active-mq-as-endpoints-tp5728006.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen