Re: Remote Messaging Using CAMEL

2011-11-28 Thread Willem Jiang

On Sun Nov 27 00:30:18 2011, newbiee wrote:

Calus:

Thanks for the reply.

I have already gone through the example MinaTcpTest.java given chpater 7
and other example. The examples show how the actual route works through unit
testing. I understand that but when it comes to
creating my own route, and executing it in real not thorugh unit testing, I
get stuck.


Can I do something like this:

 suppose my command is in a queue digiQueue and I want to send the
commnad from digiQueue to localhost:8999. Can I do someting like this:

 route
   from uri=activemq:digiQueue/
   to
uri=quot;netty:tcp://localhost:8999?sync=trueamp;codec=#digiCodec,lt;simple${body}/simple,
String.class /
 /route


Every command being sent from netty:tcp://localhost:8999 to digi
device starts and ends with c0. Similarly, message sent from digi device
to netty:tcp://localhost:8999 starts and ends with c0. There are many
commands and for each commands there is a different message as a response.
But for the prototype, only one command/message is sufficient.

 Perhaps, I will have to use my own codec so I have included
codec=#digiCodec. I am passing the command by putting the body as an
argument.

 The command going to the digi device has to go through SSH or SSL.
Digi device has username/password. So, I will have to set the
username/password as well. How can I do that? Does Camel provide out of the
box component to execute SSH/SSL commands remotely. How can I do this? If
not, what will I have to custom develop?


If you want to use SSH you can take a look at sshd project[1]
I don't suggest you do it youself.

With that you can write a camel component which can interact with the 
device with InOut message exchange pattern.


[1]the http://mina.apache.org/sshd/


 I want to put the response received from the digi device in another
queue digiResponse for further processing. Can I do that by defining
following route:

 route
 from uri=netty:tcp://localhost:8999 /
 to uri=activemq:digiResponse/
 /route


No, you route could like this

   from uri=somewhere /
   to uri=ssh divice /
   to uri=activemq:digiResonse /



Thank you.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Remote-Messaging-Using-CAMEL-tp5023683p5025091.html
Sent from the Camel - Users mailing list archive at Nabble.com.




--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: HTTP Basic authenticaiton on CxfEndpoint

2011-11-28 Thread Willem Jiang

Hi Antony,

You already find the way to set the conduit with your custom policy :)
If you are using the latest Camel 2.9.0-SNAPSHOT , you can do the job 
by setting the property of the cxfEndpoint like this without digging 
the HttpCondit out


Map String, Object myProperties = new HashMapString, Object
myProperties.add(org.apache.cxf.configuration.security.AuthorizationPolicy, 
myAuthorizationPolicy);

cxfEndpoint.setProperties(myProperties);

On Mon Nov 28 07:47:17 2011, awillia wrote:

Thank you for the reply. I am using the camel cxf end point, so this:

import org.apache.camel.component.cxf.CxfEndpoint;

I have seen some configuration setting for a conduit, but I am trying to do
this programatically (the routes are dynamically created based on database
configuration). So I have started looking at something like this:

CxfEndpoint cxfEndpoint = new CxfEndpoint(app.getMessageServiceUrl(),
camelContext);
cxfEndpoint.setServiceClass(PartnerSMSService.class.getCanonicalName());

CxfProducer producer = (CxfProducer)cxfEndpoint.createProducer();
HTTPConduit conduit = (HTTPConduit)producer.getClient().getConduit();

AuthorizationPolicy policy = new AuthorizationPolicy();
policy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_BASIC);
policy.setUserName(app.getExternalUserName());
policy.setPassword(app.getExternalPassword());
conduit.setAuthorization(policy);

RouteDefinition def = from(RECEIVING_QUEUE_PREFIX + app.getName()); // Pull
from each application's queue
.process(new WebServiceProcessor())
.to(cxfEndpoint); // Send to application's configured endpoint

However I am not so sure that this will work, I think the producer that I am
creating here is not the one that will actually be used?? I am not sure.

Do you have any suggestions for how I might define the conduit
programatically?

thanks
Antony

--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-Basic-authenticaiton-on-CxfEndpoint-tp5021812p5027441.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



How to apply configuration globally for all deployed contexts (OSGi)?

2011-11-28 Thread Muenkel, Markus
Hello,

For monitoring purposes I would like to track Exchanges in all Camel contexts 
that have been started in an OSGi container. I noticed a similar discussion in 
the following thread:
http://camel.465427.n5.nabble.com/intercept-route-td4521314.html#a4521358.

The aim would be to automatically apply Camel objects like Tracer, 
InterceptStrategy and EventNotifier without having to configure this in each 
and every deployed CamelContext.

Without this feature it seems I have to add

  CamelContext.getManagementStrategy().addEventNotifier(myEventNotifier);
  CamelContext.addInterceptStrategy(myInterceptStrategy); // etc.

for all CamelContexts separately in the Java route builder, or the analogous 
configuration for Camel XML DSL. 

Is the feature meanwhile supported? I am currently using Camel 2.8.1.

Best regards,
Markus


Re: How to apply configuration globally for all deployed contexts (OSGi)?

2011-11-28 Thread Willem Jiang
It looks like  a container level work instead of camel context level 
work.
I'm not sure how do you create your camel context in the OSGi 
container.
If you are using Spring or Blueprint , maybe you can override the 
namespace handler part to add the Tracer or EventNotifier by yourself.



On Mon Nov 28 16:50:37 2011, Muenkel, Markus wrote:

Hello,

For monitoring purposes I would like to track Exchanges in all Camel contexts 
that have been started in an OSGi container. I noticed a similar discussion in 
the following thread:
http://camel.465427.n5.nabble.com/intercept-route-td4521314.html#a4521358.

The aim would be to automatically apply Camel objects like Tracer, 
InterceptStrategy and EventNotifier without having to configure this in each 
and every deployed CamelContext.

Without this feature it seems I have to add

   CamelContext.getManagementStrategy().addEventNotifier(myEventNotifier);
   CamelContext.addInterceptStrategy(myInterceptStrategy); // etc.

