SMPP automatic sms splitting issue

2014-12-17 Thread cursed_manji
Hi,
I know that SMPP handles the splitting of long sms (longer than 160
characters) automatically.
My issue is this, when a long sms is splitted in 2 or 3 sms, one of those
sms could get a throttling
error . Usually when a single (not splitted) sms is getting a throttling
error I just resend it by handling the exception, but when an sms is
splitted and one of three parts is getting an error, I can only resend the
whole sms (all parts) which leads to mutliple receives of the same part. Is
there a way to resend throttled
parts of an sms or to handle only parts of splitted messages of SMPP
component? Thanks in advance




--
View this message in context: 
http://camel.465427.n5.nabble.com/SMPP-automatic-sms-splitting-issue-tp5760816.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Junit Test Failing with AdviceWith

2014-12-17 Thread ManishGupta
Thanks for the help claus :) I read through the Javadocs and understood that
start method is non blocking. If i have to use in a standalone application i
have to use main function provided by camel.

http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

I inturn used the ProducerTemplate to keep the camelContext in running state
with following code.

@UseAdviceWith 
public class AMSTest extends CamelSpringTestSupport{ 

@Override 
protected AbstractApplicationContext createApplicationContext() { 
return new ClassPathXmlApplicationContext( 
ams-context.xml); 
} 


@Override 
public boolean isUseAdviceWith() { 
return true; 
} 

@Test 
public void testLAMS() throws Exception 
{ 

   
context.getRouteDefinition(compare-request).adviceWith(context, new
AdviceWithRouteBuilder() { 
@Override 
public void configure() throws Exception { 

replaceFromWith(direct:start); 
} 
}); 

context.start(); 
template.sendBody(direct:start,String.class);

} 
} 

I bumped in to another issue from my actual code i had

*
replaceFromWith(file:/home/manish/cameldata/Compare?fileName=STARTCOMPARE);
*

if i want to use the same replace statement from my original code i.e.

*
replaceFromWith(file:/home/manish/cameldata/Compare?fileName=STARTCOMPAREamp;doneFileName=LOADGSMPRICING);
*

I am unable to use the ProducerTemplate for the same 

InputStream f = getClass().getResourceAsStream(LOADTRIGGER);

template.sendBody(file:/home/manish/cameldata/Compare?fileName=STARTCOMPAREamp;doneFileName=LOADTRIGGER,file);

Can you please help me with this ?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Junit-Test-Failing-with-AdviceWith-tp5760732p5760823.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[ANNOUNCE] Apache Camel 2.14.1 Released

2014-12-17 Thread Willem Jiang
The Apache Camel project [1] is a powerful open source integration 
framework based on known Enterprise Integration Patterns [2]. 

The Camel community announces the immediate availability of the new patch 
release camel-2.14.1. 

The artifacts are published and ready for you to download [3] either from 
the Apache mirrors or from the Central Maven repository. 
For more details please take a look at the release notes [4]. 

Many thanks to the Camel community for the hard work. 


[1]http://camel.apache.org/ 
[2]http://camel.apache.org/enterprise-integration-patterns.html 
[3]http://camel.apache.org/download.html 
[4]http://camel.apache.org/camel-2141-release.html 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





Re: AW: camel - xsd

2014-12-17 Thread Aki Yoshida
@Jan
I just ran the camel-core's unit test XMLTokenExpressionIteratorTest
on jdk8 without woodstox (use profile deactivation -P!woodstox to
disable woodstox), the tokenizer correctly reports the error at the
beginning without proceeding to the tokenizing step. (on both OSX and
Ubuntu with Oracle JDK8).

testExtractSomeUnqualifiedChild(org.apache.camel.support.XMLTokenExpressionIteratorTest)
 Time elapsed: 0.001 sec   ERROR!
javax.xml.stream.XMLStreamException: reader not supporting Location
at 
org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.init(XMLTokenExpressionIterator.java:219)

Can you tell me which JDK you had to get the incorrectly extracted tokens?

thanks

