Re: splitter, enricher, aggregator

2013-05-04 Thread Claus Ibsen
Hi

You can write a java bean with a method that enrichs with data from the file.
public String enrichMe(@Header("id") String id) {

And then use some stax / xml / xpath api to find the selection to enrich.


Mind that the xpath from the JDK works only in-memory so if you want
to use that, then maybe look for alternatives like
http://camel.apache.org/vtd-xml

Or camel-stax
http://camel.apache.org/stax.html

Or depending how you xml file is structured you can also use
java.util.Scanner to scan for the part where the id is located.

In the pollEnrich(file) you can in the aggregation strategy, also use
the above from java code. And you can get the file handle using

File file = newExchange.getIn().getBody(File.class);




On Sat, May 4, 2013 at 11:53 PM, ihullu  wrote:
> I would like to do the following:
>
> 1. read a csv file
> 2. split it per line
> 3. per line enrich it with data coming from a xml source
> 4. per line execute a REST call to store the line
>
> As I have a pure Java background an no Spring experience I used the Java
> DSL.
>
> This is what I created so far:
>
>from("direct:start")
>.to("log: IN ==>")
>.split(body().tokenize("\n")).streaming()
>.unmarshal().bindy(BindyType.Csv,
> Product.class.getPackage().getName())
>.bean(Transform.class)
>.to("log: JAXB ==>")
>.setHeader("id", simple("${body.id}")).log("id =
> ${in.header.id}")
>.pollEnrich("file:resource?fileName=PRD-onetrail.prd",new
> AggregationStrategy())
>//.to("log: END ==>")
>//.to("mock:result")
>;
>
> The input is:
>
>   String inMsg = "0196-SJCLPAD2SGG\t112\n" +
>  "0434-SJDJFHRDFID\t3\n";
>
>
>
> I am stuck at the Enrich part. It has the xml file as an input and uses the
> Aggregation class to do the enrichment. The problem is that it consumes the
> entire xml file. In the AggregationStrategy class I can browse through the
> file and select the correct element by matching on the id field. This does
> not sound very nice to me because the xml file is rather big. I do not want
> to have the entire file in memory.
>
> I was actually looking for something like this. I want to do a
> lookup/selection based on the body.id field in the XML file
> (PRD-ontrail.prd) prior to the the polEnrich and enrich it with some
> additional fields.
>
> So
>
> Read File -> Split per line -> create Product Bean -> Add header
> 
>
> ||-> enrich
>
> V   |
>
> Select element from XML
>
> using header/id
>
> I hope this is clear what I want.
>
> Can somebody help me figure this out?
>
> Regards
> Izaak
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/splitter-enricher-aggregator-tp5732020.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: IS the File polling possible in CAMEL.

2013-05-04 Thread Claus Ibsen
Hi

Yes that is possible.

You can do a Camel route that starts from file and then transform the message.

from file
  transform

If you are new to Camel I suggest reading this article
http://java.dzone.com/articles/open-source-integration-apache

Or check out some of the others at listed at:
http://camel.apache.org/articles.html

And then read a bit about the message translator eip (eg to transform)
http://camel.apache.org/message-translator.html

The EIPs in Camel is listed here
http://camel.apache.org/enterprise-integration-patterns.html

On Sat, May 4, 2013 at 6:39 PM, umashankar29  wrote:
>
>  Hi, We have a requirement in polling file from a folder and transform . Is
> it possible to have this implemented thru the Filecomponent thru getting
> this endpoint ?
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/IS-the-File-polling-possible-in-CAMEL-tp5732019.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Upgrade from 2.10 -> 2.11.0

2013-05-04 Thread Claus Ibsen
Hi

Use dataSource=#infor.DataSource
instead of dataSourceRef



On Sat, May 4, 2013 at 2:50 PM, kalber  wrote:
> Hi,
>
> upgrading to 2.11 in the lib/optional directory aren't  spring release 3.0.7
> jars :
> spring-beans-3.0.7.RELEASE.jar
> spring-core-3.0.7.RELEASE.jar
> spring-jdbc-3.0.7.RELEASE.jar
> spring-tx-3.0.7.RELEASE.jar
>
>
> I can use these on ?
>
> Doing this  i get this error what with 2.10 works well :
>
> org.apache.camel.FailedToCreateRouteException: Failed to create route route2
> at: >>> To[sql:select obj_code,
> cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')
> solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')
> device_type
> ,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')
> serigraphy, obj_category
> ,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)
> delete_passage_after from r5objects  where obj_class = 'IPNL' and
> obj_obrtype = 'A' order by obj_location,
> obj_code?dataSourceRef=infor.DataSource] <<< in route:
> Route(route2)[[From[direct:infor.select.iPnl.objects]] -> [T... because of
> Failed to resolve endpoint:
> sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
> due to: Failed to resolve endpoint:
> sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{dataSourceRef=infor.DataSource}]
> at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:883)
> at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
> at
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:750)
> at
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1829)
> at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1609)
> at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1478)
> at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1446)
> at
> it.sad.sii.solari.loadPassages.build.DeviceMappingProcess.start(DeviceMappingProcess.java:50)
> at it.sad.lib.batch.ProcessHandler.process(ProcessHandler.java:39)
> at
> it.sad.sii.solari.loadPassages.build.DeviceMappingProcess.main(DeviceMappingProcess.java:40)
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
> resolve endpoint:
> sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
> due to: Failed to resolve endpoint:
> sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
> due to: There are 1 parameters that couldn't be set on the endpoint. Check
> the uri if the parameters are spelt correctly and that they are properties
> of the endpoint. Unknown parameters=[{dataSourceRef=infor.DataSource}]
> at
> org.apache.ca