for all CamelContexts separately in the Java route builder, or the analogous 
configuration for Camel XML DSL.

Is the feature meanwhile supported? I am currently using Camel 2.8.1.

Best regards,
Markus





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



Re: How to apply configuration globally for all deployed contexts (OSGi)?

2011-11-28 Thread Claus Ibsen
Hi

This is on the roadmap for Camel 3.0 / SMX 5.0, to make it possible to
install star/stop bundles which can add tracers / interceptors / etc.
to any running Camel applications.



On Mon, Nov 28, 2011 at 9:50 AM, Muenkel, Markus markus.muen...@sap.com wrote:
 Hello,

 For monitoring purposes I would like to track Exchanges in all Camel contexts 
 that have been started in an OSGi container. I noticed a similar discussion 
 in the following thread:
 http://camel.465427.n5.nabble.com/intercept-route-td4521314.html#a4521358.

 The aim would be to automatically apply Camel objects like Tracer, 
 InterceptStrategy and EventNotifier without having to configure this in each 
 and every deployed CamelContext.

 Without this feature it seems I have to add

  CamelContext.getManagementStrategy().addEventNotifier(myEventNotifier);
  CamelContext.addInterceptStrategy(myInterceptStrategy); // etc.

 for all CamelContexts separately in the Java route builder, or the analogous 
 configuration for Camel XML DSL.

 Is the feature meanwhile supported? I am currently using Camel 2.8.1.

 Best regards,
 Markus




-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: Custom messages in camel

2011-11-28 Thread Bilgin Ibryam
Hi Guru,

I'm not sure if I got your question right, but may be you can use
direct endpoint to send your hardcoded messages which will send them
to a queue.

Bilgin

On 28 November 2011 06:49, Gnanaguru S gnanaguru.sattanat...@wipro.com wrote:
 Hi

 I am moving a xml file content from my file system to a queue.Is there
 anyway to hardcode the  message( text/ xml ) directly to queue, Instead
 picking up from a file.


 regards
 Guru

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Custom-messages-in-camel-tp5027936p5027936.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Creating logic among routes in camel

2011-11-28 Thread Bilgin Ibryam
On 28 November 2011 06:47, Gnanaguru S gnanaguru.sattanat...@wipro.com wrote:

 Hi

 I want to do this using camel.

 I have a route which picks a request1 and I want to send another request2 to
 someother webservice when request1 is hit.

And what is the question? You have to give some more details and tell
us which part you cannot figure out yourself.

If these are for example http requests, you should take a look at
jetty and servlet components for consuming the requests, and
http/http4 components for sending another request.

Bilgin


 Simply like nested routes.

 Regards
 Guru

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Creating-logic-among-routes-in-camel-tp5027931p5027931.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Query on content enricher in camel

2011-11-28 Thread Taariq Levack
I don't see why not, just don't tell the processor that it's a content
enricher or it might have an identity crisis :)

from(direct:a).process(new Processor() {
public void process(Exchange exchange) {
Message in = exchange.getIn(); in.setBody(Hello World, I have a hot
new body!); }
 }).to(direct:b);

Taariq


On Mon, Nov 28, 2011 at 8:58 AM, Gnanaguru S 
gnanaguru.sattanat...@wipro.com wrote:


 Hi

 I just saw the content enricher documentation in camel. I want to whether
 my
 scenario can be achieved here.

 1. From endpoint A i am getting some message to a queue, I want to replace
 the whole message using this content enricher and send it to another
 endpoint.


 Regards
 Guru

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Query-on-content-enricher-in-camel-tp5027954p5027954.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Query on content enricher in camel

2011-11-28 Thread Taariq Levack
BTW, there are other ways to route a different message to a different
queue, I'm sure you'll get the hang of it, else ask when you get stuck.

On Mon, Nov 28, 2011 at 12:11 PM, Taariq Levack taar...@gmail.com wrote:

 I don't see why not, just don't tell the processor that it's a content
 enricher or it might have an identity crisis :)

 from(direct:a).process(new Processor() {
 public void process(Exchange exchange) {
 Message in = exchange.getIn(); in.setBody(Hello World, I have a hot
 new body!); }
  }).to(direct:b);

 Taariq



 On Mon, Nov 28, 2011 at 8:58 AM, Gnanaguru S 
 gnanaguru.sattanat...@wipro.com wrote:


 Hi

 I just saw the content enricher documentation in camel. I want to whether
 my
 scenario can be achieved here.

 1. From endpoint A i am getting some message to a queue, I want to replace
 the whole message using this content enricher and send it to another
 endpoint.


 Regards
 Guru

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Query-on-content-enricher-in-camel-tp5027954p5027954.html
 Sent from the Camel - Users mailing list archive at Nabble.com.





distributed transaction using JMS and EJB partecipants

2011-11-28 Thread Ronzat Luca
Hi,

 

I would like to implement a route for:

 

1) Consume JMS message from Sonic queue;

2) Call one or more EJB running on a remote JBoss AS;

3) send a reply to a different Sonic JMS queue;

 

 

Can I use distributed transaction for this route? 

Can we deploy this route as a WAR/EAR into WebLogic AS?

 

Thanks in advance.

Luca



Re: org.apache.camel.spring.Main class not found exception

2011-11-28 Thread newbiee
Willem:

Thanks for the reply.

Here are all the dependencies defined in the pom file: (I have explicitly
assigned the version)


  properties
camel-version2.6.0/camel-version
log4j-version1.2.16/log4j-version
jaxb-api-version2.1/jaxb-api-version
jaxb-impl-version2.1.13/jaxb-impl-version
  /properties

dependencies
  
  dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-core/artifactId
version${camel-version}/version
  /dependency
  
  dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-jdbc/artifactId
version${camel-version}/version
  /dependency
  
  
  dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.1.9/version
  /dependency

  
  dependency
groupIdorg.springframework/groupId
artifactIdspring-jdbc/artifactId
version2.5/version 
  /dependency
  
  dependency
   groupIdorg.apache.camel/groupId
   artifactIdcamel-spring/artifactId
   version${camel-version}/version
  /dependency
  

  dependency
