Re: Zookeeper component RoutePolicy

2014-10-30 Thread Henryk Konsek
 What I want is to know if it is possible to when message 1 arrives
 the consumer A consumes it, when message 2 arrives the consumer B consumes
 it, when message 3 arrives the consumer A consumes it, and so on.

What about load balancer [1] then?

Laters!

[1] http://camel.apache.org/load-balancer.html

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Re: Camel rest-dsl sending 400(Client Error) Status code's

2014-10-30 Thread Dewitte P-Alban
Hi,

I am assuming you are doing your check in a custom processor or something
similiar. If you want to send your an HTTP Error code just add the header
Exchange.HTTP_RESPONSE_CODE.

For example : exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, 204);

Best regards

Pierre-Alban DEWITTE
@__pad__



On Thu, Oct 30, 2014 at 1:50 AM, leofprince leofpri...@gmail.com wrote:

 Hello Camel Users,
 I am developing REST services using camel
 REST-DSL[http://camel.apache.org/rest-dsl.html]component.I am successful
 in
 sending JSON request for happy path and get the response on the same using
 (Rest-DSL and camel servlet) combination. Now as we move forward the client
 may sent Rest Service request with not enough values or invalid valid
 request ,now I am looking for ways to send 400 Responses from REST DSL in
 case where request is not valid,Please advise on the way to achieve this.

 I have added the same question in,

 http://stackoverflow.com/questions/26631697/camel-rest-dsl-sending-400-status-codes


 Thanks!



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-rest-dsl-sending-400-Client-Error-Status-code-s-tp5758320.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: I cant throw the correct HTTP status codes from camel.

2014-10-30 Thread Dewitte P-Alban
Hi,

Did you tried with exchange.getOut().setHeader(
Exchange.HTTP_RESPONSE_CODE,
new Integer(522));

Best regard

Pierre-Alban DEWITTE
@__pad__

On Wed, Oct 29, 2014 at 5:01 PM, Henryk Konsek hekon...@gmail.com wrote:

 Hi,

   from(direct:channel2).onException(Exception.class).process(new
  LogError(HubConstants.CHANNEL2.getValue())).end().recipientList()
  .method(Util.class, getEndpoint);

 Can you share the consumer part of the route with us? :)

 Cheers.

 --
 Henryk Konsek
 http://henryk-konsek.blogspot.com



Re: Quartz job data deletion in clustered quartz2

2014-10-30 Thread Claus Ibsen
Hi

Have you tried setting deleteJob=false
http://camel.apache.org/quartz2

On Wed, Oct 29, 2014 at 8:43 AM, lakshmi.prashant
lakshmi.prash...@gmail.com wrote:
 Hi Claus,

   Thanks a lot. Adding *managementNamePattern=#name#* to camelcontext in
 blueprint  XML seems to click.

   This resolved the 2 issues  with both re-deployment of the same bundle 
 also the load-balancing issue when the other VM's acquire the trigger  look
 up the camel context.

   We still have 1 pending issue that I reported: Sharing scheduler across
 camelcontexts with clustered quartz..

  a) If we expose the SchedulerFactory as a OSGI service and refer to the
 same Scheduler Instance across the blueprint bundles (to control the number
 of Quartz DB accesses):

   The CamelJob class gets uninstalled when we undeploy 1 route bundle. The
 rest of the quartz route bundles also stop firing, once we have undeployed 1
 camel-quartz2 bundle:

 'Caused by: java.lang.ClassNotFoundException: Unable to load class
 org.apache.camel.component.quartz2.CamelJob by any known loaders.'

 This is not a blocker, but a performance issue.
 Appreciate any help in resolving the above issue, as well.

 Thanks,
 Lakshmi



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Quartz-job-data-deletion-in-clustered-quartz2-tp5757508p5758277.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: I cant throw the correct HTTP status codes from camel.

2014-10-30 Thread Frankiboy
Yes i tried , but i fiend out a solution 


This dosen´t work:

 exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 522);
 exchange.getOut().setFault(true);

Becouse there is already a exception on the exchange.

But here is the trick, remove the exception that already is on the exchange.

  exchange.removeProperty(Exchange.EXCEPTION_CAUGHT);
  exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 522);
  exchange.getOut().setFault(true);

now i get a 522 back in the reponse and not a 500 


Thanks out there 