Re: How to create a generic SOAP consumer?

2013-05-04 Thread Claus Ibsen
Hi

There is a CXF_MESSAGE format that may allow you to do a generic SOAP
consumer with camel-cxf.
http://camel.apache.org/cxf

On Sat, May 4, 2013 at 2:05 PM, Smith-John  wrote:
> Hi,
>
> thanks for the survey.
>
> But is it possible with cxf to get a generic SOAP consumer? With generic I
> mean that it can handle all possible kinds of different SOAP messages. Using
> MESSAGE dataformat it can't handle headers and with POJO dataformat I have
> to provide e.g. serviceClass that I haven't, cause it should be generic.
>
> Using jetty component and parsing the message with soap.MessageFactory
> should work I think but since I already need cxf-compnent for an other route
> I would also like to use it for this problem.
>
> So, is it possible with cxf?
>
> Regards.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732014.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Will camel-websocket work in producer mode from a web app?

2013-05-04 Thread Claus Ibsen
Hi

Yeah using the websocket jsr would be a good idea. I would assume
Atmosphere implements the JSR or will do.
Though if there is another library than Atmosphere that implements the
jsr then we can take a look at that too. Its not written in stone that
we must use Atmosphere. Just  that ideally the websocket shouldn't be
tied to Jetty as it is today.

So if we can provide an alternative that would be nice.

On Sat, May 4, 2013 at 10:34 AM, Romain Manni-Bucau
 wrote:
> Hi
>
> Would be great to use the new websocket jsr by default, no?
> Le 4 mai 2013 10:29, "Claus Ibsen"  a écrit :
>
>> Hi
>>
>> No the current camel-websocket is Jetty based.
>> There is a ticket to create a new component using the Atmosphere
>> framework which is container agnostic.
>>
>> On Sat, May 4, 2013 at 4:27 AM, Chris Wolf  wrote:
>> > I see that it uses Jetty to launch a web server for camel-websocket in
>> > producer mode.  I'm seeing some
>> > dependency clashes with JBoss - before I sort that out - let me ask,
>> > will it even work?
>> >
>> > It seems a bit unconventional to launch an embedded servlet container
>> > from within a web application.
>> >
>> >
>> > Thanks,
>> >
>> >
>> > Chris
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



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


IS the File polling possible in CAMEL.

2013-05-04 Thread umashankar29

 Hi, We have a requirement in polling file from a folder and transform . Is
it possible to have this implemented thru the Filecomponent thru getting
this endpoint ?

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/IS-the-File-polling-possible-in-CAMEL-tp5732019.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Upgrade from 2.10 -> 2.11.0

2013-05-04 Thread kalber
Hi,

upgrading to 2.11 in the lib/optional directory aren't  spring release 3.0.7
jars :
spring-beans-3.0.7.RELEASE.jar
spring-core-3.0.7.RELEASE.jar
spring-jdbc-3.0.7.RELEASE.jar
spring-tx-3.0.7.RELEASE.jar


I can use these on ?

Doing this  i get this error what with 2.10 works well :