groupIdlog4j/groupId
artifactIdlog4j/artifactId
version${log4j-version}/version
  /dependency
  
  /dependencies

Here is the result of running mvn dependency:tree:

C:\timermvn dependency:tree
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO]

[INFO] Building A Camel Route
[INFO]task-segment: [dependency:tree]
[INFO]

[INFO] [dependency:tree {execution: default-cli}]
[INFO] timer:timer:jar:1.0-SNAPSHOT
[INFO] +- org.apache.camel:camel-core:jar:2.6.0:compile
[INFO] |  +- commons-logging:commons-logging-api:jar:1.1:compile
[INFO] |  +- org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO] |  \- com.sun:tools:jar:1.5.0:system
[INFO] +- org.apache.camel:camel-jdbc:jar:2.6.0:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.9:compile
[INFO] +- org.springframework:spring-jdbc:jar:2.5:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1:compile
[INFO] |  +- org.springframework:spring-beans:jar:2.5:compile
[INFO] |  +- org.springframework:spring-context:jar:2.5:compile
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  +- org.springframework:spring-core:jar:2.5:compile
[INFO] |  \- org.springframework:spring-tx:jar:2.5:compile
[INFO] +- org.apache.camel:camel-spring:jar:2.6.0:compile
[INFO] |  \- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] \- log4j:log4j:jar:1.2.16:compile
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Nov 28 06:05:35 EST 2011
[INFO] Final Memory: 13M/32M
[INFO]

C:\timer


--
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-spring-Main-class-not-found-exception-tp5025882p5028537.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CXF lists as arguments

2011-11-28 Thread cexbrayat
One of my routes is sending a message to an existing SOAP web service,
declared in java as

@WebResult
@WebMethod(operationName = GET_INFO_PRODUITS)
Infos getInfoProduits(@WebParam String code, *@WebParam ListRequest
requests*);

When i'm trying to send a list of requests, the output message is :

soap:Bodyns2:RECNETWS
code1/code
requestcodeArticle/codeArticlequantite1.0/quantite/request
requestcodeArticle/codeArticlequantite1.0/quantite/request
/ns2:RECNETWS/soap:Body

And it fails because the webservice is expecting
soap:Bodyns2:RECNETWS
code1/code
*requests*
requestcodeArticle/codeArticlequantite1.0/quantite/request
requestcodeArticle/codeArticlequantite1.0/quantite/request
*/requests*
/ns2:RECNETWS/soap:Body

*How can I add this wrapper ?*


--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-lists-as-arguments-tp5028440p5028440.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Problem Configuring WSS4JInInterceptor Using a Blueprint.

2011-11-28 Thread Chaks
Hello,
Please can someone help me with configuring WSS4JInInterceptor using a
Blueprint. I am using the below Blueprint, I have two IN Interceptors,
LoggingInInterceptor  WSS4JInInterceptor. The LoggingInInterceptor works
perfect, however I am having issues with WSS4JInInterceptor, I am getting
the below excpetion,

***
2011-11-28 16:55:40,955 | WARN  | vices/HelloWorld | PhaseInterceptorChain  
 
| ache.cxf.common.logging.LogUtils  372 |  -  -  | Interceptor for
{http://cxf.camel.demos.mycompany.com/}HelloWorldService has thrown
exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: *No security action was defined!*
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getAction(WSS4JInInterceptor.java:466)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:225)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[198:org.apache.cxf.bundle:2.5.0]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.Server.handle(Server.java:342)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[54:org.eclipse.jetty.io:7.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[54:org.eclipse.jetty.io:7.4.5.v20110725]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[53:org.eclipse.jetty.util:7.4.5.v20110725]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_04]

***

Please find the Blueprint that I have used,

***
?xml version=1.0 encoding=UTF-8?

blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  
xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0;
   xmlns:jaxws=http://cxf.apache.org/blueprint/jaxws;
   xmlns:cxf=http://cxf.apache.org/blueprint/core;
   xmlns:camel=http://camel.apache.org/schema/blueprint;
   xmlns:camelcxf=http://camel.apache.org/schema/blueprint/cxf;
   xsi:schemaLocation=
 http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
 http://cxf.apache.org/blueprint/jaxws
http://cxf.apache.org/schemas/blueprint/jaxws.xsd
 http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd;

  camelcxf:cxfEndpoint id=helloworld-ws
  address=http://localhost:9000/services/HelloWorld;
  wsdlURL=META-INF/wsdl/helloworld.wsdl
  serviceClass=com.mycompany.demos.camel.cxf.HelloWorld

Re: Spring AMQP Apache Camel Component Released

2011-11-28 Thread Martin Krasser

Good news, thanks for letting us know. I'll try it as soon as I can.

Do you also plan to implement AsyncProcessor on the producer side?

Cheers,
Martin

Am 28.11.11 06:03, schrieb deckerego:

For those who might be interested, I've posted a Camel component based on
Spring AMQP for those who wish to use more AMQP semantics instead of a
JMS-AMQP interface via Qpid. Source is now available at
https://github.com/Bluelock/camel-spring-amqp

While the Qpid component is great for those who might be migrating from JMS
to AMQP, a few on the list have suggested that they were interested in
having more direct access to native RabbitMQ features, leveraging header
exchanges, etc. This camel-spring-amqp component was created to expose
RabbitMQ features natively within a Camel endpoint but still provide a path
towards a vendor-independent implementation. After receiving feedback from
the Camel team I decided to implement the component using Spring AMQP.

Since Spring AMQP performs JSON marshalling with Jackson, I've also included
an XStream marshaller with this component so that messages can be formatted
using the XStream JSON libraries prior to being sent over the wire. You
could of course do the same thing with the Camel dataFormat filters as well,
but this offers another way to do object wire marshalling within the Spring
AMQP framework.

I'm open to any feedback, testing or pull requests for camel-spring-amqp. If
you find the URI format to be a bit odd let me know - I'm open to new ideas
on how to better format the endpoint string.