--
View this message in context: 
http://camel.465427.n5.nabble.com/I-cant-throw-the-correct-HTTP-status-codes-from-camel-tp5758282p5758335.html
Sent from the Camel - Users mailing list archive at Nabble.com.


AW: How to pick multiple file in same route

2014-10-30 Thread jhm
In this special case (file + hashcode) the aggregator could store the hashvalue 
as header.
So a validation step could compare the actual value with the expected (header) 
one.

Or the aggregator could do both and throw an exception or send a special 
exchange/headervalue ...


Jan

 -Ursprüngliche Nachricht-
 Von: Christian Müller [mailto:christian.muel...@gmail.com]
 Gesendet: Mittwoch, 29. Oktober 2014 22:03
 An: users@camel.apache.org
 Betreff: Re: How to pick multiple file in same route
 
 http://camel.apache.org/aggregator2.html
 
 Best,
 
 Christian
 -
 
 Software Integration Specialist
 
 Apache Member
 V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
 Apache Incubator PMC Member
 
 https://www.linkedin.com/pub/christian-mueller/11/551/642
 
 On Wed, Oct 29, 2014 at 1:07 PM, dkum003 dhananjay.ku...@amadeus.com
 wrote:
 
  Hi,
 
  Currently we are picking one files and corresponding .md5 file from
  ftp/sftp  server.
  The file name has some naming convention.
  For this we are using PollingConsumerPollStrategy and
  AntPathMatcherGenericFileFilter.
 
  Now I want to process multiple file based on some condition, what we
  have to do?
 
  Any help will be appreciated.
 
  Regards,
  Dhananjay
 
 
 
  --
  View this message in context:
  http://camel.465427.n5.nabble.com/How-to-pick-multiple-file-in-same-
 ro
  ute-tp5758294.html Sent from the Camel - Users mailing list archive
 at
  Nabble.com.
 



Re: Aggregate up to N ASAP

2014-10-30 Thread Henryk Konsek
 Henryk, that sounds like a limitation in the design of aggregators in Camel,
 rather than a necessarily desirable end goal.

Your aggregation predicate would make sense only for consumers which
can pull messages in the batch. If your consumer can do it, then you
should create custom aggregation completion predicate that is aware of
the fact that message received from consumer is in fact a batch of the
messages. Then your predicate could decide to complete aggregation if
received batch is big enough or continue to aggregate otherwise.

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com


Adding jaas authentication to a cxf endpoint in karaf

2014-10-30 Thread Hilderich
Dear Support Community,

We have in use Apache Karaf 2.3.2 with Apache Camel 2.11.1.

There is a bundle with a Camel Route that creates a Web Service:



This was already running smoothly with not problems. Now there was the
requirement to lock this web service via Basic Authentication. 
Therefore I have read something about it how to do it in combination with
Karaf and Jetty and I did it like here:

http://camel.465427.n5.nabble.com/camel-jetty-authentication-JAAS-td3293819.html

I have no bundle conflicts, but what I am facing now when Karaf starts is a
NullpointerException:



It looks like camel-cxf cannot read the URI *jetty:http://...*

In my point of view all requirements are installed:
karaf@root features:list | grep -i jetty
[installed  ] [2.7.6  ] cxf-http-jetty 
cxf-2.7.6
[installed  ] [2.11.1 ] camel-jetty
camel-2.11.1
[installed  ] [7.6.8.v20121106] jetty  
karaf-2.3.2 Provide Jetty engine sup
port

Any ideas?

Kind regards,
Hilderich







--
View this message in context: 
http://camel.465427.n5.nabble.com/Adding-jaas-authentication-to-a-cxf-endpoint-in-karaf-tp5758340.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Configuring a servlet with camel-jetty

2014-10-30 Thread jack atwork
It's contributed via spring. I can see this part is fine because if I
misconfigure the id with something like 'MyUnregisteredContextHandler' then
I get a NoSuchBeanException when the camelContext is created.

Does anybody know of any examples of setting up a servlet with camel-jetty?
If I add a filter to the handler I can see it gets executed on requests but
for some reason any servlets I add never get invoked.

Jack