2014-12-16 14:27 GMT+01:00 Aki Yoshida elak...@gmail.com:
 @Jan,
 I just missed your previous replies.
 I just saw you also have provided the JDK info already.
 thanks.

 2014-12-16 14:25 GMT+01:00 Aki Yoshida elak...@gmail.com:
 It's good to hear it is working in your environment.

 by the way, I saw your camael doc update regarding the concrete error
 example you saw.
 We need to formulate that differently.
 There is a small sanity check before starting the tokenization (not
 comparing the impl name itself but trying to infer its conformance by
 its initial behavior). That check was working for Oracle JDK 7 on OSX.
 I would like to know which JDK that you use. In any case, we can
 either make the initial sanity check to detect this incompatible
 behavior and detect it later if it is not detected at the beginning.
 In either way, we can throw an exception at some point.

 regards, aki

 2014-12-16 10:18 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
 Sorry for my late answer, I was ill :(

 Thanks for your sample project, I investigated into it now.
 All tests passed. (Camel 2.14.0)

 But your test used the XMLTokenExpressionIterator directly I migrated my own
 test class (using the RouteBuilder) into your project.
 - added the test class
 - added the xsd
 - added the dependency to commons-io + camel-test-spring
 - changed the paths in my test class to fit your directory layout
 Now this also passed.

 It's good to see that there is no bug in Camel. ;)


 Because my example still fails in my other environment I check that ...


 Jan


 -Ursprüngliche Nachricht-
 Von: Aki Yoshida [mailto:elak...@gmail.com]
 Gesendet: Mittwoch, 10. Dezember 2014 23:57
 An: users@camel.apache.org
 Betreff: Re: AW: camel - xsd

 i meant woodstox-core-asl (e.g., woodstox-core-asl-4.4.1.jar).
 its maven coordinate is

 mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1

 you need to have woodstox or some other parser that reliably reports
 the offset location at each parse event.
 Sjsxp (sun/oracle implementation included in JDK) doesn't do that, so
 you can't use it.

 jmtest.tar.gz contains a maven project that can be executed directly by
 typing mvn test at the console or can be imported into your eclipse
 IDE.

 2014-12-10 13:13 GMT+01:00 Aki Yoshida elak...@gmail.com:
  i just created a test that uses your data and verified that it is
 working fine.
  please take a look at this file at my dropbox.
  https://www.dropbox.com/s/pfgvs9si9bvujxo/jmtest.tar.gz?dl=0
  just extract the files into camel-core and run JMNewsTest.
  and see if that works in your environment, (i believe it does).
 
  in that case, we need to find out the difference to your case.
  do you have woodstox-api in your class path?
 
 
  2014-12-10 12:15 GMT+01:00 Aki Yoshida elak...@gmail.com:
  okay.
  let me take a look.
 
 
  2014-12-10 12:02 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
  No, input is valid xml.
  After invoking xtokenize() the xml is invalid.
 
  CAMEL-8106 is very  short. I can't see whether it is related.
 
 
  I posted an example on the user list
  http://mail-archives.apache.org/mod_mbox/camel-
 users/201412.mbox/%3C
  002b01d01452%24e8ee27a0%24baca76e0%24%40de%3E
 
  I had done a 'workaround' for this special example
  // Workaround of a bug?? in XMLTokenizerExpression
  .setBody(simple(${body.replace('//news:Newsletter',
 '/news:Newsletter')}))
  .setBody(simple(${body.replace('/news:Newsletter',
  '/news:Newsletter')}))
 
  Without that the split messages have wrong end tags.
 
 
  Jan
 
 
  -Ursprüngliche Nachricht-
  Von: Aki Yoshida [mailto:elak...@gmail.com]
  Gesendet: Mittwoch, 10. Dezember 2014 10:34
  An: users@camel.apache.org
  Betreff: Re: AW: camel - xsd
 
  you are talking about the invalid-xml parsing bug in xtokenzier.
  that has been fixe with CAMEL-8106. It should be part of the new
  2.14.1, which is to be released shortly.
 
  regards, aki
 
  2014-12-10 9:25 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
   I played a little bit.
  
   Jan
  
  
   public class XmlTest extends CamelTestSupport {
  
   @EndpointInject(uri=mock:valid)
   MockEndpoint valid;
  
   @EndpointInject(uri=mock:validationError)
   MockEndpoint validationError;
  
  
  
   @Test
   public void 

type conversion error when calling redis hmget

2014-12-17 Thread gmh
All,
I am getting the following exception when I made a redis hmget call.

According to the online doc: HMGET  Get the values of all the given hash
fields  CamelRedis.Key (String), CamelRedis.Fields (CollectionString)
Collection
Should return a collection of objects.

Stacktrace
---
org.apache.camel.TypeConversionException: Error during type conversion from
type: java.lang.String to the required type: byte[] with value [
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:566)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:131)
at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:72)
at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)
at
org.apache.camel.component.stream.StreamProducer.writeToStream(StreamProducer.java:129)
I read somewhere that I need to add a type converter.
My processor is as follows:
 public void process(Exchange exchange) throws Exception {
exchange.setProperty(Exchange.CHARSET_NAME, UTF-8);
Any idea how I should fix it?
Gordon



--
View this message in context: 
http://camel.465427.n5.nabble.com/type-conversion-error-when-calling-redis-hmget-tp5760828.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Is it possible to set the documentType on an XPath in XML DSL (Spring/Blueprint)

2014-12-17 Thread Claus Ibsen
Hi

Yeah sure we can add that option to the xpath definition so its
available in XML DSL. Feel free to log a JIRA
http://camel.apache.org/support



On Fri, Dec 12, 2014 at 8:39 AM, Siano, Stephan stephan.si...@sap.com wrote:
 Hi,

 in Java DSL it is possible to set the documentType on an XPath expression or 
 predicate (that's the type the document is converted to before applying the 
 XPath, not the result type) e.g.:

 from(file://target/file/xpathsplit)
 // set documentType to org.xml.sax.InputSource then Camel 
 will use SAX to split the file
 
 .split(xpath(/persons/person).documentType(InputSource.class)).streaming()
 .to(mock:splitted);

 Is this also possible form XML DSL (Spring/Blueprint)?

 If not, wouldn't it be a useful feature in some cases (e.g. when using saxon 
 as the XPath parser)?

 Best regards
 Stephan





-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


AW: AW: camel - xsd

2014-12-17 Thread jhm
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
by Oracle (according to the copyright file)
- without woodstox: fail
- with woodstox: pass


Same for
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
(also Oracle)


Same for
Java(TM) SE Runtime Environment (build 1.8.0-ea-b87)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b28, mixed mode)
(also Oracle)