Thanks!

--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-AMQP-Apache-Camel-Component-Released-tp5027785p5027785.html
Sent from the Camel - Users mailing list archive at Nabble.com.


--
Martin Krasser

blog:http://krasserm.blogspot.com
code:http://github.com/krasserm
twitter: http://twitter.com/mrt1nz



Re: org.apache.camel.spring.Main class not found exception

2011-11-28 Thread Taariq Levack
You've now mixed spring versions, you have 2.5 for spring-jdbc, for the
rest you get 3.0.5 instead.

Instead of this dependency...
dependency
  groupIdorg.apache.camel/groupId
  artifactIdcamel-spring/artifactId
  version${camel-version}/version
 /dependency


Can you try this instead? I'm excluding spring dependencies and providing
it, you can check the maven docs for more.


dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-spring/artifactId
version${camel-version}/version
exclusions
exclusion
artifactIdspring-context/artifactId
groupIdorg.springframework/groupId
/exclusion
exclusion
artifactIdspring-aop/artifactId
groupIdorg.springframework/groupId
/exclusion
exclusion
artifactIdspring-tx/artifactId
groupIdorg.springframework/groupId
/exclusion
/exclusions
/dependency

dependency
artifactIdspring-context/artifactId
groupIdorg.springframework/groupId
version${spring-version}/version
/dependency

dependency
artifactIdspring-aop/artifactId
groupIdorg.springframework/groupId
version${spring-version}/version
/dependency

dependency
artifactIdspring-tx/artifactId
groupIdorg.springframework/groupId
version${spring-version}/version
/dependency

BTW spring 2.5 is up to 2.5.6 / 2.5.6.SEC03 if you really want to use 2.5.

Taariq


On Mon, Nov 28, 2011 at 1:14 PM, newbiee m_ess...@hotmail.com wrote:

 Willem:

 Thanks for the reply.

 Here are all the dependencies defined in the pom file: (I have explicitly
 assigned the version)


  properties
camel-version2.6.0/camel-version
log4j-version1.2.16/log4j-version
jaxb-api-version2.1/jaxb-api-version
jaxb-impl-version2.1.13/jaxb-impl-version
  /properties

dependencies

  dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-core/artifactId
 version${camel-version}/version
  /dependency

  dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-jdbc/artifactId
version${camel-version}/version
  /dependency


   dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.1.9/version
  /dependency


   dependency
groupIdorg.springframework/groupId
artifactIdspring-jdbc/artifactId
version2.5/version
  /dependency

  dependency
   groupIdorg.apache.camel/groupId
   artifactIdcamel-spring/artifactId
   version${camel-version}/version
  /dependency


   dependency