org.apache.camel.FailedToCreateRouteException: Failed to create route route2
at: >>> To[sql:select obj_code,
cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')
solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')
device_type
,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')
serigraphy, obj_category
,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)
delete_passage_after from r5objects  where obj_class = 'IPNL' and
obj_obrtype = 'A' order by obj_location,
obj_code?dataSourceRef=infor.DataSource] <<< in route:
Route(route2)[[From[direct:infor.select.iPnl.objects]] -> [T... because of
Failed to resolve endpoint:
sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
due to: Failed to resolve endpoint:
sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{dataSourceRef=infor.DataSource}]
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:883)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:750)
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1829)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1609)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1478)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1446)
at
it.sad.sii.solari.loadPassages.build.DeviceMappingProcess.start(DeviceMappingProcess.java:50)
at it.sad.lib.batch.ProcessHandler.process(ProcessHandler.java:39)
at
it.sad.sii.solari.loadPassages.build.DeviceMappingProcess.main(DeviceMappingProcess.java:40)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
due to: Failed to resolve endpoint:
sql://select%20obj_code,%20cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'CODSOLAR')%20solari_code,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'IPNLDISP')%20device_type%20,cust_obj.getPropertyChar(obj_obtype,obj_code,obj_org,'SERIGRAP')%20serigraphy,%20obj_category%20,nvl(cust_obj.getPropertyNum(obj_obtype,obj_code,obj_org,'IPNLDELP'),0)%20delete_passage_after%20from%20r5objects%20%20where%20obj_class%20=%20'IPNL'%20and%20obj_obrtype%20=%20'A'%20order%20by%20obj_location,%20obj_code?dataSourceRef=infor.DataSource
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{dataSourceRef=infor.DataSource}]
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:508)
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:62)
at
org.apache.camel.model.RouteDefinition.resolveEndpoin

Camel LDAP How to add , remove , modify from LDAP Server?

2013-05-04 Thread atiato
Hello Claus ,

I need to know how to use Add , remove or modify in additional to search
with Camel LDAP using Spring DSL ? any spring DSL example will be
appreciated , for example I need to set the Body with certain value to add
or remove or modify , search is managable through Apache camel docs ?

appreciate your help so I can start :).

Thanks,
Omar Atia



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-LDAP-How-to-add-remove-modify-from-LDAP-Server-tp5732016.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Groovy script cannot import a class

2013-05-04 Thread Bazzer
I have a really simple Groovy script that I cannot get to run in Camel:



causes the messages:



Are there some restrictions about what exactly I can do with Groovy within
Camel, or am I doing something horribly wrong?

Thanks!

Barry




--
View this message in context: 
http://camel.465427.n5.nabble.com/Groovy-script-cannot-import-a-class-tp5732022.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Will camel-websocket work in producer mode from a web app?

2013-05-04 Thread Chris Wolf
Thanks, ok.

On Sat, May 4, 2013 at 4:28 AM, Claus Ibsen  wrote:
> Hi
>
> No the current camel-websocket is Jetty based.
> There is a ticket to create a new component using the Atmosphere
> framework which is container agnostic.
>
> On Sat, May 4, 2013 at 4:27 AM, Chris Wolf  wrote:
>> I see that it uses Jetty to launch a web server for camel-websocket in
>> producer mode.  I'm seeing some
>> dependency clashes with JBoss - before I sort that out - let me ask,
>> will it even work?
>>
>> It seems a bit unconventional to launch an embedded servlet container
>> from within a web application.
>>
>>
>> Thanks,
>>
>>
>> Chris
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen


splitter, enricher, aggregator

2013-05-04 Thread ihullu
I would like to do the following:

1. read a csv file
2. split it per line
3. per line enrich it with data coming from a xml source
4. per line execute a REST call to store the line 

As I have a pure Java background an no Spring experience I used the Java
DSL. 