Same for
Java(TM) SE Runtime Environment (build 1.9.0-ea-b06)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b62, mixed mode)
(also Oracle)


All on Win7 64bit.


Jan



 -Ursprüngliche Nachricht-
 Von: Aki Yoshida [mailto:elak...@gmail.com]
 Gesendet: Mittwoch, 17. Dezember 2014 15:49
 An: users@camel.apache.org
 Cc: Jan Matèrne (jhm)
 Betreff: Re: AW: camel - xsd
 
 @Jan
 I just ran the camel-core's unit test XMLTokenExpressionIteratorTest on
 jdk8 without woodstox (use profile deactivation -P!woodstox to disable
 woodstox), the tokenizer correctly reports the error at the beginning
 without proceeding to the tokenizing step. (on both OSX and Ubuntu with
 Oracle JDK8).
 
 testExtractSomeUnqualifiedChild(org.apache.camel.support.XMLTokenExpres
 sionIteratorTest)
  Time elapsed: 0.001 sec   ERROR!
 javax.xml.stream.XMLStreamException: reader not supporting Location at
 org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.i
 nit(XMLTokenExpressionIterator.java:219)
 
 Can you tell me which JDK you had to get the incorrectly extracted
 tokens?
 
 thanks
 
 2014-12-16 14:27 GMT+01:00 Aki Yoshida elak...@gmail.com:
  @Jan,
  I just missed your previous replies.
  I just saw you also have provided the JDK info already.
  thanks.
 
  2014-12-16 14:25 GMT+01:00 Aki Yoshida elak...@gmail.com:
  It's good to hear it is working in your environment.
 
  by the way, I saw your camael doc update regarding the concrete
 error
  example you saw.
  We need to formulate that differently.
  There is a small sanity check before starting the tokenization (not
  comparing the impl name itself but trying to infer its conformance
 by
  its initial behavior). That check was working for Oracle JDK 7 on
 OSX.
  I would like to know which JDK that you use. In any case, we can
  either make the initial sanity check to detect this incompatible
  behavior and detect it later if it is not detected at the beginning.
  In either way, we can throw an exception at some point.
 
  regards, aki
 
  2014-12-16 10:18 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
  Sorry for my late answer, I was ill :(
 
  Thanks for your sample project, I investigated into it now.
  All tests passed. (Camel 2.14.0)
 
  But your test used the XMLTokenExpressionIterator directly I
  migrated my own test class (using the RouteBuilder) into your
 project.
  - added the test class
  - added the xsd
  - added the dependency to commons-io + camel-test-spring
  - changed the paths in my test class to fit your directory layout
  Now this also passed.
 
  It's good to see that there is no bug in Camel. ;)
 
 
  Because my example still fails in my other environment I check that
 ...
 
 
  Jan
 
 
  -Ursprüngliche Nachricht-
  Von: Aki Yoshida [mailto:elak...@gmail.com]
  Gesendet: Mittwoch, 10. Dezember 2014 23:57
  An: users@camel.apache.org
  Betreff: Re: AW: camel - xsd
 
  i meant woodstox-core-asl (e.g., woodstox-core-asl-4.4.1.jar).
  its maven coordinate is
 
  mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1
 
  you need to have woodstox or some other parser that reliably
  reports the offset location at each parse event.
  Sjsxp (sun/oracle implementation included in JDK) doesn't do that,
  so you can't use it.
 
  jmtest.tar.gz contains a maven project that can be executed
  directly by typing mvn test at the console or can be imported into
  your eclipse IDE.
 
  2014-12-10 13:13 GMT+01:00 Aki Yoshida elak...@gmail.com:
   i just created a test that uses your data and verified that it
 is
  working fine.
   please take a look at this file at my dropbox.
   https://www.dropbox.com/s/pfgvs9si9bvujxo/jmtest.tar.gz?dl=0
   just extract the files into camel-core and run JMNewsTest.
   and see if that works in your environment, (i believe it does).
  
   in that case, we need to find out the difference to your case.
   do you have woodstox-api in your class path?
  
  
   2014-12-10 12:15 GMT+01:00 Aki Yoshida elak...@gmail.com:
   okay.
   let me take a look.
  
  
   2014-12-10 12:02 GMT+01:00 Jan Matèrne (jhm)
 apa...@materne.de:
   No, input is valid xml.
   After invoking xtokenize() the xml is invalid.
  
   CAMEL-8106 is very  short. I can't see whether it is
 related.
  
  
   I posted an example on the user list
   http://mail-archives.apache.org/mod_mbox/camel-
  users/201412.mbox/%3C
   002b01d01452%24e8ee27a0%24baca76e0%24%40de%3E
  
   I had done a 'workaround' for this special example
   // Workaround of a bug?? in 

How to use dynamic properties / bean references with http conduit used with camel CXF?

2014-12-17 Thread lakshmi.prashant
Hi,

 Is there a way to specify dynamic values (using a bean reference) for  the
httpConduit properties of the CXF endpoint (camel CXF)? We need to look up
the values of proxyHost and proxyPort  in a bean at runtime and then
dynamically set it as the proxyHost, port for the Http connection.

I had tried the below:

bean id=retrieveProxyDetails class=com.it.test.RetrieveProxyDetails /
bean id=proxyHost factory-ref=retrieveProxyDetails 
factory-method=getProxyHost
bean id=proxyPort factory-ref=retrieveProxyDetails 
factory-method=getProxyPort


http-conf:conduit name={http://xi.com/mine}MessageFlow_3.http-conduit;
   http-conf:authSupplier bean=Participant_4__authSupplier/
   http-conf:client ProxyServer=#proxyHost” ProxyServerPort=#proxyPort
ReceiveTimeout=4000 ConnectionTimeout=4000 /
   http-conf:tlsClientParameters
  sec:trustManagers ref=trustManager/
   /http-conf:tlsClientParameters
/http-conf:conduit

This gives the error: '#proxyPort' is not a valid value of union type
'ParameterizedInt'. 

Is there a way of doing this?

Or should we retrieve  these values using config admin service/ specify in
the camel blueprint the config admin properties?


Thanks,
Lakshmi




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-use-dynamic-properties-bean-references-with-http-conduit-used-with-camel-CXF-tp5760833.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Java DSl XPATH text node

2014-12-17 Thread sekaijin
Hi
I'm using Xpath to get an header.
My XML message

My Route Builder

When I test the XPath expression I get
ID Système:
D:\Travail\logistique\ng446\ng446-phedra-transfo\data\NG44601.SPE.047.20120101-120425.xml
Description: /reservation[1]/entete[1]/codeLivraison[1] - 12235
But in camel the header containt a
com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList Object

I've tried to use String.class argument to convert it in string but I get an
empty string.

Thank to help me
I'm running camel 2.8.1






--
View this message in context: 
http://camel.465427.n5.nabble.com/Java-DSl-XPATH-text-node-tp5760835.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Java DSl XPATH text node

2014-12-17 Thread Claus Ibsen
Hi

Can you try pass in the output type you want to xpath as a 3rd
argument, eg String.class.



On Wed, Dec 17, 2014 at 5:26 PM, sekaijin jean-yves.terr...@sap.aphp.fr wrote:
 Hi
 I'm using Xpath to get an header.
 My XML message

 My Route Builder

 When I test the XPath expression I get
 ID Système:
 D:\Travail\logistique\ng446\ng446-phedra-transfo\data\NG44601.SPE.047.20120101-120425.xml
 Description: /reservation[1]/entete[1]/codeLivraison[1] - 12235
 But in camel the header containt a
 com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList Object

 I've tried to use String.class argument to convert it in string but I get an
 empty string.

 Thank to help me
 I'm running camel 2.8.1






 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Java-DSl-XPATH-text-node-tp5760835.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: AW: camel - xsd

2014-12-17 Thread Aki Yoshida
@Jan,
the failing test itself is expected if you don't have woodstox. The
question is how it is failing, whether it stops at the beginning and
throws the exception like in the quoted console output in my previous
reply or after extracting the bad token and when comparing the token?
You mentioned that you observed this second behavior and I would like
to know where I can reproduce it.

thanks.


2014-12-17 16:40 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
 Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
 Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
 by Oracle (according to the copyright file)
 - without woodstox: fail
 - with woodstox: pass


 Same for
 Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
 Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
 (also Oracle)


 Same for
 Java(TM) SE Runtime Environment (build 1.8.0-ea-b87)
 Java HotSpot(TM) 64-Bit Server VM (build 25.0-b28, mixed mode)
 (also Oracle)


 Same for
 Java(TM) SE Runtime Environment (build 1.9.0-ea-b06)
 Java HotSpot(TM) 64-Bit Server VM (build 25.0-b62, mixed mode)
 (also Oracle)


 All on Win7 64bit.


 Jan



 -Ursprüngliche Nachricht-
 Von: Aki Yoshida [mailto:elak...@gmail.com]
 Gesendet: Mittwoch, 17. Dezember 2014 15:49
 An: users@camel.apache.org
 Cc: Jan Matèrne (jhm)
 Betreff: Re: AW: camel - xsd

 @Jan
 I just ran the camel-core's unit test XMLTokenExpressionIteratorTest on
 jdk8 without woodstox (use profile deactivation -P!woodstox to disable
 woodstox), the tokenizer correctly reports the error at the beginning
 without proceeding to the tokenizing step. (on both OSX and Ubuntu with
 Oracle JDK8).

 testExtractSomeUnqualifiedChild(org.apache.camel.support.XMLTokenExpres
 sionIteratorTest)
  Time elapsed: 0.001 sec   ERROR!
 javax.xml.stream.XMLStreamException: reader not supporting Location at
 org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.i
 nit(XMLTokenExpressionIterator.java:219)

 Can you tell me which JDK you had to get the incorrectly extracted
 tokens?

 thanks

 2014-12-16 14:27 GMT+01:00 Aki Yoshida elak...@gmail.com:
  @Jan,
  I just missed your previous replies.
  I just saw you also have provided the JDK info already.
  thanks.
 
  2014-12-16 14:25 GMT+01:00 Aki Yoshida elak...@gmail.com:
  It's good to hear it is working in your environment.
 
  by the way, I saw your camael doc update regarding the concrete
 error
  example you saw.
  We need to formulate that differently.
  There is a small sanity check before starting the tokenization (not
  comparing the impl name itself but trying to infer its conformance
 by
  its initial behavior). That check was working for Oracle JDK 7 on
 OSX.
  I would like to know which JDK that you use. In any case, we can
  either make the initial sanity check to detect this incompatible
  behavior and detect it later if it is not detected at the beginning.
  In either way, we can throw an exception at some point.
 
  regards, aki
 
  2014-12-16 10:18 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de:
  Sorry for my late answer, I was ill :(
 
  Thanks for your sample project, I investigated into it now.
  All tests passed. (Camel 2.14.0)
 
  But your test used the XMLTokenExpressionIterator directly I
  migrated my own test class (using the RouteBuilder) into your
 project.
  - added the test class
  - added the xsd
  - added the dependency to commons-io + camel-test-spring
  - changed the paths in my test class to fit your directory layout
  Now this also passed.
 
  It's good to see that there is no bug in Camel. ;)
 
 
  Because my example still fails in my other environment I check that
 ...
 
 
  Jan
 
 
  -Ursprüngliche Nachricht-
  Von: Aki Yoshida [mailto:elak...@gmail.com]
  Gesendet: Mittwoch, 10. Dezember 2014 23:57
  An: users@camel.apache.org
  Betreff: Re: AW: camel - xsd
 
  i meant woodstox-core-asl (e.g., woodstox-core-asl-4.4.1.jar).
  its maven coordinate is
 
  mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1
 
  you need to have woodstox or some other parser that reliably
  reports the offset location at each parse event.
  Sjsxp (sun/oracle implementation included in JDK) doesn't do that,
  so you can't use it.
 
  jmtest.tar.gz contains a maven project that can be executed
  directly by typing mvn test at the console or can be imported into
  your eclipse IDE.
 
  2014-12-10 13:13 GMT+01:00 Aki Yoshida elak...@gmail.com:
   i just created a test that uses your data and verified that it
 is
  working fine.
   please take a look at this file at my dropbox.
   https://www.dropbox.com/s/pfgvs9si9bvujxo/jmtest.tar.gz?dl=0
   just extract the files into camel-core and run JMNewsTest.
   and see if that works in your environment, (i believe it does).
  
   in that case, we need to find out the difference to your case.
   do you have woodstox-api in your class path?
  
  
   2014-12-10 12:15 GMT+01:00 Aki Yoshida elak...@gmail.com:
   okay.
   let me take a look.
  
  
   2014-12-10 

Re: How to Maintain Session with CXF?

2014-12-17 Thread billybobbain
I solved this by grabbing the Set-Cookie header coming back from the web
service and then adding it as a Cookie header.

setHeader headerName=Cookie
simple${header.Set-Cookie}/simple
/setHeader

Maybe there is a better way to do this, but it works for now. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-Maintain-Session-with-CXF-tp5760786p5760840.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Intermittent error: No content to map due to end-of-input

2014-12-17 Thread shanaloh
Hi Willem, 

The only thing before the unmarshal is the wiretap. I am almost certain the
issue is with the wiretap. 

RouteDefinition rdRouteDefinition = from( createListeningService()
).routeId( getRouteId() ); 
*rdRouteDefinition.wireTap(ABCMaintenanceRouteDefinition.AUDIT_LOGGING.getCamelRoute()
);* 
rdRouteDefinition.unmarshal().json(JsonLibrary.Jackson,
ExecutionRequest.class) 


* removed wiretap, i cannot re-produce the issue (tried 100 requests)
* added wiretap back, the error comes back intermittently 


I don't know why the wiretap should cause such issue tho. The Wiretap page
suggests the use of stream caching and we have adopted too. Any suggestions?

Thanks

Shan






--
View this message in context: 
http://camel.465427.n5.nabble.com/Intermittent-error-No-content-to-map-due-to-end-of-input-tp5760725p5760841.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel REST + Swagger [configuration]

2014-12-17 Thread cristianmiranda
Hi guys,

I'm new to swagger and I want to configure it in my *CDI* application (no
Spring at all).
I'm following the pet shop example and this specific one:
https://github.com/apache/camel/tree/master/examples/camel-example-servlet-rest-tomcat
just changing from *SpringRestSwaggerApiDeclarationServlet* to
*ServletListenerRestSwaggerApiDeclarationServlet*
The rest of the configuration is exactly the same but I can't make it work
yet. When requesting localhost:8080/api-docs it just doesn't display
anything (no errors).

Is there any extra configuration that it's required by using
ServletListenerRestSwaggerApiDeclarationServlet?

Any ideas?

Thanks in advance



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-REST-Swagger-configuration-tp5760839.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to get the on exception retry delay from database??

2014-12-17 Thread pradeep
In an on exception cluse how to get the retry delay from database. Here is
the scenario

1. Exception caught in on exception clues. We use retryWhile() with a bean
to get get the number of retries from database.
2. But not sure how to get the retry delay from databse and set in
redeliveryDelay(Long l) because this api only supports property place
holder.

Regards,
PradeepN



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-get-the-on-exception-retry-delay-from-database-tp5760843.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel REST + Swagger [configuration]

2014-12-17 Thread Claus Ibsen
Hi

Currently only spring is supported out of the box. You would need to
implement a custom code to lookup the camel contexts from cdi

eg something like this but for cdi
https://github.com/apache/camel/blob/master/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/spring/SpringRestSwaggerApiDeclarationServlet.scala

We love contributions so if you get something working you are welcome
to contribute back
http://camel.apache.org/contributing.html

On Wed, Dec 17, 2014 at 8:20 PM, cristianmiranda cris...@gmail.com wrote:
 Hi guys,

 I'm new to swagger and I want to configure it in my *CDI* application (no
 Spring at all).
 I'm following the pet shop example and this specific one:
 https://github.com/apache/camel/tree/master/examples/camel-example-servlet-rest-tomcat
 just changing from *SpringRestSwaggerApiDeclarationServlet* to
 *ServletListenerRestSwaggerApiDeclarationServlet*
 The rest of the configuration is exactly the same but I can't make it work
 yet. When requesting localhost:8080/api-docs it just doesn't display
 anything (no errors).

 Is there any extra configuration that it's required by using
 ServletListenerRestSwaggerApiDeclarationServlet?

 Any ideas?

 Thanks in advance



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-REST-Swagger-configuration-tp5760839.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: How to get the on exception retry delay from database??

2014-12-17 Thread Claus Ibsen
Hi

You can change the delay by setting a new value in the header with key
Exchange.REDELIVERY_DELAY



On Thu, Dec 18, 2014 at 7:04 AM, pradeep pradeepnc...@gmail.com wrote:
 In an on exception cluse how to get the retry delay from database. Here is
 the scenario

 1. Exception caught in on exception clues. We use retryWhile() with a bean
 to get get the number of retries from database.
 2. But not sure how to get the retry delay from databse and set in
 redeliveryDelay(Long l) because this api only supports property place
 holder.

 Regards,
 PradeepN



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/How-to-get-the-on-exception-retry-delay-from-database-tp5760843.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Camel REST + Swagger [configuration]

2014-12-17 Thread Claus Ibsen
Hi

I logged a ticket to use jmx instead which means it would work for
anyone. At first glance it looks as that should be doable.
https://issues.apache.org/jira/browse/CAMEL-8161

On Thu, Dec 18, 2014 at 7:17 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Currently only spring is supported out of the box. You would need to
 implement a custom code to lookup the camel contexts from cdi

 eg something like this but for cdi
 https://github.com/apache/camel/blob/master/components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/spring/SpringRestSwaggerApiDeclarationServlet.scala

 We love contributions so if you get something working you are welcome
 to contribute back
 http://camel.apache.org/contributing.html

 On Wed, Dec 17, 2014 at 8:20 PM, cristianmiranda cris...@gmail.com wrote:
 Hi guys,

 I'm new to swagger and I want to configure it in my *CDI* application (no
 Spring at all).
 I'm following the pet shop example and this specific one:
 https://github.com/apache/camel/tree/master/examples/camel-example-servlet-rest-tomcat
 just changing from *SpringRestSwaggerApiDeclarationServlet* to
 *ServletListenerRestSwaggerApiDeclarationServlet*
 The rest of the configuration is exactly the same but I can't make it work
 yet. When requesting localhost:8080/api-docs it just doesn't display
 anything (no errors).

 Is there any extra configuration that it's required by using
 ServletListenerRestSwaggerApiDeclarationServlet?

 Any ideas?

 Thanks in advance



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-REST-Swagger-configuration-tp5760839.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



-- 
Claus Ibsen
-
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Java DSl XPATH text node

2014-12-17 Thread sekaijin
I've tried to use String.class argument to convert it in string but I get an
empty string. 

Thank to help me 
I'm running camel 2.8.1 


Thank



--
View this message in context: 
http://camel.465427.n5.nabble.com/Java-DSl-XPATH-text-node-tp5760835p5760859.html
Sent from the Camel - Users mailing list archive at Nabble.com.