groupIdlog4j/groupId
artifactIdlog4j/artifactId
version${log4j-version}/version
  /dependency

  /dependencies

 Here is the result of running mvn dependency:tree:

 C:\timermvn dependency:tree
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'dependency'.
 [INFO]
 
 [INFO] Building A Camel Route
 [INFO]task-segment: [dependency:tree]
 [INFO]
 
 [INFO] [dependency:tree {execution: default-cli}]
 [INFO] timer:timer:jar:1.0-SNAPSHOT
 [INFO] +- org.apache.camel:camel-core:jar:2.6.0:compile
 [INFO] |  +- commons-logging:commons-logging-api:jar:1.1:compile
 [INFO] |  +- org.fusesource.commonman:commons-management:jar:1.0:compile
 [INFO] |  \- com.sun:tools:jar:1.5.0:system
 [INFO] +- org.apache.camel:camel-jdbc:jar:2.6.0:compile
 [INFO] +- mysql:mysql-connector-java:jar:5.1.9:compile
 [INFO] +- org.springframework:spring-jdbc:jar:2.5:compile
 [INFO] |  +- commons-logging:commons-logging:jar:1.1:compile
 [INFO] |  +- org.springframework:spring-beans:jar:2.5:compile
 [INFO] |  +- org.springframework:spring-context:jar:2.5:compile
 [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
 [INFO] |  +- org.springframework:spring-core:jar:2.5:compile
 [INFO] |  \- org.springframework:spring-tx:jar:2.5:compile
 [INFO] +- org.apache.camel:camel-spring:jar:2.6.0:compile
 [INFO] |  \- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
 [INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
 [INFO] \- log4j:log4j:jar:1.2.16:compile
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 2 seconds
 [INFO] Finished at: Mon Nov 28 06:05:35 EST 2011
 [INFO] Final Memory: 13M/32M
 [INFO]
 
 C:\timer


 --
 View this 

Re: CXF lists as arguments

2011-11-28 Thread Willem Jiang
It looks like you need to put the request body into to object Array 
like this

new Object[] { requestList }


On Mon Nov 28 18:39:49 2011, cexbrayat wrote:

One of my routes is sending a message to an existing SOAP web service,
declared in java as

@WebResult
@WebMethod(operationName = GET_INFO_PRODUITS)
Infos getInfoProduits(@WebParam String code, *@WebParam ListRequest
requests*);

When i'm trying to send a list of requests, the output message is :

soap:Bodyns2:RECNETWS
code1/code
requestcodeArticle/codeArticlequantite1.0/quantite/request
requestcodeArticle/codeArticlequantite1.0/quantite/request
/ns2:RECNETWS/soap:Body

And it fails because the webservice is expecting
soap:Bodyns2:RECNETWS
code1/code
*requests*
requestcodeArticle/codeArticlequantite1.0/quantite/request
requestcodeArticle/codeArticlequantite1.0/quantite/request
*/requests*
/ns2:RECNETWS/soap:Body

*How can I add this wrapper ?*


--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-lists-as-arguments-tp5028440p5028440.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



Re: Configuration for Apache camel...

2011-11-28 Thread Willem Jiang

The Camel route is complex, but it is looking good.
If the performance test result meets your need, I don't the questions 
those you ask will hit you in the production environment.


On Mon Nov 28 18:33:32 2011, Omar Atia wrote:

Dears,

Kindly find attached Camel-context.xml Please let me know , the old e-mail 
attachment is the input XML to Mina route.

Thanks,
Omar Atia


-Original Message-
From: Willem Jiang [mailto:willem.ji...@gmail.com]
Sent: Monday, November 28, 2011 3:02 AM
To: users@camel.apache.org
Subject: Re: Configuration for Apache camel...

I don't think you attached a right camel route as there is only a cxf
endpoint and no camel-mina endpoint.
BTW, if the POJO data format can meet your need, you don't need to
change any thing :)

On Sun Nov 27 16:34:14 2011, Omar Atia wrote:

Dear Willem,

Kindly find attached XML Used to create Subscriber on IN , this XML will be fed 
into Camel route , that listens to tcp-mina port .

I'm doing spring configuration and using POJO format in order to fed the XML 
directly after JAXB into the WS .

The question , you mentioned below that you can send the request direct to 
backend WS service how ?

For performance testing , we just tried sending 100,000 request daily and it 
goes fine while monitoring through Jconsole .

Thanks,
Omar Atia

-Original Message-
From: Willem Jiang [mailto:willem.ji...@gmail.com]
Sent: Sunday, November 27, 2011 5:43 AM
To: users@camel.apache.org
Subject: Re: Configuration for Apache camel...

Did you have a chance to do some performance test ?

What's your XML String looks like ?  If there are not much change on the
XML, you can send the request direct to back end WS service.

We could do some enhancement according to your requirement.

On Sat Nov 26 16:07:12 2011, Omar Atia wrote:

Just to assume that Mina tcp endpoint will receive maximum 1500 Byte as XML 
string per trx in synchronous mode ...can this be dangerous ...
Sent via BlackBerry® from mtc touch

-Original Message-
From: Björn Bengthbjorn.ben...@gmail.com
Date: Sat, 26 Nov 2011 00:54:39
To:users@camel.apache.org
Reply-To:users@camel.apache.org
Subject: Re: Configuration for Apache camel...

Hi,

depends on what you do with your objects..
if all transaction payload are very, very large objects coming in at
the same time and/or you store them in memory it will eventually leak
yes.
If you do normal sensible processing, and your load is spread out over
the day, one million transactions a day is not too much at all.
one million tx per hour should also be fine (from a camel perspective)
if your hardware is not too old and your backend systems are up to it.
you might need to add load balancing to another node at this stage
depending on all aspects of your case.

Regards
B

On Fri, Nov 25, 2011 at 10:34 PM, atiatoomar.a...@its.wswrote:

Dears ,
I would like to know if there is special configuration for camel if we are
having heavy load , let us assume the following :

1- have Mina TCP endpoint .
2- from TCP I use JAXB to transform XML coming into Object.
3- call the Web service using CXF endpoint.
4- convert response into Object .
5- use JAXB to convert Object to XML .
6- return that XML as response to TCP session.

I have more than million transaction per day .

How can I handle such load in apache camel taking into consideration high
availability with two sun server and load balancing assume WS response is
less than 1 second.

Can this cause a memory leaks for example and use 100 % of memory .

Can this consume all CPU and resources of the system .

does this need to increase memory used for apache camel ?

let us say we are having solaries sparc as hardware .

I really appreciate your response .

Thanks,
Omar Atia

--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuration-for-Apache-camel-tp5023724p5023724.html
Sent from the Camel - Users mailing list archive at Nabble.com.














--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.

2011-11-28 Thread Willem Jiang
Can you check the request that you send has the security information in 
the soap message ?


On Mon Nov 28 19:47:49 2011, Chaks wrote:

Hello,
Please can someone help me with configuring WSS4JInInterceptor using a
Blueprint. I am using the below Blueprint, I have two IN Interceptors,
LoggingInInterceptor  WSS4JInInterceptor. The LoggingInInterceptor works
perfect, however I am having issues with WSS4JInInterceptor, I am getting
the below excpetion,

***
2011-11-28 16:55:40,955 | WARN  | vices/HelloWorld | PhaseInterceptorChain
| ache.cxf.common.logging.LogUtils  372 |  -  -  | Interceptor for
{http://cxf.camel.demos.mycompany.com/}HelloWorldService has thrown
exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: *No security action was defined!*
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getAction(WSS4JInInterceptor.java:466)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:225)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:85)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)[198:org.apache.cxf.bundle:2.5.0]
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[198:org.apache.cxf.bundle:2.5.0]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.Server.handle(Server.java:342)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[55:org.eclipse.jetty.http:7.4.5.v20110725]
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[59:org.eclipse.jetty.server:7.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)[54:org.eclipse.jetty.io:7.4.5.v20110725]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[54:org.eclipse.jetty.io:7.4.5.v20110725]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[53:org.eclipse.jetty.util:7.4.5.v20110725]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_04]

***

Please find the Blueprint that I have used,

***
?xml version=1.0 encoding=UTF-8?

blueprint xmlns=http://www.osgi.org/xmlns/blueprint/v1.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xmlns:cm=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0;
xmlns:jaxws=http://cxf.apache.org/blueprint/jaxws;
xmlns:cxf=http://cxf.apache.org/blueprint/core;
xmlns:camel=http://camel.apache.org/schema/blueprint;
xmlns:camelcxf=http://camel.apache.org/schema/blueprint/cxf;
xsi:schemaLocation=
  http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  http://cxf.apache.org/blueprint/jaxws
http://cxf.apache.org/schemas/blueprint/jaxws.xsd
  http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd;

   camelcxf:cxfEndpoint id=helloworld-ws
   

Re: Spring AMQP Apache Camel Component Released

2011-11-28 Thread deckerego
Indeed, that is definitely on my list. Right now I've kept things relatively
simple as the component enters more exhaustive pre-production testing, but
after we've validated the component that's on my hit list of things to do.

Prior to the completion of testing I have on the docket to:
- Allow specifying timeToLive
- Better implementation of requestTimeout
- Re-connection to broker after a connection failure

After the validation:
- Implement  build tests around async processing
- Move to Qpid VM broker for unit tests

Of course, pull requests are always welcome!


