Re: How to set body part with using of XML DSL

2015-09-13 Thread horyna
Thx. for reply. But me problem is, that i need to set just a field value
inside body object. You promise change complete body part.

I need to do body.getContext().setReqeustId(property.getRequestId()); using
Camel.

Thats why i wrote:
{$body.context.requestId} = {$property.requestId}



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-set-body-part-with-using-of-XML-DSL-tp5771461p5771466.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to set body part with using of XML DSL

2015-09-13 Thread Claus Ibsen
Simple does not support that. You can use some of the other languages
like mvel, groovy etc.

On Sun, Sep 13, 2015 at 11:22 AM, horyna  wrote:
> Thx. for reply. But me problem is, that i need to set just a field value
> inside body object. You promise change complete body part.
>
> I need to do body.getContext().setReqeustId(property.getRequestId()); using
> Camel.
>
> Thats why i wrote:
> {$body.context.requestId} = {$property.requestId}
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-set-body-part-with-using-of-XML-DSL-tp5771461p5771466.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition


Re: kyro data format in camel

2015-09-13 Thread Christian Müller
Implement something more than what? You only shared the Spring bean
definition with us, nothing else.

Best,
Christian
Am 31.08.2015 10:21 schrieb "Felix Thomas" :

> hello,
>
>  I have used kyroformat for marshalling using a bean as below .
>
>  
>
>
>
>   I get the below message in the logs , not sure is its an issue or not
> , since i see the messages marshalled  in the queue..Do i need to implement
> something more
>
> DEBUG 28-08 16:50:19,456[main]
> [org.springframework.beans.factory.support.DefaultListableBeanFactory] |
> Failed to convert bean 'kyroFormat' to required type
> [org.apache.camel.model.DataFormatDefinition]
>
> *org.springframework.beans.ConversionNotSupportedException*: Failed to
> convert value of type 'com.XXX.camel.util.KyroDataFormat' to required type
> 'org.apache.camel.model.DataFormatDefinition'; nested exception is
> *java.lang.IllegalStateException*: Cannot convert value of type
> [com.XXX.camel.util.KyroDataFormat] to required type
> [org.apache.camel.model.DataFormatDefinition]: no matching editors or
> conversion strategy found
>
>at org.springframework.beans.TypeConverterSupport.doConvert(
> *TypeConverterSupport.java:74*)
>
>
>
> Rgrds
> Felix T
>


RE: redeliveryPolicy onException based on HTTP statusCode

2015-09-13 Thread Vanshul . Chawla
Here is what I used



java.lang.Exception

  ${exception.message} contains '503' or ${exception.message} 
contains '504' or ${exception.message} contains 
'java.net.SocketTimeoutException: Read timed out' or ${exception.message} 
contains 'java.net.SocketTimeoutException' or ${exception.message} contains 
'Connection Reset'





  



-Original Message-
From: pholder [mailto:philipp.hol...@cit.de] 
Sent: Friday, September 11, 2015 8:16 PM
To: users@camel.apache.org
Subject: redeliveryPolicy onException based on HTTP statusCode

Hello all,

I am looking for a way to have a different redeliveryPolicy in Case the HTTP 
statusCode is '503'.
I guess, I could do a try/catch finally every time I make a HTTP-Request. My 
hope was to make that switch at one position, for all routes.

Does anyone have a thought on this problem.

This is what I have tried:



 
org.apache.camel.component.http.HttpOperationFailedException

  


  

  ${exchangeProperty[errorStatusCode]} == '503'
  


  

  




 
de.cit.eg.transfer.exception.ServiceTemporarilyNotAvailableException
  

  




 
de.cit.eg.transfer.exception.DefaultHttpException

  



With regards



--
View this message in context: 
http://camel.465427.n5.nabble.com/redeliveryPolicy-onException-based-on-HTTP-statusCode-tp5771448.html
Sent from the Camel - Users mailing list archive at Nabble.com.


disableReplyTo=true

2015-09-13 Thread Vanshul . Chawla
Hello all,

We have a route where consumer sends message on IBM MQ and doesn't expect a 
response. But still they send a ReplyTo queue so we disabled the Reply To 
option by setting disableReplyTo=true

Now we are facing issue that when error occurs, the error message doesn't go to 
Error queue and error we get is

nested exception is com.ibm.msg.client.jms.DetailedIllegalStateException: 
JMSWMQ2007: Failed to send a message to destination 'TCOM.EMAIL.WCS.EXP.ORIG'. 
JMS attempted to perform an MQPUT or MQPUT1; however WebSphere MQ reported an 
error. Use the linked exception to determine the cause of this error.; nested 
exception is com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with 
compcode '2' ('MQCC_FAILED') reason '2027' ('MQRC_MISSING_REPLY_TO_Q').]

Do we need to now explicitly set JMSReplyTo header to queue names where we need 
to send error and original message or is there an option we need to use like 
exchangePattern="inOnly".


Vanshul