This is what I created so far: 

   from("direct:start")
   .to("log: IN ==>")
   .split(body().tokenize("\n")).streaming()
   .unmarshal().bindy(BindyType.Csv,
Product.class.getPackage().getName())
   .bean(Transform.class)
   .to("log: JAXB ==>")
   .setHeader("id", simple("${body.id}")).log("id =
${in.header.id}")
   .pollEnrich("file:resource?fileName=PRD-onetrail.prd",new
AggregationStrategy())
   //.to("log: END ==>")
   //.to("mock:result")
   ;

The input is: 

  String inMsg = "0196-SJCLPAD2SGG\t112\n" + 
 "0434-SJDJFHRDFID\t3\n";



I am stuck at the Enrich part. It has the xml file as an input and uses the
Aggregation class to do the enrichment. The problem is that it consumes the
entire xml file. In the AggregationStrategy class I can browse through the
file and select the correct element by matching on the id field. This does
not sound very nice to me because the xml file is rather big. I do not want
to have the entire file in memory. 

I was actually looking for something like this. I want to do a
lookup/selection based on the body.id field in the XML file
(PRD-ontrail.prd) prior to the the polEnrich and enrich it with some
additional fields. 

So

Read File -> Split per line -> create Product Bean -> Add header
 

||-> enrich

V   |
  
Select element from XML 

using header/id

I hope this is clear what I want. 

Can somebody help me figure this out?

Regards
Izaak 




--
View this message in context: 
http://camel.465427.n5.nabble.com/splitter-enricher-aggregator-tp5732020.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to create a generic SOAP consumer?

2013-05-04 Thread Smith-John
Hi, i tried it with:











Isn't this right?



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732015.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to create a generic SOAP consumer?

2013-05-04 Thread Smith-John
Hi,

thanks for the survey.

But is it possible with cxf to get a generic SOAP consumer? With generic I
mean that it can handle all possible kinds of different SOAP messages. Using
MESSAGE dataformat it can't handle headers and with POJO dataformat I have
to provide e.g. serviceClass that I haven't, cause it should be generic.

Using jetty component and parsing the message with soap.MessageFactory
should work I think but since I already need cxf-compnent for an other route
I would also like to use it for this problem.

So, is it possible with cxf?

Regards.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732014.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Will camel-websocket work in producer mode from a web app?

2013-05-04 Thread Romain Manni-Bucau
Hi

Would be great to use the new websocket jsr by default, no?
Le 4 mai 2013 10:29, "Claus Ibsen"  a écrit :

> Hi
>
> No the current camel-websocket is Jetty based.
> There is a ticket to create a new component using the Atmosphere
> framework which is container agnostic.
>
> On Sat, May 4, 2013 at 4:27 AM, Chris Wolf  wrote:
> > I see that it uses Jetty to launch a web server for camel-websocket in
> > producer mode.  I'm seeing some
> > dependency clashes with JBoss - before I sort that out - let me ask,
> > will it even work?
> >
> > It seems a bit unconventional to launch an embedded servlet container
> > from within a web application.
> >
> >
> > Thanks,
> >
> >
> > Chris
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>


Re: Truststore in HTTP4 component not working

2013-05-04 Thread Claus Ibsen
What Camel version do you use?

On Thu, May 2, 2013 at 9:04 PM, fbarbat  wrote:
> I must add it looks like there are two instances of HttpComponent. One is
> configured with SSL context and the other is not. Is that ok?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Truststore-in-HTTP4-component-not-working-tp5731925p5731926.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Will camel-websocket work in producer mode from a web app?

2013-05-04 Thread Claus Ibsen
Hi

No the current camel-websocket is Jetty based.
There is a ticket to create a new component using the Atmosphere
framework which is container agnostic.

On Sat, May 4, 2013 at 4:27 AM, Chris Wolf  wrote:
> I see that it uses Jetty to launch a web server for camel-websocket in
> producer mode.  I'm seeing some
> dependency clashes with JBoss - before I sort that out - let me ask,
> will it even work?
>
> It seems a bit unconventional to launch an embedded servlet container
> from within a web application.
>
>
> Thanks,
>
>
> Chris



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


Re: Issue in JSON marshalling

2013-05-04 Thread sarfaraj
You took question wrongly.

I am asking that property in JSON not in xmljson .

We have POJO object which we want to convert to JSON.  xmljson is for XML to
JSON not for Object to JSON.

Currently JSON return  [{"id":1,"name":"abc"}] 

But instead of [{"id":1,"name":"abc"}] , we need
{"*myData*":{"id":1,"name":"abc"}} 

/Sarfaraj



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-in-JSON-marshalling-tp5731970p5732008.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Skip multiple leading lines in CSV file

2013-05-04 Thread helander
I intend to consume a fairly big CSV type file using camel-bindy. The file do
have a fixed amount of lines at the start of the file before the actual CSV
data starts. What would be the best/easiest way to "remove" these initial
lines. I guess that I somehow need to strip them off before the data hits
bindy, or is there some way too tell bindy to skip the first set of lines
(not just THE first)?
Is there some simple way to do a filter that removes a set of initial lines
from a large stream?

Thanks

Lars 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Skip-multiple-leading-lines-in-CSV-file-tp5732009.html
Sent from the Camel - Users mailing list archive at Nabble.com.