On 29 October 2014 15:36, Andrew Block andy.bl...@gmail.com wrote:

 Jack,

 Have you added the handler to the Camel Registry with the name
 MyContextHandler? In your example, you are referencing the
 “MyContetHandler” in your route, but never show it being added to the Camel
 registry.

 - Andy

 --
 Andrew Block


 On October 29, 2014 at 10:14:21 AM, jack atwork (jrmpatw...@gmail.com)
 wrote:

 apologies, hit send by a bit early!

 Hi,

 I'm trying to configure a servlet using the camel-jetty component but I'm
 struggling and hoping somebody might be able to point out what I'm doing
 wrong.

 I expected to be able to register a new Handler and reference it in the
 endpoint uri.

 ServletContextHandler handler = new ServletContextHandler();
 handler.addServlet(new ServletHolder(myServlet), /*);

 Then adding a route to my routeBuilder:

 from(jetty:
 http://localhost:8080/?matchOnUriPrefix=truehandlers=#MyContextHandler;)
 .to(log:foo);

 I can see my servlet gets initialised but it is never invoked on any
 requests. Can anyone tell me what's missing?

 Thanks,

 Jack


 On 29 October 2014 15:06, jack atwork jrmpatw...@gmail.com wrote:

  Hi,
 
  I'm trying to configure a servlet using the camel-jetty component but
 I'm
  struggling and hoping somebody might be able to point out what I'm doing
  wrong.
 
  I expected to be able to register a new Handler and reference it in the
  endpoint uri .
 
  ServletContextHandler handler = new ServletContextHandler();
  handler.addServlet(new ServletHolder(myServlet), /*);
 
  Then adding a route to my routeBuilder:
 
 
 
 
 




camel-jetty [2.10.7] resends message after 200 secs

2014-10-30 Thread Christoph Schmid
Hi all,

It looks like camel jetty in version 2.10.7 (2.14.0 does not do this) sends
messages again to the following processor, if this processor hasn't finished
after 200 seconds.
Is there a way to increase the time or deactivate this? (I guess I run into
a timeout of some kind)

Thank
Christoph


Example: The Route 

from(jetty:http://localhost:{{port}}/myapp/myservice3;)
.process(new Processor() {  
private int exchangeCounter = 1;
@Override
public void process(Exchange exchange) throws Exception {
int exchangeNumber = exchangeCounter++;
int timeToWait = 250;   
int waited;
for(waited = 0; waitedtimeToWait; waited = waited + 25) {  

System.out.println(Exchange + exchangeNumber + : waited 
 + waited
+  seconds ( + ((100 * waited)/timeToWait) +  %) );
Thread.sleep(25 * 1000);

}
System.out.println(Exchange + exchangeNumber + : waited  + 
waited + 
seconds ( + ((100 * waited)/timeToWait) +  %) );
}
}); 

creates the following output after being called once.

Exchange 1: waited 0 seconds (0 %)
Exchange 1: waited 25 seconds (10 %)
[...]
Exchange 1: waited 200 seconds (80 %)
Exchange 2: waited 0 seconds (0 %)
Exchange 1: waited 225 seconds (90 %)
Exchange 2: waited 25 seconds (10 %)
Exchange 1: waited 250 seconds (100 %)
Exchange 2: waited 50 seconds (20 %)
[...]
Exchange 2: waited 200 seconds (80 %)
Exchange 3: waited 0 seconds (0 %)
Exchange 2: waited 225 seconds (90 %)
Exchange 3: waited 25 seconds (10 %)
Exchange 2: waited 250 seconds (100 %)
Exchange 3: waited 50 seconds (20 %)
Exchange 3: waited 75 seconds (30 %)
[...]

during exchange 4 i get a CamelExecutionException (The server localhost
failed to respond).





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jetty-2-10-7-resends-message-after-200-secs-tp5758342.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-jms 2.14.0 option validation on startup from an expression

2014-10-30 Thread sandp
I was able to get over the issue by setting disableReplyTo=true on the
producer endpoint.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-jms-2-14-0-option-validation-on-startup-from-an-expression-tp5757289p5758344.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CXF with WS-Security using JAAS

2014-10-30 Thread garethahealy
I am trying to secure a CXF endpoint with JAAS. But am hitting an issue/not
fully understanding how to get the PasswordDigest working. I have the
solution working when the password type is PasswordText.So I've created a
new realm, which points to a file as per below:
lt;jaas:config name=quot;webservicesquot; rank=quot;-1quot;gt;   
lt;jaas:module
className=quot;org.apache.karaf.jaas.modules.properties.PropertiesLoginModulequot;
flags=quot;requiredquot;gt; users =
$[karaf.base]/etc/com.garethahealy.webservices.cfg 
encryption.enabled
= true  encryption.name = jasyptencryption.prefix = ENC(   
encryption.suffix = )  detailed.login.exception = true
debug = truelt;/jaas:modulegt;lt;/jaas:configgt;
The contents of the file on first run is 'user.gareth=healy', which is then
re-written after the first call, to be ENC(hashed value), which seems
correct.Below is the WSS4J / JAAS / CXF setup:
lt;bean id=quot;authenticationInterceptorquot;
class=quot;org.apache.cxf.interceptor.security.JAASLoginInterceptorquot;gt;
lt;property name=quot;contextNamequot; value=quot;webservicesquot;/gt; 
lt;property name=quot;reportFaultquot;
value=quot;truequot;/gt;lt;/beangt;lt;bean
id=quot;wss4jInInterceptorquot;
class=quot;org.apache.cxf.ws.security.wss4j.WSS4JInInterceptorquot;gt;
lt;argumentgt;lt;mapgt; lt;entry 
key=quot;actionquot;
value=quot;UsernameToken Timestampquot; /gt; lt;entry
key=quot;passwordTypequot; value=quot;PasswordDigestquot; /gt; lt;!--
PasswordText / PasswordDigest --gt;lt;/mapgt;
lt;/argumentgt;lt;/beangt;   lt;cxf:cxfEndpoint
id=quot;helloWorldCxfquot;
address=quot;${cxf.helloworld.transport}://0.0.0.0:${cxf.helloworld.port}/cxf/helloWorldServicequot;

serviceClass=quot;com.garethahealy.helloworld.HelloWorldEndpointquot;gt;   
lt;cxf:inInterceptorsgt;  lt;ref
component-id=quot;wss4jInInterceptorquot; /gt;   lt;ref
component-id=quot;authenticationInterceptorquot; /gt;
lt;/cxf:inInterceptorsgt; lt;cxf:propertiesgt;  lt;entry
key=quot;schema-validation-enabledquot;
value=quot;${schema.validation.enabled}quot; /gt;lt;entry
key=quot;loggingFeatureEnabledquot;
value=quot;${logging.isCxfDebug}quot; /gt;   lt;entry
key=quot;ws-security.validate.tokenquot; value=quot;falsequot;/gt;
lt;/cxf:propertiesgt;lt;/cxf:cxfEndpointgt;
Below is the request when sending PasswordDigest:
Address: http://0.0.0.0:9001/cxf/helloWorldServiceEncoding:
UTF-8Http-Method: POSTContent-Type: text/xml;charset=UTF-8Headers:
{accept-encoding=[gzip,deflate], connection=[keep-alive],
Content-Length=[1242], content-type=[text/xml;charset=UTF-8],
Host=[0.0.0.0:9001],
SOAPAction=[http://helloworld.garethahealy.com/SayHello;],
User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]}Payload:lt;soapenv:Envelope
xmlns:hel=quot;http://helloworld.garethahealy.comquot;
xmlns:soapenv=quot;http://schemas.xmlsoap.org/soap/envelope/quot;gt;lt;soapenv:Headergt;
   
lt;wsse:Security
xmlns:wsse=quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsdquot;
xmlns:wsu=quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsdquot;
soapenv:mustUnderstand=quot;1quot;gt;lt;wsu:Timestamp
wsu:Id=quot;TS-85795D5F327115C93A141467959615289quot;gt;   
lt;wsu:Createdgt;2014-10-30T14:33:16Zlt;/wsu:Createdgt;   
lt;wsu:Expiresgt;2014-10-30T14:33:17Zlt;/wsu:Expiresgt;   
lt;/wsu:Timestampgt;lt;wsse:UsernameToken
wsu:Id=quot;UsernameToken-85795D5F327115C93A141467959615188quot;gt;   
lt;wsse:Usernamegt;user.garethlt;/wsse:Usernamegt;   
lt;wsse:Password
Type=quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigestquot;gt;y2rUhVaSPSYGGJxx5vz/gAe8Kxo=lt;/wsse:Passwordgt;
   
lt;wsse:Nonce
EncodingType=quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binaryquot;gt;AsgNPh2VykCuQ0CN4EvRPw==lt;/wsse:Noncegt;
   
lt;wsu:Createdgt;2014-10-30T14:33:16.151Zlt;/wsu:Createdgt;   
lt;/wsse:UsernameTokengt;lt;/wsse:Securitygt;lt;/soapenv:Headergt;lt;soapenv:Bodygt;
   
lt;hel:helloWorldRequestgt;lt;hellogt;garethlt;/hellogt;   
lt;/hel:helloWorldRequestgt;lt;/soapenv:Bodygt;lt;/soapenv:Envelopegt;
Which fails on the password match with: Unauthorized : Password for
user.gareth does not match.Any pointers to what i am doing wrong would be
helpful. This is running on JBoss Fuse 6.1 - redhat379 and i am sending the
request from SoapUI 5



--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-with-WS-Security-using-JAAS-tp5758345.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: AutoMocking not working with Blueprint?

2014-10-30 Thread wjmcdonald
camel-version2.10.0.redhat-60024/camel-version
activemq-version5.8.0/activemq-version




--
View this message in context: 
http://camel.465427.n5.nabble.com/AutoMocking-not-working-with-Blueprint-tp5758319p5758346.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Handle first delivery failure differently then all following retries?

2014-10-30 Thread John Taylor
dunnlow dunn...@yahoo.com writes:

 I'm using Camel 2.10.3 and Spring 3.1 with XML route configuration.   I have
 a transacted route that is getting messages from several different sources
 (and saving them to a database).  When there is an exception writing to the
 database I want to send an alert (a web service) on the FIRST roll back.  In
 other words, when the database is down, I want to keep retying the database,
 but I don't want to send an alert for every retry.

 For JMS I know I can look at the JMSRedelivered header, but for other
 endpoints (ie file) I don't know how to check for a redelivered message.  As
 I understand it, there isn't a way.

 I'm considering pushing every non-JMS message that fails to the JMS queue
 perhaps with a custom header.  If I do that, is there a way to add that
 custom header to the message that is getting rolled back from my JMS queue
 (the first time)?  Is there a better way to implement this?

 Thanks -J





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Handle-first-delivery-failure-differently-then-all-following-retries-tp5757453.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Configuring a servlet with camel-jetty

2014-10-30 Thread Willem Jiang
Can you explain why you need a setup a servlet for the camel-jetty component?
As camel-jetty setup the ServletContextHandler by itself, it doesn’t support 
you to do it that way.

--  
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



On October 30, 2014 at 7:12:33 PM, jack atwork (jrmpatw...@gmail.com) wrote:
 It's contributed via spring. I can see this part is fine because if I
 misconfigure the id with something like 'MyUnregisteredContextHandler' then
 I get a NoSuchBeanException when the camelContext is created.
  
 Does anybody know of any examples of setting up a servlet with camel-jetty?
 If I add a filter to the handler I can see it gets executed on requests but
 for some reason any servlets I add never get invoked.
  
 Jack
  
 On 29 October 2014 15:36, Andrew Block wrote:
  
  Jack,
 
  Have you added the handler to the Camel Registry with the name
  MyContextHandler? In your example, you are referencing the
  “MyContetHandler” in your route, but never show it being added to the Camel
  registry.
 
  - Andy
 
  --
  Andrew Block
 
 
  On October 29, 2014 at 10:14:21 AM, jack atwork (jrmpatw...@gmail.com)
  wrote:
 
  apologies, hit send by a bit early!
 
  Hi,
 
  I'm trying to configure a servlet using the camel-jetty component but I'm
  struggling and hoping somebody might be able to point out what I'm doing
  wrong.
 
  I expected to be able to register a new Handler and reference it in the
  endpoint uri.
 
  ServletContextHandler handler = new ServletContextHandler();
  handler.addServlet(new ServletHolder(myServlet), /*);
 
  Then adding a route to my routeBuilder:
 
  from(jetty:
  http://localhost:8080/?matchOnUriPrefix=truehandlers=#MyContextHandler;)  
  .to(log:foo);
 
  I can see my servlet gets initialised but it is never invoked on any
  requests. Can anyone tell me what's missing?
 
  Thanks,
 
  Jack
 
 
  On 29 October 2014 15:06, jack atwork wrote:
 
   Hi,
  
   I'm trying to configure a servlet using the camel-jetty component but
  I'm
   struggling and hoping somebody might be able to point out what I'm doing
   wrong.
  
   I expected to be able to register a new Handler and reference it in the
   endpoint uri .
  
   ServletContextHandler handler = new ServletContextHandler();
   handler.addServlet(new ServletHolder(myServlet), /*);
  
   Then adding a route to my routeBuilder:
  
  
  
  
  
 
 
  



Re: Adding jaas authentication to a cxf endpoint in karaf

2014-10-30 Thread Willem Jiang
Hi

camelcxf:cxfEndpoint id=warehouseService
wsdlURL=wsdl/externalWarehouseService.wsdl

serviceClass=de.company.production.externalwarehouse.ws.ExternalWarehousePortTypeImpl
address=/externalWarehouse loggingFeatureEnabled=true”

means you leverage the pax web instead the Jetty engine which is embedded to 
CXF endpoint to publish the service.

You just need to change the address to 
“http://localhost:9000/externalWarehouse” and update the httpj:engine 
port=“9000” , then your jetty configuration should work now.

--  
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



On October 30, 2014 at 5:42:25 PM, Hilderich (hilde.sch...@yahoo.de) wrote:
 Dear Support Community,
  
 We have in use Apache Karaf 2.3.2 with Apache Camel 2.11.1.
  
 There is a bundle with a Camel Route that creates a Web Service:
  
  
  
 This was already running smoothly with not problems. Now there was the
 requirement to lock this web service via Basic Authentication.
 Therefore I have read something about it how to do it in combination with
 Karaf and Jetty and I did it like here:
  
 http://camel.465427.n5.nabble.com/camel-jetty-authentication-JAAS-td3293819.html
   
  
 I have no bundle conflicts, but what I am facing now when Karaf starts is a
 NullpointerException:
  
  
  
 It looks like camel-cxf cannot read the URI *jetty:http://...*
  
 In my point of view all requirements are installed:
 karaf@root features:list | grep -i jetty
 [installed ] [2.7.6 ] cxf-http-jetty
 cxf-2.7.6
 [installed ] [2.11.1 ] camel-jetty
 camel-2.11.1
 [installed ] [7.6.8.v20121106] jetty
 karaf-2.3.2 Provide Jetty engine sup
 port
  
 Any ideas?
  
 Kind regards,
 Hilderich
  
  
  
  
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Adding-jaas-authentication-to-a-cxf-endpoint-in-karaf-tp5758340.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Bundle using camel-spring-ws failes to deploy in Karaf

2014-10-30 Thread Willem Jiang
I’m afraid Spring-DM cannot work with Spring4.x, you need to use Karaf 2.4.x 
which still use spring 3.2.x to deploy the camel-spring-ws feature.

--  
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



On October 29, 2014 at 7:35:53 PM, rsteppac2 (r...@steppacher.name) wrote:
 Hi all,
  
 I have a small test project that uses camel-spring-ws (2.14.0). It runs just
 fine in a Spring context and the WS client calls are acted on by my routes.
 Now I want to convert it to blueprints to deploy it in Karaf (3.0.2).
 However, the deployment of the bundle fails with:
  
 waiting for namespace handlers
 [http://www.springframework.org/schema/web-services]
  
 Can anyone tell me which bundle/feature is supposed to contribute this
 namespace handler? The feature descriptor I am using to deploy the bundle
 (pas-webservice-hp) looks like this:
  
  name=ams-feature
  description=PAS Webservice for HPs
 camel-core
 camel-spring
 camel-blueprint
 camel-spring-ws
  dependency=truemvn:ch.vivates.ams/base/3.0.0-SNAPSHOT
 mvn:ch.vivates.ams/pas-webservice-hp/3.0.0-SNAPSHOT
  
  
  
 The offending part of the blueprints descriptor is this:
  
  
  
 which is required by this:
  
  class=org.springframework.ws.transport.http.WsdlDefinitionHttpHandler  
  
  
  
 Might be I am going about it the wrong way altogether... In the Spring
 context descriptor I used the JDK HTTP server as described here
  
 to avoid having to run a servlet container. I copied the same configuration
 over to the blueprint descriptor to get started. Is this approach going to
 work at all when deploying to Karaf?
 The WsdlDefinitionHttpHandler is specific to using the embedded HTTP server,
 but using the dispatcher servlet in a container still requires me to provide
 the WSDL I want to expose with a tag.
  
  
 Thanks for your help!
 Ralf
  
 PS.: This is a resend with slightly modified subject because the first
 message was rejected due to a too high spam score. If both make it to the
 list, my apologies!
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Bundle-using-camel-spring-ws-failes-to-deploy-in-Karaf-tp5758291.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: AutoMocking not working with Blueprint?

2014-10-30 Thread Willem Jiang
Can you try the latest release Camel 2.14.0 ?

--  
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



On October 31, 2014 at 1:05:11 AM, wjmcdonald 
(william.mcdon...@transcentra.com) wrote:
 2.10.0.redhat-60024
 5.8.0
  
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/AutoMocking-not-working-with-Blueprint-tp5758319p5758346.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ

2014-10-30 Thread Willem Jiang
I think you can try to use camel transport of CXF[1], in this way the camel 
error handler can be use to help you the exception handler there.

[1]http://camel.apache.org/camel-transport-for-cxf.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



On October 29, 2014 at 9:41:16 PM, g8torPaul (paul.mann...@ventyx.abb.com) 
wrote:
 I have an inbound CXF webservice that consumes a SOAP message off a JMS
 queue.
 The endpoint is configured via Camel Spring using the
 org.apache.cxf.transport.jms.JMSConfigFeature.
 The JMS Configuration is setup to consume off an ActiveMQ JMS queue and it
 is transactional.
 The CXF endpoint has a inbound interceptor for WSSecurity.
 If a user sends in a SOAP message with invalid Security headers the CXF
 endpoint interceptor will throw an exception.
 The exception gets processed by the internal Spring DMLC used by the CXF
 JMSConfigFeature and a rollback is initiated.
 Since our ActiveMQ is setup with a redelivery policy to continuously
 redeliver the message, the message gets rolled back to the queue and gets
 redelivered.
  
 The problem is that the message gets another exception upon redelivery and
 repeats the cycle infinitely which results in blocking the JMS queue (which
 only has one a consumer).
  
 I am trying to figure out how to handle this special case of WSSecurity
 exceptions such that I can dump the message to a log and remove the message
 from the queue for redelivery.
 Camel Exception handling (errorHandler, onException) does not help in this
 case because the message never makes it into the route (the exception occurs
 in an interceptor).
  
 Does anyone know a way to handle this?
  
 Thanks,
  
 g8torPaul
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tp5758297.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: SMPP component and problem with valid period (relative) and data message

2014-10-30 Thread Willem Jiang
For Q1, I just checked the camel-smpp code, it just pass the message header 
setting to 
Maybe you doesn’t set the header rightly. Please take a look at this[1]

For Q2, please fill feel to create JIRA[2] and submit you patch for it.

[1]http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
[2]http://issues.apache.org/jira/browse/CAMEL

--  
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



On October 28, 2014 at 9:09:32 PM, hanusto (hanu...@gmail.com) wrote:
 Hello,
  
 I have two questions for SMPP camel component:
  
 1) how to set valid period as relative ? It can be defined in absolute time
 format or relative time format if you provide it as String as specified in
 chapter 7.1.1 in the smpp specification v3.4. in format 010R
 as one day:
  
 exchange.getIn().setHeader(SmppConstants.VALIDITY_PERIOD,
 constant(010R));
  
 but in packet trace I see deafult value because this format is incorrect,
 probably, but exactly based upon specification. Maybe bug?
  
 2) I would like to send push sms (m-notification-ind PDU type). As content
 of message (exchange.getIn().setBody()) I am sending byte array as whole
 message with UDHI segment. Data coding schema is Octet unspecified (8-bit
 binary) (0x04). Problem is that SMPP component calculates length of message
 and EsmClass is configured in right way only if length is greater than 140
 number of bytes.
  
 In SmppSubmitSmCommand:
 template.setEsmClass(new ESMClass(MessageMode.DEFAULT,
 MessageType.DEFAULT,
 GSMSpecificFeature.UDHI).value());
  
 I think that message size is not related to UDHI and therefore why is
 splitted and after that if segments is more than one, EmsClass with UDHI is
 configured properly?
  
 Please, is here any solution how to send m-notification-ind PDU type? As hot
 fix I checkout SMPP camel component and use custom modification of this
 behaviour.
  
 Thanks,
 Tomas
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/SMPP-component-and-problem-with-valid-period-relative-and-data-message-tp5758217.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Camel-Cache 2.14.0 with MyBatis

2014-10-30 Thread sandp
Hi,
I'm trying to implement caching with camel-cache. The Idea is to cache the
results of  a mybatis query on a table update. I'm looking at something that
would automatically flush the cache for the key, run the mybatis query and
cache its result again?

A restlet endpoint would look into the cache and produce a response.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Cache-2-14-0-with-MyBatis-tp5758349.html
Sent from the Camel - Users mailing list archive at Nabble.com.