Martin Krasser-3 wrote
 
 Do you also plan to implement AsyncProcessor on the producer side?
 


--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-AMQP-Apache-Camel-Component-Released-tp5027785p5029194.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Spring AMQP Apache Camel Component Released

2011-11-28 Thread Glen Mazza
Hi, your GitHub intro for this component says: An Apache Camel 
http://camel.apache.org/ Component that will natively communicate with 
a RabbitMQ http://www.rabbitmq.com/ broker. This is implemented using 
Spring's AMQP project, so it should ultimately become vendor-agnostic.  
I guess you mean *broker*-agnostic, i.e., it should be able to work with 
the Qpid broker if you're not using native RabbitMQ features.  Is there 
anything preventing it from working now with the Qpid broker, or you 
just haven't had time to test it yet?


Also, what do you mean by ...instead of a JMS-AMQP interface via Qpid 
When you say Qpid I guess you mean Camel's AMQP component 
(http://camel.apache.org/amqp.html) which uses the Qpid client 
libraries.  Is there something suboptimal with using Qpid's client 
library to implement an AMQP client (i.e., it's doing a strange 
JMS-AMQP mapping instead of pure AMQP) or it's just that you can't take 
advantage of any native RabbitMQ features when using it?


Thanks,
Glen

On 11/28/2011 12:03 AM, deckerego wrote:

For those who might be interested, I've posted a Camel component based on
Spring AMQP for those who wish to use more AMQP semantics instead of a
JMS-AMQP interface via Qpid. Source is now available at
https://github.com/Bluelock/camel-spring-amqp

While the Qpid component is great for those who might be migrating from JMS
to AMQP, a few on the list have suggested that they were interested in
having more direct access to native RabbitMQ features, leveraging header
exchanges, etc. This camel-spring-amqp component was created to expose
RabbitMQ features natively within a Camel endpoint but still provide a path
towards a vendor-independent implementation. After receiving feedback from
the Camel team I decided to implement the component using Spring AMQP.

Since Spring AMQP performs JSON marshalling with Jackson, I've also included
an XStream marshaller with this component so that messages can be formatted
using the XStream JSON libraries prior to being sent over the wire. You
could of course do the same thing with the Camel dataFormat filters as well,
but this offers another way to do object wire marshalling within the Spring
AMQP framework.

I'm open to any feedback, testing or pull requests for camel-spring-amqp. If
you find the URI format to be a bit odd let me know - I'm open to new ideas
on how to better format the endpoint string.

Thanks!

--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-AMQP-Apache-Camel-Component-Released-tp5027785p5027785.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Glen Mazza
Talend Community Coders
http://coders.talend.com
blog: http://www.jroller.com/gmazza



Re: Spring AMQP Apache Camel Component Released

2011-11-28 Thread deckerego
Vendor meaning different implementations of the AMQP spec, both the client
libraries as well as the broker. For example, right now the Spring AMQP
project only supports RabbitMQ and lists the RabbitMQ client libraries as a
dependency. Spring doesn't necessarily implement their own AMQP client
library.

Qpid support would come along with the Spring AMQP project. Right now they
say they have tested Qpid with Spring AMQP, however it is not officially
supported and the framework is written in such a way that it is hard to
decouple from RabbitMQ. For example, right now the declaration of an
exchange is tied specifically to the RabbitMQ implementation. Once Spring
does some more abstraction over channels, administration and message
conversion then support for other implementations such as Qpid should become
much easier.

There's nothing sub-optimal about the current Camel AMQP component - in fact
its simplicity is a great testament to how inter-operable the Qpid project
is with JMS semantics. Looking at the source at
http://svn.apache.org/viewvc/camel/trunk/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/
there is just one file that extends JmsComponent whose primary
responsibility is:


If the features within the JMS component are what you need, then you're
golden. If you want to do more AMQP-specific stuff like header exchanges
then you would need to leverage a component that allowed you to specify
those features directly. That was the hope of this component - allowing
direct access to the AMQP feature set.


Glen Mazza-3 wrote
 
 Hi, your GitHub intro for this component says: An Apache Camel 
 lt;http://camel.apache.org/gt; Component that will natively communicate
 with 
 a RabbitMQ lt;http://www.rabbitmq.com/gt; broker. This is implemented
 using 
 Spring's AMQP project, so it should ultimately become vendor-agnostic.  
 I guess you mean *broker*-agnostic, i.e., it should be able to work with 
 the Qpid broker if you're not using native RabbitMQ features.  Is there 
 anything preventing it from working now with the Qpid broker, or you 
 just haven't had time to test it yet?
 
 Also, what do you mean by ...instead of a JMS-AMQP interface via Qpid 
 When you say Qpid I guess you mean Camel's AMQP component 
 (http://camel.apache.org/amqp.html) which uses the Qpid client 
 libraries.  Is there something suboptimal with using Qpid's client 
 library to implement an AMQP client (i.e., it's doing a strange 
 JMS-AMQP mapping instead of pure AMQP) or it's just that you can't take 
 advantage of any native RabbitMQ features when using it?
 


--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-AMQP-Apache-Camel-Component-Released-tp5027785p5029275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


convertBodyTo(org.w3c.dom.Document.class) fails

2011-11-28 Thread Tristan23
Hi,

I am using convertBodyTo() to convert an XML document to DOM.

Basically it works.

Unfortunately I get messages with a preceding declaration:
?xml version=1.0 encoding=UTF-8 standalone=yes?

This causes the convertBodyTo(org.w3c.dom.Document.class) to fail.

What to do?


--
View this message in context: 
http://camel.465427.n5.nabble.com/convertBodyTo-org-w3c-dom-Document-class-fails-tp5029460p5029460.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Programatically using Camel with different jms providers

2011-11-28 Thread Ashwin Karpe
Hi,

Please find an example of a camel route using ActiveMQ and WebsphereMQ. I
have not used Glassfish and hence do not have an idea how instantiate a
connection factory for Glassfish's JMS implementation.

Obviously, you need to change the values for the connection factories
accordingly.

Cheers,

Ashwin...



?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd;

camelContext xmlns=http://camel.apache.org/schema/spring;
route
from uri=activemq:queue:QueueA/
to uri=wmq:queue:QueueB/
/route
/camelContext

bean id=activemq
class=org.apache.activemq.ActiveMQConnectionFactory
property name=userName value=foo /
property name=password value=bar /
property name=brokerURL value=vm://${brokerName} /
property name=copyMessageOnSend value=false/
property name=useAsyncSend value=true/
/bean

bean id=wmq class=org.apache.camel.component.jms.JmsComponent
  property name=connectionFactory
bean class=com.ibm.mq.jms.MQConnectionFactory
property name=transportType value=1/
property name=hostName value=machine/ 
property name=port value=1414/ 
property name=queueManager value=QM_TEST/ 
/bean
  /property
/bean


/beans

-
-
Ashwin Karpe
Apache Camel Committer  Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
-
--
View this message in context: 
http://camel.465427.n5.nabble.com/Programatically-using-Camel-with-different-jms-providers-tp5029408p5029886.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: IBM WAS - Aries 0.1 and Camel

2011-11-28 Thread mattmadhavan
Hi Claus,
No we are using EBA - and using SCA(Tuscany) as an Asset.

I would like to replace SCA with Camel.

Any pointers regarding this will be greatly appreciated.

Thanks
Matt

--
View this message in context: 
http://camel.465427.n5.nabble.com/IBM-WAS-Aries-0-1-and-Camel-tp5014977p5029982.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Inconsistent results with File2 'readLock=changed'

2011-11-28 Thread GSegel
Using Camel 2.5 in JBoss 5.1.

When dropping large files (over 200MB) into a directory I expected that the
Exchange wouldn't kick off until the file had completed copying.  More often
than not, an Exchange is created before it finishes copying.  We're using
the 'readLock=changed' option btw.

Is the reason that it's processing the file before it's done is that the
file size doesn't change over a 1 second interval?  This has to be the case
but I just wanted to confirm.

I might try upgrading to 2.6 or later to see if the 'readLockCheckInterval'
option might resolve the inconsistencies.  Thoughts?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Inconsistent-results-with-File2-readLock-changed-tp5030004p5030004.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Blueprint bundle + plain Main class from the same project?

2011-11-28 Thread Alexander Krauss
Dear list,

I am playing with the cxf/osgi/blueprint example at
http://camel.apache.org/cxf-example-osgi-blueprint.html.

While deployment into Karaf works really nicely, I am looking for a way
to start the same routes when no Karaf is available, either via mvn camel:run
or preferably directly from the IDE (here: IntelliJ IDEA 10.5). The idea is to
be able to test changes quickly, without the extra deployment step.

I tried adding a Main class, as in the cxf-proxy example, but got an error that
did not really help me understand what's wrong (see below). I assume that there
is something wrong with the project setup (unchanged from the example).

Is there a project setup which can be used to create both OSGi blueprint bundles
as well as run the routes stand-alone, without the OSGi container?

Thanks in advance for any hints.

Alex


Exception in thread main
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 34 in XML document from class path resource
[OSGI-INF/blueprint/camel-context.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration can be found for element
'camelcxf:cxfEndpoint'.
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at 
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
at 
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185)
at org.apache.camel.spring.Main.doStart(Main.java:139)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.example.reportincident.Main.main(Main.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'camelcxf:cxfEndpoint'.
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1927)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
   

Using headers and velocity

2011-11-28 Thread Castyn
I am trying to get a piece of information that is obtained via a cxfEndpoint
into a velocity template that will be sent on down the route to other
endpoints.  Thus far I am trying something very basic and seems like it
should work, just storing the sessionId retrieved via xpath as a header and
then referencing it in the velocity template.  Here are the basic components
currently:

*Camel Route: (beginning is just a timer and request)*

to uri=cxf:bean:salesforceLogin/ 
convertBodyTo type=org.w3c.dom.Document /
setHeader headerName=sforceSessionId id=sforceSessionId
   xpath resultType=java.lang.String//sessionId/xpath
/setHeader
to uri=velocity://velocity/sforceLogout.vm /

*Message from cxf:bean:salesforceLogin:*
?xml version=1.0 encoding=UTF-8 ? 
   soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns=urn:enterprise.soap.sforce.com
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
 loginResponse
result
   sessionId*ABCDE*/sessionId 
/result
 /loginResponse
  /soapenv:Body
   /soapenv:Envelope

*Velocity Template:*
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:urn=urn:enterprise.soap.sforce.com
   soapenv:Header
  urn:SessionHeader
 urn:sessionId${headers.sforceSessionId}/urn:sessionId
  /urn:SessionHeader
   /soapenv:Header
   soapenv:Body
  urn:logout/
   /soapenv:Body
/soapenv:Envelope


--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5030214.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using headers and velocity

2011-11-28 Thread Christian Müller
Hello Eric!

Is there a question? ;-)

Best,
Christian

On Mon, Nov 28, 2011 at 10:51 PM, Castyn eric.ben...@gmail.com wrote:

 I am trying to get a piece of information that is obtained via a
 cxfEndpoint
 into a velocity template that will be sent on down the route to other
 endpoints.  Thus far I am trying something very basic and seems like it
 should work, just storing the sessionId retrieved via xpath as a header and
 then referencing it in the velocity template.  Here are the basic
 components
 currently:

 *Camel Route: (beginning is just a timer and request)*

to uri=cxf:bean:salesforceLogin/
convertBodyTo type=org.w3c.dom.Document /
setHeader headerName=sforceSessionId
 id=sforceSessionId
   xpath resultType=java.lang.String//sessionId/xpath
/setHeader
to uri=velocity://velocity/sforceLogout.vm /

 *Message from cxf:bean:salesforceLogin:*
 ?xml version=1.0 encoding=UTF-8 ?
   soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns=urn:enterprise.soap.sforce.com
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
 loginResponse
result
   sessionId*ABCDE*/sessionId
/result
 /loginResponse
  /soapenv:Body
   /soapenv:Envelope

 *Velocity Template:*
 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
 
 xmlns:urn=urn:enterprise.soap.sforce.com
   soapenv:Header
  urn:SessionHeader
 urn:sessionId${headers.sforceSessionId}/urn:sessionId
  /urn:SessionHeader
   /soapenv:Header
   soapenv:Body
  urn:logout/
   /soapenv:Body
 /soapenv:Envelope


 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5030214.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: CSV to database

2011-11-28 Thread Christian Müller
Your route and your processor looks good. Which kind of error do you
receive? Still the same?

Best,
Christian

On Fri, Nov 25, 2011 at 8:13 PM, Idriss doulmakhzo...@gmail.com wrote:

 Of course.

 you find in attchement the source code for my example.
 http://camel.465427.n5.nabble.com/file/n5023529/camel-example-etl2.zip
 camel-example-etl2.zip

 Best,

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/CSV-to-database-tp4435750p5023529.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Programatically using Camel with different jms providers

2011-11-28 Thread tkatva
I have been searching for examples on how can I configure apache camel to use
different Jms providers... For example if I have two remote application
servers with with jms queues. Lets say a Weblogic and Glassfish. I want to
be able to send messages from file or ftp endpoints to these application
servers and queues in these servers. But the catch is that I would need to
specify server host name and queues dynamically at runtime. I know how to
make this in pure Java but I would need to use apache camel for this...

Any advice or even better example would be greatly appreciated...

Thank you

Best regards Tuomas Katva

--
View this message in context: 
http://camel.465427.n5.nabble.com/Programatically-using-Camel-with-different-jms-providers-tp5029408p5029408.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.

2011-11-28 Thread Chaks
Hello Willem,
The SOAP request message don't have any security related information.

Thanks,
Chaks.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5029412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.

2011-11-28 Thread Freeman Fang

Hi,

How your client send out soap request?
If it's CXF client, you need use WSS4JOutInterceptor to add  
UsernameToken action ws-security header.
Take a look at ws_security/ut example shipped with CXF kit to get more  
details about how to do it with java client code.
Or you can also configure WSS4JOutInterceptor with configuration file  
for your client.

Freeman
On 2011-11-29, at 上午12:56, Chaks wrote:


Hello Willem,
The SOAP request message don't have any security related information.

Thanks,
Chaks.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5029412.html
Sent from the Camel - Users mailing list archive at Nabble.com.


-
Freeman Fang

FuseSource
Email:ff...@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com











Re: Using headers and velocity

2011-11-28 Thread Castyn
Well the last part of the route has nothing in the sessionId of the velocity
template which is my issue, so I am wondering what is wrong with what I am
doing really.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5030870.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Blueprint bundle + plain Main class from the same project?

2011-11-28 Thread Willem Jiang

The cxf-example-osgi-blueprint only can be ran inside of OSGi container.
You can not run it as a stand-alone Java process.

On Tue Nov 29 05:31:06 2011, Alexander Krauss wrote:

Dear list,

I am playing with the cxf/osgi/blueprint example at
http://camel.apache.org/cxf-example-osgi-blueprint.html.

While deployment into Karaf works really nicely, I am looking for a way
to start the same routes when no Karaf is available, either via mvn camel:run
or preferably directly from the IDE (here: IntelliJ IDEA 10.5). The idea is to
be able to test changes quickly, without the extra deployment step.

I tried adding a Main class, as in the cxf-proxy example, but got an error that
did not really help me understand what's wrong (see below). I assume that there
is something wrong with the project setup (unchanged from the example).

Is there a project setup which can be used to create both OSGi blueprint bundles
as well as run the routes stand-alone, without the OSGi container?

Thanks in advance for any hints.

Alex


Exception in thread main
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 34 in XML document from class path resource
[OSGI-INF/blueprint/camel-context.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration can be found for element
'camelcxf:cxfEndpoint'.
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at 
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
at 
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185)
at org.apache.camel.spring.Main.doStart(Main.java:139)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.example.reportincident.Main.main(Main.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'camelcxf:cxfEndpoint'.
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
at 
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
at 

Re: Blueprint bundle + plain Main class from the same project?

2011-11-28 Thread Guillaume Nodet
There's a way actually.  You need to use PojoSR which is a small
library to emulate an OSGi framework but without the classloading
(only the registry really).   I've been able to have it run Blueprint.

On Mon, Nov 28, 2011 at 22:31, Alexander Krauss
alexander.kra...@qaware.de wrote:
 Dear list,

 I am playing with the cxf/osgi/blueprint example at
 http://camel.apache.org/cxf-example-osgi-blueprint.html.

 While deployment into Karaf works really nicely, I am looking for a way
 to start the same routes when no Karaf is available, either via mvn 
 camel:run
 or preferably directly from the IDE (here: IntelliJ IDEA 10.5). The idea is to
 be able to test changes quickly, without the extra deployment step.

 I tried adding a Main class, as in the cxf-proxy example, but got an error 
 that
 did not really help me understand what's wrong (see below). I assume that 
 there
 is something wrong with the project setup (unchanged from the example).

 Is there a project setup which can be used to create both OSGi blueprint 
 bundles
 as well as run the routes stand-alone, without the OSGi container?

 Thanks in advance for any hints.

 Alex


 Exception in thread main
 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
 Line 34 in XML document from class path resource
 [OSGI-INF/blueprint/camel-context.xml] is invalid; nested exception is
 org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
 wildcard is strict, but no declaration can be found for element
 'camelcxf:cxfEndpoint'.
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
        at 
 org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)
        at 
 org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)
        at 
 org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
        at 
 org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
        at 
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
        at 
 org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
        at 
 org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93)
        at 
 org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185)
        at org.apache.camel.spring.Main.doStart(Main.java:139)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
        at org.apache.camel.example.reportincident.Main.main(Main.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
 Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
 matching wildcard is strict, but no declaration can be found for
 element 'camelcxf:cxfEndpoint'.
        at 
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at 
 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
        at 
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
        at 
 com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
        at 
 com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
        at