camel jaxb component

2013-09-12 Thread contactreji
Hi 

I am trying to marsha some data which is receivd at CXF Endpoint as follows


camelContext xmlns=http://camel.apache.org/schema/spring;

dataFormats
jaxb id=myJaxb prettyPrint=true
contextPath=outotec.pi.mes.id59.powerconsumption.DTPowerConsumption.class
/
/dataFormats

redeliveryPolicyProfile redeliveryDelay=25
maximumRedeliveries=3 id=sapRedelivery /
route id=route_1

from uri=cxf:bean:PowerConsumptionEndpoint /
marshal ref=myJaxb/

to uri=activemq:REJI_INboundQ /

/route




/camelContext



It gives error  as follows

Caused by: javax.xml.bind.JAXBException:
outotec.pi.mes.id59.powerconsumption.DTPowerConsumption.class doesnt
contain ObjectFactory.class or jaxb.index
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:197)


Can you help me with this jaxb component... I want to marshall the data
before storing into the Queue..

Reji



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


Saving JMS data

2013-09-12 Thread gliesian
What is the best URI/endpoint to use for saving fast, voluminous JMS data?  
log, file, activemq:journal, other?

And, how do you view the date in the journal?

Thanks,
Robert



--
View this message in context: 
http://camel.465427.n5.nabble.com/Saving-JMS-data-tp5739186.html
Sent from the Camel - Users mailing list archive at Nabble.com.


activemq.journal - stream.out

2013-09-12 Thread gliesian
Does Camel have a type converter for this:

camel:from uri=activemq.journal:/tmp/data/ 
camel:to uri=stream:out/



--
View this message in context: 
http://camel.465427.n5.nabble.com/activemq-journal-stream-out-tp5739184.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CFX to Queue : io.serializationException

2013-09-12 Thread contactreji
Hi Christain

I was referring the documentation at http://camel.apache.org/jaxb.html

Am i supposed to use

*marshal
jaxb prettyPrint=false contextPath=org.apache.camel.example
partClass=org.apache.camel.example.PurchaseOrder
fragment=true
partNamespace={http://example.camel.org/apache}po; /
/marshal *

and 
*
 unmarshal
jaxb prettyPrint=false contextPath=org.apache.camel.example
partClass=org.apache.camel.example.Partial /
/unmarshal*

If so could you guide me what should be entered for contextPath and
partNamespace? I am new to camel. 

Reji



--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739198.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Dataformat - jaxb help, please.

2013-09-12 Thread gliesian
How would I replace this:

  // Works
  JAXBContext context = JAXBContext.newInstance(aaa.bbb.ccc);
  ByteArrayInputStream input = new ByteArrayInputStream(msg.getBytes());
  Unmarshaller unmarshaller = context.createUnmarshaller();
  JAXBElement elm = unmarshaller.unmarshal(new StreamSource(input),
SpecialType.class);

with something like this:

   // Incomplete
   route  autoStartup=true  
 from uri=weblogic:topic:TOPIC1/
 to uri=dataformat:jaxb:unmarshal?contextPath=aaa.bbb.ccc/
 process ref=SpecialProcessor/ 
   /route

That is, where do I put SpecialType.class?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: activemq.journal - stream.out

2013-09-12 Thread Claus Ibsen
Hi Robert

Do you mind signing up for the Apache Camel user mailing list. See details at
http://camel.apache.org/mailing-lists.html

The reason is that every single post you do on Nabble has to manually
moderated, and this is tiresome for people to do.

If people dont singup for the mailing list, they risk the Nabble posts
do not get moderated, and not so many people can see the posts and
help you.



On Wed, Sep 11, 2013 at 10:20 PM, gliesian rob...@gliesian.com wrote:
 Does Camel have a type converter for this:

 camel:from uri=activemq.journal:/tmp/data/
 camel:to uri=stream:out/



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/activemq-journal-stream-out-tp5739184.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: CFX to Queue : io.serializationException

2013-09-12 Thread contactreji
Hi Christian

Thank you so much.  Could you help me with configuring the marshaller.  The
class is something called DTPowerconsumption which has the schema for the
pojo.

I see in Camel jaxb component that there are parameters called contextPath
and namespaces. What should I enter for those values?

Reji

On Thursday, September 12, 2013, Christian Mueller [via Camel] 
ml-node+s465427n573918...@n5.nabble.com wrote:
 Yes, use the camel-jaxb dataformat to marshal your payload into a
 byte[]/String before sending it to the queue. After dequeuing it,
unmarshal
 it to your Java pojo.

 Best,
 Christian
 -

 Software Integration Specialist

 Apache Camel committer: https://camel.apache.org/team
 V.P. Apache Camel: https://www.apache.org/foundation/
 Apache Member: https://www.apache.org/foundation/members.html

 https://www.linkedin.com/pub/christian-mueller/11/551/642


 On Wed, Sep 11, 2013 at 2:27 PM, contactreji [hidden email] wrote:

 Hi Guys

 I have a problem in the following route.

 *route id=Route1_MES_Queue
 from uri=cxf:bean:PowerConsumptionEndpoint/
 log message=Persisting Message to queue
 ${body}\n
 descriptionlt;bean
 ref=myBean/gt;/description
 /log
 to uri=activemq:queue:EC_InboundQueue /
 /route
 *

 The data from cxf:bean:PowerConsumptionEndpoint is not able to queue up
 in
 the message broker. It gives io.serialization exception.

 I tried modifying as cxf:bean:PowerConsumptionEndpoint?dataFormat=MESSAGE
 which indeed solved the issue.

 But I have another route picking the same data from the queue as

 *
 route id=Route2_Queue_SAPPI
 from uri=activemq:queue:EC_InboundQueue /

 log message=Message dequed Queue ${body}\n
 descriptionlt;bean
 ref=myBean/gt;/description
 /log
 to uri=SAPClientInvoker /
 /route*

 Here the SAPClientInvoker is a Java class which makes a webservice call
to
 SAP PI system. We have followed the WSDL approach and we have a schema
 class
 DTPowerConsumption whose object is used to invoke Webservice call to SAP
 PI.
 *
 This is part of SAPClientInvoker Class
 DTPowerConsumption PC=exchng.getIn().getBody(DTPowerConsumption.class);
 LOGGER.info(\n Data received for Energy Consumption from
 MES  \n);
 LOGGER.info(\n Sending Request from MES to PI for Energy
 Consumption
 \n);

 try {
 LOGGER.info(before invoking);
 sapService.siID59PowerconsumptionAsyncOut(PC);
 LOGGER.info(Response from PI for Energy
 Consumption);
 exchng.getOut().setBody(Response from PI Energy
 for consumption);

 *
 Now i assume that dataFormat=MESSAGE parameter is fiddling with the
 original
 compatible data coming to fuse endpoint and hencethe SAPClientInvoker
 webservice call is not able to maintain the perfect call to SAP PI. and
SAP
 PI ends up sending HTTP 500 error code .


 Can anyone suggest me how to store the data on route 1 without really
 fiddling with the message formats without serialization exceptions?

 Or can I use a marshaller before storing it into the Queue and
unmarshaller
 after fetching it from the queue before calling SAPClinetInvoker?

 If so can I use Camel component

 *marshal
 jaxb prettyPrint=false
 contextPath=org.apache.camel.example
 partClass=org.apache.camel.example.PurchaseOrder
 fragment=true
 partNamespace={http://example.camel.org/apache}po; /
 /marshal

  unmarshal
 jaxb prettyPrint=false
 contextPath=org.apache.camel.example
 partClass=org.apache.camel.example.Partial /
 /unmarshal
 *
 What is the value to be entered for contextPath and partNamespace?? I am
 confused with that.
 If there is a alternate way to handle this, please help me with it..

 Reji




 --
 View this message in context:

http://camel.465427.n5.nabble.com/CFX-to-Queue-io-serializationException-tp5739142.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



 
 If you reply to this email, your message will be added to the discussion
below:

http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739188.html
 To unsubscribe from CXF to Apache ActiveMQ Queue :
io.serializationException, click here.
 NAML




--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739195.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CFX to Queue : io.serializationException

2013-09-12 Thread contactreji
Hi 

I have tried to marshal the exchange coming from cxf endpoint before putting
into the ActiveMQ Queue. 

route id=route_1

from uri=cxf:bean:PowerConsumptionEndpoint /

marshal
jaxb prettyPrint=false
contextPath=org.apache.camel  /
/marshal
to uri=activemq:REJI_INboundQ /

/route


It gives deployment successful but when data is triggerred, it gives
following exception 

java.io.IOException: javax.xml.bind.JAXBException: class
org.apache.cxf.message.MessageContentsList nor any of its super class is
known to this context. 

Could you tell me how to modify the configuration so that this error is
resolved 

Reji




--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-to-Apache-ActiveMQ-Queue-io-serializationException-tp5739142p5739203.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel blueprint - unit tests

2013-09-12 Thread fs
Yes, this seems to be working

- removed the import element
- loaded both XML files via getBlueprintDescriptor()

@Override
protected String getBlueprintDescriptor() {
return
/OSGI-INF/blueprint/test-context_2.xml,/OSGI-INF/blueprint/test-context_1.xml;
}

Thanks for the quick answers.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-blueprint-unit-tests-tp5738925p5739204.html
Sent from the Camel - Users mailing list archive at Nabble.com.


JAXB Marshalling

2013-09-12 Thread contactreji
Hi 

I have tried to marshal the exchange coming from cxf endpoint before putting
into the ActiveMQ Queue.

*route id=route_1

from uri=cxf:bean:PowerConsumptionEndpoint /

marshal
jaxb prettyPrint=false 
contextPath=org.apache.camel  /
/marshal
to uri=activemq:REJI_INboundQ /

/route*


It gives deployment successful but when data is triggerred, it gives
following exception

java.io.IOException: javax.xml.bind.JAXBException: class
org.apache.cxf.message.MessageContentsList nor any of its super class is
known to this context.

Could you tell me how to modify the configuration so that this error is
resolved

Reji 



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


Re: JBoss package scan

2013-09-12 Thread arno noordover
I've found the cause of the problem.
When I use a proxy in a camelcontext apparently everything gets loaded in a
different way.
When I put the proxy in another context the camelContext that uses type
converters seems to work.



--
View this message in context: 
http://camel.465427.n5.nabble.com/JBoss-package-scan-tp5739097p5739201.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Dataformat - jaxb help, please.

2013-09-12 Thread gliesian
Btw, I'm getting this:

Caused by: java.lang.IllegalArgumentException: Cannot find data format with
name: jaxb

And I am using:

   dependency
groupIdorg.apache.camel/groupId
artifactIdcamel-core/artifactId
version2.12.0/version
/dependency



--
View this message in context: 
http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193p5739194.html
Sent from the Camel - Users mailing list archive at Nabble.com.


getting exception org.apache.camel.InvalidPayloadException: No body available of type: when I try to serialization

2013-09-12 Thread vsmahesh
Hi,

When I try to serialize the Incoming POJO in the cxf:bean inorder to save it
to queue ,I am getting Invalid payload  exception.
this is my route route id=Route1_MES_Queue
from uri=cxf:bean:PowerConsumptionEndpoint/

unmarshal
  serialization/
/unmarshal
to uri=activemq:queue:EC_InboundQueue /
/route


I am getting the exception 


org.apache.camel.InvalidPayloadException: No body available of type:
java.io.InputStream but has value:
[outotec.pi.mes.id59.powerconsumption.DTPowerConsumption@2f3d4036] of type:
org.apache.cxf.message.MessageContentsList on: Message:
[outotec.pi.mes.id59.powerconsumption.DTPowerConsumption@2f3d4036]. Caused
by: No type converter available to convert from type:
org.apache.cxf.message.MessageContentsList to the required type:
java.io.InputStream with value
[outotec.pi.mes.id59.powerconsumption.DTPowerConsumption@2f3d4036].
Exchange[Message:
[outotec.pi.mes.id59.powerconsumption.DTPowerConsumption@2f3d4036]]. Caused
by: [org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: org.apache.cxf.message.MessageContentsList
to the required type: java.io.InputStream with value
[outotec.pi.mes.id59.powerconsumption.DTPowerConsumption@2f3d4036]]
at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:51)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.fabric.FabricTraceProcessor.process(FabricTraceProcessor.java:81)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at

Re: getting exception org.apache.camel.InvalidPayloadException: No body available of type: when I try to serialization

2013-09-12 Thread vsmahesh
Hi..
I just used 
 unmarshal
  serialization/
/unmarshal

for serialization.

Thanks




--
View this message in context: 
http://camel.465427.n5.nabble.com/getting-exception-org-apache-camel-InvalidPayloadException-No-body-available-of-type-when-I-try-to-s-tp5739206p5739209.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JBoss package scan

2013-09-12 Thread Claus Ibsen
Hi

I wonder if you can use a depends-on in the proxy id=foo
depends-on=myCamelId when you specify it outside camelContext
id=myCamelId so you can tell the dependency order.



On Thu, Sep 12, 2013 at 6:25 AM, arno noordover a...@noordover.net wrote:
 I've found the cause of the problem.
 When I use a proxy in a camelcontext apparently everything gets loaded in a
 different way.
 When I put the proxy in another context the camelContext that uses type
 converters seems to work.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/JBoss-package-scan-tp5739097p5739201.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Dataformat - jaxb help, please.

2013-09-12 Thread Claus Ibsen
Hi

Add camel-jaxb as dependency.


On Thu, Sep 12, 2013 at 3:34 AM, gliesian rob...@gliesian.com wrote:
 Btw, I'm getting this:

 Caused by: java.lang.IllegalArgumentException: Cannot find data format with
 name: jaxb

 And I am using:

dependency
 groupIdorg.apache.camel/groupId
 artifactIdcamel-core/artifactId
 version2.12.0/version
 /dependency



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193p5739194.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: camel jaxb component

2013-09-12 Thread Claus Ibsen
Hi

Try to search the internet for this kind of JAXBException about doesnt
contain jaxb.index and you can find plenty of links about this.


On Wed, Sep 11, 2013 at 7:37 PM, contactreji contactr...@gmail.com wrote:
 Hi

 I am trying to marsha some data which is receivd at CXF Endpoint as follows


 camelContext xmlns=http://camel.apache.org/schema/spring;

 dataFormats
 jaxb id=myJaxb prettyPrint=true
 contextPath=outotec.pi.mes.id59.powerconsumption.DTPowerConsumption.class
 /
 /dataFormats

 redeliveryPolicyProfile redeliveryDelay=25
 maximumRedeliveries=3 id=sapRedelivery /
 route id=route_1

 from uri=cxf:bean:PowerConsumptionEndpoint /
 marshal ref=myJaxb/

 to uri=activemq:REJI_INboundQ /

 /route




 /camelContext



 It gives error  as follows

 Caused by: javax.xml.bind.JAXBException:
 outotec.pi.mes.id59.powerconsumption.DTPowerConsumption.class doesnt
 contain ObjectFactory.class or jaxb.index
 at
 com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:197)


 Can you help me with this jaxb component... I want to marshall the data
 before storing into the Queue..

 Reji



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



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


Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
Hi,
is possible to consume a message from a queue in ActiveMQ and keep it in the
queue for the next consumption of the same consumer? And is possible to
override a message? I know that is not the goal of Camel and ActiveMQ. But
I'm trying to use INOUT pattern and keep the message for future use.
Something like:
route
from uri=file://c:/temp/in/
to uri=activemq:example.A/
/route

route
   from uri=timer/
   to uri=activemq:example.INOUT pattern=InOut/--here got the
message from example.A
to uri=../
/route

route
from uri=activemq:example.INOUT/

process ref=consume/-here consume from example.A
/route


This works, but consume the message. And I would like to keep it in the
queue example.A




--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: spring ws camel

2013-09-12 Thread Mr.777
Any update guys?



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


Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread James Strachan
The way to do this with messaging is either to rollback (to effectively
cancel consuming it) or send the message again


On 12 September 2013 07:56, Cecilio Alvarez cecilio.alva...@hotmail.comwrote:

 Hi,
 is possible to consume a message from a queue in ActiveMQ and keep it in
 the
 queue for the next consumption of the same consumer? And is possible to
 override a message? I know that is not the goal of Camel and ActiveMQ. But
 I'm trying to use INOUT pattern and keep the message for future use.
 Something like:
 route
 from uri=file://c:/temp/in/
 to uri=activemq:example.A/
 /route

 route
from uri=timer/
to uri=activemq:example.INOUT pattern=InOut/--here got the
 message from example.A
 to uri=../
 /route

 route
 from uri=activemq:example.INOUT/

 process ref=consume/-here consume from example.A
 /route


 This works, but consume the message. And I would like to keep it in the
 queue example.A




 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
Thanks for the fast answer.
I can't send the message back, because that means if I send a new message to
the queue example.A from file, the sent back message will be consume before.
I would like to have something like a LIFO in the queue example.A. And If
there is no new message, keep consuming the old one. I tried resequencer to
sort the queue but doesn't seem the way to do it.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739219.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Add xml extension to filename in file producer

2013-09-12 Thread Mohammad Shadab Ali
Hi,

File producer uses a unique id as file name when filename header is not set, 
with no extension. My requirement is to add xml extension to the file in 
producer. Is there a way to configure this in the file producer.

Thanks for your help.


Regards,
Shadab



*** This e-mail (and any attachments), is confidential and may be privileged. 
It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its
contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately
by e-mail/phone  delete it from their system without making any copies or 
disclosing it to a third person.***

This e-mail (and any attachments), is confidential and may be privileged. It 
may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately 
by e-mail/phone  delete it from their system without making any copies or 
disclosing it to a third person.



Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread James Strachan
I don't really grok what you're trying to do or why ;) Wanna explain it?
You want to keep processing the same message again and again until there's
another one?


On 12 September 2013 08:40, Cecilio Alvarez cecilio.alva...@hotmail.comwrote:

 Thanks for the fast answer.
 I can't send the message back, because that means if I send a new message
 to
 the queue example.A from file, the sent back message will be consume
 before.
 I would like to have something like a LIFO in the queue example.A. And If
 there is no new message, keep consuming the old one. I tried resequencer to
 sort the queue but doesn't seem the way to do it.



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739219.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
James
---
Red Hat

Email: jstra...@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration


Re: Add xml extension to filename in file producer

2013-09-12 Thread Claus Ibsen
Hi

Just set a header with the file name you want, for example the keep
using he message id,

setHeader(Exchange.FILE_NAME, constant(${id}.xml))


On Thu, Sep 12, 2013 at 9:41 AM, Mohammad Shadab Ali
mohammad.a...@genpact.com wrote:
 Hi,

 File producer uses a unique id as file name when filename header is not set, 
 with no extension. My requirement is to add xml extension to the file in 
 producer. Is there a way to configure this in the file producer.

 Thanks for your help.


 Regards,
 Shadab


 
 *** This e-mail (and any attachments), is confidential and may be privileged. 
 It may be read, copied and used only
 by intended recipients. Unauthorized access to this e-mail (or attachments) 
 and disclosure or copying of its
 contents or any action taken in reliance on it is unlawful. Unintended 
 recipients must notify the sender immediately
 by e-mail/phone  delete it from their system without making any copies or 
 disclosing it to a third person.***

 This e-mail (and any attachments), is confidential and may be privileged. It 
 may be read, copied and used only
 by intended recipients. Unauthorized access to this e-mail (or attachments) 
 and disclosure or copying of its
 contents or any action taken in reliance on it is unlawful. Unintended 
 recipients must notify the sender immediately
 by e-mail/phone  delete it from their system without making any copies or 
 disclosing it to a third person.




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


Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
Exactly that, keep procesing the same message again and again until there's a
new one. I know sounds strange for camel, but I need to write the same
message until there's a new version. I tried with file component with let me
override it. But I need to get the message in a producer.
Many thanks :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739230.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Certification

2013-09-12 Thread Claus Ibsen
Hi

There used to be blackbelt which had online courses/certifications you could do.
But apparently this has been shutdown as of 2013.



On Thu, Sep 12, 2013 at 5:37 AM, Henrique Viecili viec...@gmail.com wrote:
 Hi everyone,

 I was looking for a certification on EIP and/or Camel and I found that
 RedHat has this one:
 http://www.redhat.com/training/courses/ex421/examobjective ($600)

 I assume RedHat knows what they are doing after they bought FuseSource and
 now have Claus and James working with them.

 So, what I would like to know is how many of you have taken the
 certification and what are you thoughts?

 Best regards,
 Henrique Viecili



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


Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
Thanks for the tips, I will try it! 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739235.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: WSDoAllReceiver: Incoming message does not contain required Security header

2013-09-12 Thread Colm O hEigeartaigh
WSDoAllReceiver is an old WSS4J class used by Axis. Could you post the
stacktrace on the Axis side or at least the configuration that the service
is using?

Colm.


On Wed, Sep 11, 2013 at 11:10 AM, hutao1 279125...@qq.com wrote:

 camel-config.xml :

 bean id=logIn class=org.apache.cxf.interceptor.LoggingInInterceptor /
 bean id=logOut
 class=org.apache.cxf.interceptor.LoggingOutInterceptor
 /
 bean id=saajOut
 class=org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor /
 bean id=wss4jOut
 class=org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor
 constructor-arg
 map
 entry key=action value=UsernameToken
 Timestamp /
 entry key=mustUnderstand value=0 /
 entry key=passwordType
 value=PasswordDigest /
 entry key=user value=iloyal-web /
 entry key=passwordCallbackRef
 ref bean=clientPasswordCallback
 /
 /entry
 /map
 /constructor-arg
 /bean
 bean id=clientPasswordCallback
 class=com.ibsplc.iloyal.ClientPasswordCallback
 property name=passwords
 map
 entry key=iloyal-web
 value=iloyal123 /
 entry key=travel-sky
 value=CEAEMsky /
 /map
 /property
 /bean

   bean id=enrichBean
 class=org.apache.camel.example.cxf.proxy.EnrichBean/
   cxf:cxfEndpoint id=reportAuthIncident

 address=http://172.21.127.200:
 ${proxy.port}/camel-example-cxf-proxy/webservices/authMember
endpointName=s:AuthenticateMember
serviceName=s:AuthenticateMemberService

 wsdlURL=
 http://172.20.35.232:5220/cea-ws/services/AuthenticateMemberService?wsdl;

 xmlns:s=http://www.ibsplc.com/iloyal/member/authenticatemember/wsdl; 

cxf:inInterceptors
 ref bean=logIn /
 /cxf:inInterceptors
 cxf:outInterceptors
 ref bean=saajOut /
 ref bean=wss4jOut /
 ref bean=logOut /
 /cxf:outInterceptors

/cxf:cxfEndpoint


   camel:camelContext xmlns=http://camel.apache.org/schema/spring;
 id=context1
  property which contains port number --
 propertyPlaceholder id=properties
 location=classpath:incident.properties,file:target/custom.properties/
   camel:endpoint id=callAuthRealWebService
 uri=
 http://172.20.35.232:5220/cea-ws/services/AuthenticateMemberService?throwExceptionOnFailure=false
 /
 camel:route

   camel:from uri=cxf:bean:reportAuthIncident?dataFormat=MESSAGE/

   camel:to uri=log:input/
   camel:to uri=bean:enrichBean/
   camel:to ref=callAuthRealWebService/
to uri=log:output/
 /camel:route
   /camel:camelContext

 reqest soap info:

 ID: 1
 Address:

 http://172.21.127.200:1101/camel-example-cxf-proxy/webservices/authMember?wsdl
 Encoding: UTF-8
 Content-Type: text/xml
 Headers: {Accept=[*/*], SOAPAction=[]}
 Payload: soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
 soap:Header
 wsse:Security
 xmlns:wsse=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 
 xmlns:wsu=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 
 wsu:Timestamp wsu:Id=TS-2
 wsu:Created2013-09-10T04:40:29.257Z/wsu:Created
 wsu:Expires2013-09-10T04:45:29.257Z/wsu:Expires
 /wsu:Timestamp
 wsse:UsernameToken wsu:Id=UsernameToken-1
 wsse:Usernameiloyal-web/wsse:Username
 wsse:Password
 Type=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
 K9Mq5YLweilnTkkt7NrS6R8m6MM=/wsse:Password
 wsse:Nonce
 EncodingType=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
 JGVHyVcyfZ4eNzoJhR5Yww==/wsse:Nonce
 wsu:Created2013-09-10T04:40:29.255Z/wsu:Created
 /wsse:UsernameToken/wsse:Security
 /soap:Header
 soap:Bodyns2:AuthenticateMemberRequest
 xmlns:ns2=http://www.ibsplc.com/iloyal/member/authenticatemember/type/
 companyCodeMU/companyCodeprogramCodeCEAEM/programCodemembershipNumber600260209668/membershipNumbertxnHeadertransactionIDABF3DF2C805EEE88ABC39E4747832EEC/transactionIDuserNameADMIN/userNametimeStamp2013-09-10T00:40:28.974+08:00/timeStamp/txnHeader/ns2:AuthenticateMemberRequest/soap:Body/soap:Envelope

 -

 request soap error:
 ID: 1
 Response-Code: 500
 Encoding: ISO-8859-1
 Content-Type: text/xml
 Headers: 

Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Claus Ibsen
Hi

Since you use ActiveMQ you can also try with advisory messages and
then see if that message has some details about last message enqued so
you can use that to see if its the same or new message since last
check.

http://activemq.apache.org/advisory-message.html

On Thu, Sep 12, 2013 at 10:37 AM, Cecilio Alvarez
cecilio.alva...@hotmail.com wrote:
 Thanks for the tips, I will try it!



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739235.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
Finally I made it using content enricher,

route
from uri=file://c:/temp/in/
to uri=file://c:/temp/schedule/ -this override the file, so I
always get the last one.
/route

route
   from uri=timer/
   pollEnrich
uri=file:c://temp/schedule?noop=trueamp;fileName=schedule.xml/--this
don't consume the file, so I have always the message.
to uri=../
/route

Finally I use file component, because its easier for users to open a simple
xml file to see the message.
Many thanks!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739245.html
Sent from the Camel - Users mailing list archive at Nabble.com.


About CXF-Camel Security header error

2013-09-12 Thread hutao1

error info:
Stacktrace
---
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Headerwsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsu:Timestamp
wsu:Id=TS-2wsu:Created2013-09-12T09:04:19.842Z/wsu:Createdwsu:Expires2013-09-12T09:09:19.842Z/wsu:Expires/wsu:Timestampwsse:UsernameToken
wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;MgAqAFHtbnYbQxSucZKsvssi2QU=/wsse:Passwordwsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;rtFaCVGcBvCyi38ysiYmxQ==/wsse:Noncewsu:Created2013-09-12T09:04:19.841Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
xmlns:ns2=quot;h... [Body clipped after 1000 chars, total length is 1414]]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1360)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.builder.ExpressionBuilder$38.evaluate(ExpressionBuilder.java:938)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo$2.evaluateParameterBinding(MethodInfo.java:571)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:466)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:239)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:278)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:143)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:92)[camel-cxf-2.12.0.jar:2.12.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)[camel-cxf-2.12.0.jar:2.12.0]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)[cxf-2.6.9.jar:2.6.9]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[cxf-2.6.9.jar:2.6.9]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[cxf-2.6.9.jar:2.6.9]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[cxf-2.6.9.jar:2.6.9]
at

Re: WSDoAllReceiver: Incoming message does not contain required Security header

2013-09-12 Thread hutao1
hi,Colm

use cxf 2.6.9 version

error:
Stacktrace
---
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Headerwsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsu:Timestamp
wsu:Id=TS-2wsu:Created2013-09-12T09:04:19.842Z/wsu:Createdwsu:Expires2013-09-12T09:09:19.842Z/wsu:Expires/wsu:Timestampwsse:UsernameToken
wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;MgAqAFHtbnYbQxSucZKsvssi2QU=/wsse:Passwordwsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;rtFaCVGcBvCyi38ysiYmxQ==/wsse:Noncewsu:Created2013-09-12T09:04:19.841Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
xmlns:ns2=h... [Body clipped after 1000 chars, total length is 1414]]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1360)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.builder.ExpressionBuilder$38.evaluate(ExpressionBuilder.java:938)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo$2.evaluateParameterBinding(MethodInfo.java:571)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:466)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:239)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:278)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:143)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:92)[camel-cxf-2.12.0.jar:2.12.0]
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)[camel-cxf-2.12.0.jar:2.12.0]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)[cxf-2.6.9.jar:2.6.9]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[cxf-2.6.9.jar:2.6.9]
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[cxf-2.6.9.jar:2.6.9]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[cxf-2.6.9.jar:2.6.9]
at

SFTP file retrieval does not work

2013-09-12 Thread viktoria
Hi -
I am trying to get some files from a remote sftp server. It does not give me
any exception but does not work either.  
I am using Camel version 2.12.0, with Spring version 3.0.5.
Using an ordinary sftp client (FileZilla) i am able to download the files.

Here is my route (Spring-DSL):

route id=sftpToJMSRoute
from
uri=sftp://host?password=passwordamp;username=useramp;noop=trueamp;recursive=trueamp;idempotent=trueamp;idempotentKey=${file:name}-${file:size}-${file:modified}amp;idempotentRepository=#fileStore/
process ref=downloadLogger /
to uri=file://c:/.../?recursive=true /
/route

I have tried many combination.  I gave a filename ... nothing worked.  Here
is the logfile:
...
2013-09-12 10:02:26,890 DEBUG SftpEndpoint:270 - Parameters for Generic file
process strategy {readLock=none, fastExistsCheck=false, noop=true,
readLockTimeout=2, readLockLoggingLevel=WARN, readLockMinLength=1,
readLockCheckInterval=5000}
2013-09-12 10:02:26,890 DEBUG SftpEndpoint:183 - Using Generic file process
strategy:
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@663e480f
2013-09-12 10:02:26,890 TRACE SftpConsumer:50 - prePollCheck on
sftp://##@#:22
2013-09-12 10:02:26,921 TRACE TimerListenerManager:86 - Running scheduled
TimerListener task
2013-09-12 10:02:26,921 DEBUG SftpConsumer:152 - Not connected/logged in,
connecting to: sftp://##@##:22
2013-09-12 10:02:26,921 TRACE TimerListenerManager:95 - Invoking onTimer on
org.apache.camel.management.mbean.ManagedCamelContext@742ab836
2013-09-12 10:02:26,921 TRACE SftpOperations:111 - Session isn't connected,
trying to recreate and connect.
2013-09-12 10:02:26,921 TRACE TimerListenerManager:95 - Invoking onTimer on
org.apache.camel.management.mbean.ManagedSuspendableRoute@5e411af2
2013-09-12 10:02:26,953 DEBUG SftpOperations:259 - Using
StrickHostKeyChecking: no
2013-09-12 10:02:26,953 TRACE SftpOperations:114 - Connecting use
connectTimeout: 1 ...
2013-09-12 10:02:26,953  INFO SftpOperations:359 - JSCH - Connecting to
#host# port 22
2013-09-12 10:02:26,999  INFO SftpOperations:359 - JSCH - Connection
established
2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - Remote version
string: SSH-2.0-mod_sftp/0.9.7
2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - Local version
string: SSH-2.0-JSCH-0.1.39
2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - CheckCiphers:
aes256-cbc,aes192-cbc,aes128-cbc
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - aes256-cbc is not
available.
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - aes192-cbc is not
available.
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - SSH_MSG_KEXINIT
sent
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - SSH_MSG_KEXINIT
received
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - kex:
server-client aes128-cbc hmac-md5 none
2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - kex:
client-server aes128-cbc hmac-md5 none
2013-09-12 10:02:27,155  INFO SftpOperations:359 - JSCH -
SSH_MSG_KEXDH_INIT sent
2013-09-12 10:02:27,155  INFO SftpOperations:359 - JSCH - expecting
SSH_MSG_KEXDH_REPLY
2013-09-12 10:02:27,202  INFO SftpOperations:359 - JSCH - ssh_rsa_verify:
signature true
2013-09-12 10:02:27,218  WARN SftpOperations:356 - JSCH - Permanently added
'#host#' (RSA) to the list of known hosts.
2013-09-12 10:02:27,218  INFO SftpOperations:359 - JSCH - SSH_MSG_NEWKEYS
sent
2013-09-12 10:02:27,249  INFO SftpOperations:359 - JSCH - SSH_MSG_NEWKEYS
received
2013-09-12 10:02:27,249  INFO SftpOperations:359 - JSCH -
SSH_MSG_SERVICE_REQUEST sent
2013-09-12 10:02:27,280  INFO SftpOperations:359 - JSCH -
SSH_MSG_SERVICE_ACCEPT received
2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Authentications
that can continue: publickey,keyboard-interactive,password
2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Next
authentication method: publickey
2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Authentications
that can continue: password
2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Next
authentication method: password
2013-09-12 10:02:27,374  INFO SftpOperations:359 - JSCH - Authentication
succeeded (password).
2013-09-12 10:02:27,374 TRACE SftpOperations:122 - Channel isn't connected,
trying to recreate and connect.
2013-09-12 10:02:27,421 TRACE SftpOperations:126 - Connecting use
connectTimeout: 1 ...
12.09.2013 10:02:27 com.sun.xml.ws.transport.http.servlet.WSServletDelegate
init
INFO: WSSERVLET14: JAX-WS servlet initializing
2013-09-12 10:02:27,920 TRACE TimerListenerManager:86 - Running scheduled
TimerListener task
2013-09-12 10:02:27,920 TRACE TimerListenerManager:95 - Invoking onTimer on
org.apache.camel.management.mbean.ManagedCamelContext@742ab836
2013-09-12 10:02:27,920 TRACE TimerListenerManager:95 - Invoking onTimer on
org.apache.camel.management.mbean.ManagedSuspendableRoute@5e411af2
2013-09-12 10:02:28,919 TRACE TimerListenerManager:86 - 

Re: About CXF-Camel Security header error

2013-09-12 Thread Colm O hEigeartaigh
Where is the service inbound configuration, i.e. the configuration for
WSS4JInInterceptor?

Colm.


On Thu, Sep 12, 2013 at 10:32 AM, hutao1 279125...@qq.com wrote:


 error info:
 Stacktrace

 ---
 org.apache.camel.CamelExecutionException: Exception occurred during
 execution on the exchange: Exchange[Message: soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
 soap:Headerwsse:Security
 xmlns:wsse=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 
 xmlns:wsu=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 wsu:Timestamp

 wsu:Id=TS-2wsu:Created2013-09-12T09:04:19.842Z/wsu:Createdwsu:Expires2013-09-12T09:09:19.842Z/wsu:Expires/wsu:Timestampwsse:UsernameToken

 wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
 Type=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
 MgAqAFHtbnYbQxSucZKsvssi2QU=/wsse:Passwordwsse:Nonce
 EncodingType=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
 rtFaCVGcBvCyi38ysiYmxQ==/wsse:Noncewsu:Created2013-09-12T09:04:19.841Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
 xmlns:ns2=quot;h... [Body clipped after 1000 chars, total length is 1414]]
 at

 org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1360)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.builder.ExpressionBuilder$38.evaluate(ExpressionBuilder.java:938)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo$2.evaluateParameterBinding(MethodInfo.java:571)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:466)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:239)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:278)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:143)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:92)[camel-cxf-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)[camel-cxf-2.12.0.jar:2.12.0]
 at

 org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)[cxf-2.6.9.jar:2.6.9]
 at

 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]
 at

 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]
 at
 java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]
 at

 org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[cxf-2.6.9.jar:2.6.9]
 at

 

Re: WSDoAllReceiver: Incoming message does not contain required Security header

2013-09-12 Thread Colm O hEigeartaigh
Right, but the error message indicates an Axis error, so you must not be
using CXF on the recipient side.

Colm.


On Thu, Sep 12, 2013 at 10:34 AM, hutao1 279125...@qq.com wrote:

 hi,Colm

 use cxf 2.6.9 version

 error:
 Stacktrace

 ---
 org.apache.camel.CamelExecutionException: Exception occurred during
 execution on the exchange: Exchange[Message: soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
 soap:Headerwsse:Security
 xmlns:wsse=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 
 xmlns:wsu=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 wsu:Timestamp

 wsu:Id=TS-2wsu:Created2013-09-12T09:04:19.842Z/wsu:Createdwsu:Expires2013-09-12T09:09:19.842Z/wsu:Expires/wsu:Timestampwsse:UsernameToken

 wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
 Type=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
 MgAqAFHtbnYbQxSucZKsvssi2QU=/wsse:Passwordwsse:Nonce
 EncodingType=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
 rtFaCVGcBvCyi38ysiYmxQ==/wsse:Noncewsu:Created2013-09-12T09:04:19.841Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
 xmlns:ns2=h... [Body clipped after 1000 chars, total length is 1414]]
 at

 org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1360)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.builder.ExpressionBuilder$38.evaluate(ExpressionBuilder.java:938)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo$2.evaluateParameterBinding(MethodInfo.java:571)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:466)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:239)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:278)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:143)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:92)[camel-cxf-2.12.0.jar:2.12.0]
 at

 org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)[camel-cxf-2.12.0.jar:2.12.0]
 at

 org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)[cxf-2.6.9.jar:2.6.9]
 at

 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]
 at

 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]
 at
 java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]
 at

 org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[cxf-2.6.9.jar:2.6.9]
 at

 

Re: About CXF-Camel Security header error

2013-09-12 Thread hutao1
cxf:cxfEndpoint id=quot;reportAuthIncidentquot; 
   address=quot;lt;a
href=quot;http://172.21.127.200:$quot;http://172.21.127.200:${proxy.port}/camel-example-cxf-proxy/webservices/authMember;
 
   endpointName=s:AuthenticateMember 
   serviceName=s:AuthenticateMemberService 
   wsdlURL=etc/AuthenticateMemberService.wsdl 
  
xmlns:s=http://www.ibsplc.com/iloyal/member/authenticatemember/wsdl; 
 cxf:properties  
entry key=dataFormat
value=CXF_MESSAGE /  
   /cxf:properties  
 
   cxf:inInterceptors
ref bean=logIn /
/cxf:inInterceptors
cxf:outInterceptors
ref bean=saajOut /
ref bean=wss4jOut /
ref bean=logOut /
/cxf:outInterceptors
   /cxf:cxfEndpoint  
   cxf:cxfEndpoint id=realreportAuthIncident 
  
address=http://172.20.35.232:5220/cea-ws/services/AuthenticateMemberService;

   cxf:properties  
entry key=dataFormat
value=CXF_MESSAGE /  
   /cxf:properties  
 
   cxf:inInterceptors
ref bean=logIn /
/cxf:inInterceptors
cxf:outInterceptors
ref bean=saajOut /
ref bean=wss4jOut /
ref bean=logOut /
/cxf:outInterceptors

   /cxf:cxfEndpoint  



--
View this message in context: 
http://camel.465427.n5.nabble.com/About-CXF-Camel-Security-header-error-tp5739241p5739249.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: WSDoAllReceiver: Incoming message does not contain required Security header

2013-09-12 Thread hutao1
but server service is cxf ,now error stack is:
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml;charset=UTF-8
Headers: {Content-Length=[1393], content-type=[text/xml;charset=UTF-8],
Server=[Jetty(7.5.4.v20111024)]}
Payload: soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstringException
occurred during execution on the exchange: Exchange[Message:
lt;soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;lt;soap:Headerlt;wsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;lt;wsu:Timestamp
wsu:Id=TS-2lt;wsu:Created2013-09-12T10:10:47.464Zlt;/wsu:Createdlt;wsu:Expires2013-09-12T10:15:47.464Zlt;/wsu:Expireslt;/wsu:Timestamplt;wsse:UsernameToken
wsu:Id=UsernameToken-1lt;wsse:Usernameiloyal-weblt;/wsse:Usernamelt;wsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;BgE1gaaq1o6pEo5r87csdeNT2iE=lt;/wsse:Passwordlt;wsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;Xo2b4frXr6eItwBcXdF2Qw==lt;/wsse:Noncelt;wsu:Created2013-09-12T10:10:47.463Zlt;/wsu:Createdlt;/wsse:UsernameTokenlt;/wsse:Securitylt;/soap:Headerlt;soap:Bodylt;ns2:AuthenticateMemberRequest
xmlns:ns2=h... [Body clipped after 1000 chars, total length is
1414]]/faultstring/soap:Fault/soap:Body/soap:Envelope
--
javax.xml.ws.soap.SOAPFaultException: Exception occurred during execution on
the exchange: Exchange[Message: soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Headerwsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsu:Timestamp
wsu:Id=TS-2wsu:Created2013-09-12T10:10:47.464Z/wsu:Createdwsu:Expires2013-09-12T10:15:47.464Z/wsu:Expires/wsu:Timestampwsse:UsernameToken
wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;BgE1gaaq1o6pEo5r87csdeNT2iE=/wsse:Passwordwsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;Xo2b4frXr6eItwBcXdF2Qw==/wsse:Noncewsu:Created2013-09-12T10:10:47.463Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
xmlns:ns2=quot;h... [Body clipped after 1000 chars, total length is 1414]]
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
at $Proxy72.authenticateMember(Unknown Source)
at
org.apache.camel.example.reportincident.MyReportIncidentRoutesTest.runTest(MyReportIncidentRoutesTest.java:184)
at
org.apache.camel.example.reportincident.MyReportIncidentRoutesTest.testReportIncident(MyReportIncidentRoutesTest.java:131)
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
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  

Re: About CXF-Camel Security header error

2013-09-12 Thread Colm O hEigeartaigh
You should have some in configuration somewhere that configures how
security should be applied to a received message. See for example the
wss4jInInterceptor bean here:

http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident-wssecurity/src/main/resources/META-INF/spring/camel-context.xml?view=markup

Colm.




On Thu, Sep 12, 2013 at 11:13 AM, hutao1 279125...@qq.com wrote:

 cxf:cxfEndpoint id=quot;reportAuthIncidentquot;
address=quot;lt;a
 href=quot;http://172.21.127.200:$quot;http://172.21.127.200:
 ${proxy.port}/camel-example-cxf-proxy/webservices/authMember
endpointName=s:AuthenticateMember
serviceName=s:AuthenticateMemberService
wsdlURL=etc/AuthenticateMemberService.wsdl

 xmlns:s=http://www.ibsplc.com/iloyal/member/authenticatemember/wsdl; 
  cxf:properties
 entry key=dataFormat
 value=CXF_MESSAGE /
/cxf:properties

cxf:inInterceptors
 ref bean=logIn /
 /cxf:inInterceptors
 cxf:outInterceptors
 ref bean=saajOut /
 ref bean=wss4jOut /
 ref bean=logOut /
 /cxf:outInterceptors
/cxf:cxfEndpoint
cxf:cxfEndpoint id=realreportAuthIncident

 address=
 http://172.20.35.232:5220/cea-ws/services/AuthenticateMemberService;
 
cxf:properties
 entry key=dataFormat
 value=CXF_MESSAGE /
/cxf:properties

cxf:inInterceptors
 ref bean=logIn /
 /cxf:inInterceptors
 cxf:outInterceptors
 ref bean=saajOut /
 ref bean=wss4jOut /
 ref bean=logOut /
 /cxf:outInterceptors

/cxf:cxfEndpoint



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/About-CXF-Camel-Security-header-error-tp5739241p5739249.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com


Re: About CXF-Camel Security header error

2013-09-12 Thread hutao1
I tried the method,but  same error.

javax.xml.ws.soap.SOAPFaultException: Exception occurred during execution on
the exchange: Exchange[Message: soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:Headerwsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsu:Timestamp
wsu:Id=TS-2wsu:Created2013-09-12T11:08:24.484Z/wsu:Createdwsu:Expires2013-09-12T11:13:24.484Z/wsu:Expires/wsu:Timestampwsse:UsernameToken
wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;M5h+UgcGRrfefL2Tu7oWilE1Rgw=/wsse:Passwordwsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;yhaaIdTQHkDHT1nNyF2PqQ==/wsse:Noncewsu:Created2013-09-12T11:08:24.482Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
xmlns:ns2=quot;h... [Body clipped after 1000 chars, total length is 1414]]
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
at $Proxy72.authenticateMember(Unknown Source)
at
org.apache.camel.example.reportincident.MyReportIncidentRoutesTest.runTest(MyReportIncidentRoutesTest.java:200)
at
org.apache.camel.example.reportincident.MyReportIncidentRoutesTest.testReportIncident(MyReportIncidentRoutesTest.java:147)
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
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.cxf.binding.soap.SoapFault: Exception occurred during
execution on the exchange: Exchange[Message: lt;soap:Envelope
xmlns:soap=quot;http://schemas.xmlsoap.org/soap/envelope/quot;soap:Headerwsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsu:Timestamp
wsu:Id=TS-2wsu:Created2013-09-12T11:08:24.484Z/wsu:Createdwsu:Expires2013-09-12T11:13:24.484Z/wsu:Expires/wsu:Timestampwsse:UsernameToken
wsu:Id=UsernameToken-1wsse:Usernameiloyal-web/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;M5h+UgcGRrfefL2Tu7oWilE1Rgw=/wsse:Passwordwsse:Nonce
EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;yhaaIdTQHkDHT1nNyF2PqQ==/wsse:Noncewsu:Created2013-09-12T11:08:24.482Z/wsu:Created/wsse:UsernameToken/wsse:Security/soap:Headersoap:Bodyns2:AuthenticateMemberRequest
xmlns:ns2=h... [Body clipped after 1000 chars, total length is 1414]]
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
at

Re: Keep the same message in a queue after consuming it.

2013-09-12 Thread Cecilio Alvarez
The example above will not write the same file again and again, when you set
noop=true camel set idempotent as well. So this line is now:
pollEnrich
uri=file:c://temp/schedule?noop=trueamp;idempotent=falseamp;fileName=schedule.xml/--this
don't consume the file, so I have always the message. 

Hope this help.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Keep-the-same-message-in-a-queue-after-consuming-it-tp5739214p5739255.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: HL7 v3

2013-09-12 Thread Tracy Snell
The library we use for HL7 is HAPI (http://hl7api.sourceforge.net/index.html). 
Unfortunately it doesn't support V3. I'd also love to see V3 support. I'm going 
to dig for appropriate libraries and consider adding that functionality.



Re: SFTP file retrieval does not work

2013-09-12 Thread Bengt Rodehav
It looks like the username hasn't been propagated to the server. I normally
specify the user as follows:

sftp://user@host?password=password

According to the documentation your way should work too but perhaps there
is a bug in the sftp component that prevents it from checking the
username parameter?

/Bengt


2013/9/12 viktoria viktoria.krolikow...@yahoo.de

 Hi -
 I am trying to get some files from a remote sftp server. It does not give
 me
 any exception but does not work either.
 I am using Camel version 2.12.0, with Spring version 3.0.5.
 Using an ordinary sftp client (FileZilla) i am able to download the files.

 Here is my route (Spring-DSL):

 route id=sftpToJMSRoute
 from

 uri=sftp://host?password=passwordamp;username=useramp;noop=trueamp;recursive=trueamp;idempotent=trueamp;idempotentKey=${file:name}-${file:size}-${file:modified}amp;idempotentRepository=#fileStore/
 process ref=downloadLogger /
 to uri=file://c:/.../?recursive=true /
 /route

 I have tried many combination.  I gave a filename ... nothing worked.  Here
 is the logfile:
 ...
 2013-09-12 10:02:26,890 DEBUG SftpEndpoint:270 - Parameters for Generic
 file
 process strategy {readLock=none, fastExistsCheck=false, noop=true,
 readLockTimeout=2, readLockLoggingLevel=WARN, readLockMinLength=1,
 readLockCheckInterval=5000}
 2013-09-12 10:02:26,890 DEBUG SftpEndpoint:183 - Using Generic file process
 strategy:

 org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@663e480f
 2013-09-12 10:02:26,890 TRACE SftpConsumer:50 - prePollCheck on
 sftp://##@#:22
 2013-09-12 10:02:26,921 TRACE TimerListenerManager:86 - Running scheduled
 TimerListener task
 2013-09-12 10:02:26,921 DEBUG SftpConsumer:152 - Not connected/logged in,
 connecting to: sftp://##@##:22
 2013-09-12 10:02:26,921 TRACE TimerListenerManager:95 - Invoking onTimer on
 org.apache.camel.management.mbean.ManagedCamelContext@742ab836
 2013-09-12 10:02:26,921 TRACE SftpOperations:111 - Session isn't connected,
 trying to recreate and connect.
 2013-09-12 10:02:26,921 TRACE TimerListenerManager:95 - Invoking onTimer on
 org.apache.camel.management.mbean.ManagedSuspendableRoute@5e411af2
 2013-09-12 10:02:26,953 DEBUG SftpOperations:259 - Using
 StrickHostKeyChecking: no
 2013-09-12 10:02:26,953 TRACE SftpOperations:114 - Connecting use
 connectTimeout: 1 ...
 2013-09-12 10:02:26,953  INFO SftpOperations:359 - JSCH - Connecting to
 #host# port 22
 2013-09-12 10:02:26,999  INFO SftpOperations:359 - JSCH - Connection
 established
 2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - Remote version
 string: SSH-2.0-mod_sftp/0.9.7
 2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - Local version
 string: SSH-2.0-JSCH-0.1.39
 2013-09-12 10:02:27,093  INFO SftpOperations:359 - JSCH - CheckCiphers:
 aes256-cbc,aes192-cbc,aes128-cbc
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - aes256-cbc is
 not
 available.
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - aes192-cbc is
 not
 available.
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - SSH_MSG_KEXINIT
 sent
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - SSH_MSG_KEXINIT
 received
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - kex:
 server-client aes128-cbc hmac-md5 none
 2013-09-12 10:02:27,140  INFO SftpOperations:359 - JSCH - kex:
 client-server aes128-cbc hmac-md5 none
 2013-09-12 10:02:27,155  INFO SftpOperations:359 - JSCH -
 SSH_MSG_KEXDH_INIT sent
 2013-09-12 10:02:27,155  INFO SftpOperations:359 - JSCH - expecting
 SSH_MSG_KEXDH_REPLY
 2013-09-12 10:02:27,202  INFO SftpOperations:359 - JSCH - ssh_rsa_verify:
 signature true
 2013-09-12 10:02:27,218  WARN SftpOperations:356 - JSCH - Permanently
 added
 '#host#' (RSA) to the list of known hosts.
 2013-09-12 10:02:27,218  INFO SftpOperations:359 - JSCH - SSH_MSG_NEWKEYS
 sent
 2013-09-12 10:02:27,249  INFO SftpOperations:359 - JSCH - SSH_MSG_NEWKEYS
 received
 2013-09-12 10:02:27,249  INFO SftpOperations:359 - JSCH -
 SSH_MSG_SERVICE_REQUEST sent
 2013-09-12 10:02:27,280  INFO SftpOperations:359 - JSCH -
 SSH_MSG_SERVICE_ACCEPT received
 2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Authentications
 that can continue: publickey,keyboard-interactive,password
 2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Next
 authentication method: publickey
 2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Authentications
 that can continue: password
 2013-09-12 10:02:27,311  INFO SftpOperations:359 - JSCH - Next
 authentication method: password
 2013-09-12 10:02:27,374  INFO SftpOperations:359 - JSCH - Authentication
 succeeded (password).
 2013-09-12 10:02:27,374 TRACE SftpOperations:122 - Channel isn't connected,
 trying to recreate and connect.
 2013-09-12 10:02:27,421 TRACE SftpOperations:126 - Connecting use
 connectTimeout: 1 ...
 12.09.2013 10:02:27 com.sun.xml.ws.transport.http.servlet.WSServletDelegate
 init
 INFO: WSSERVLET14: 

Error when adding dataFormats in camel route file

2013-09-12 Thread vsmahesh
Hi all,

When I am using dataFormats in my route I am getting the error [INFO]
Finished at: Thu Sep 12 17:16:32 EEST 2013
[INFO] Final Memory: 15M/111M
[INFO]

[ERROR] Failed to execute goal
org.apache.camel:camel-maven-plugin:2.10.0.fuse-7
1-047:run (default-cli) on project mes-bw-energyconsumption-queue: null:
MojoExe
cutionException: InvocationTargetException: Line 41 in XML document from
file [D
:\Project\Mahesh\Workspace\mes-bw-energyconsumption-queue\target\classes\META-IN
F\spring\camel-route.xml] is invalid; nested exception is
org.xml.sax.SAXParseEx
ception: cvc-complex-type.2.4.a: Invalid content was found starting with
element
 'dataFormats'. One of
'{http://www.springframework.org/schema/beans:import, 
http://www.springframework.org/schema/beans:alias,
http://www.springframework.
org/schema/beans:bean,
WC[##other:http://www.springframework.org/schema/beans;
]}' is expected. - [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

My route is like 

dataFormats
jaxb id=input prettyPrint=true
contextPath=mes.id59.powerconsumption
partClass=.id59.powerconsumption.Details /

/dataFormats

import resource=classpath:META-INF/spring/camel-cxf.xml /

camelContext xmlns=http://camel.apache.org/schema/spring;
route id=Route1_MES_Queue
from uri=cxf:bean:PowerConsumptionEndpoint/
marshal ref=input /
to uri=activemq:queue:EC_InboundQueue/
/route

My pom is 

?xml version=1.0 encoding=UTF-8 standalone=no?
project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;

modelVersion4.0.0/modelVersion



version1.0.0/version
groupIdcom.outotec/groupId
descriptionCreates a web service using the WSDL contract
first/description
packagingbundle/packaging




properties

project.build.sourceEncodingUTF-8/project.build.sourceEncoding

project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding


/properties

repositories



repository
   idspring-release/id
   urlhttp://maven.springframework.org/release/url
  /repository
  repository
   idmaven-us-nuxeo/id
   urlhttps://maven-us.nuxeo.org/nexus/content/groups/public/url
  /repository

repository
idrelease.fusesource.org/id
nameFuseSource Release Repository/name

urlhttp://repo.fusesource.com/nexus/content/repositories/releases/url
snapshots
enabledfalse/enabled
/snapshots
releases
enabledtrue/enabled
/releases
/repository
repository
idsnapshot.fusesource.org/id
nameFuseSource Snapshot Repository/name

urlhttp://repo.fusesource.com/nexus/content/repositories/snapshots/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledfalse/enabled
/releases
/repository

repository
idfusesource/id
nameFuseSource Release Repository/name

urlhttp://repo.fusesource.com/nexus/content/groups/public//url
snapshots
enabledfalse/enabled
/snapshots
releases
enabledtrue/enabled
/releases
/repository
repository
idfusesource.ea/id
nameFuseSource Community Early Access Release 
Repository/name

urlhttp://repo.fusesource.com/nexus/content/groups/ea/url
snapshots
enabledfalse/enabled
/snapshots
releases
enabledtrue/enabled
/releases
/repository
repository
idjboss-public-repository-group/id
nameJBoss Public Repository Group/name

urlhttp://repository.jboss.org/nexus/content/groups/public//url
layoutdefault/layout
releases
   

DefaultErrorHandler and nested routes

2013-09-12 Thread fbarbat
Hi,

I have these routes:

from(direct:a).routeId(1)
.onException(Exception.class).handled(true).to(direct:d).end()
.to(direct:b).to(direct:c);

from(direct:b).routeId(2).process(new ThrowingExceptionProcessor());
from(direct:c).routeId(3).process(new OkProcessor());

from(direct:d).routeId(4).process(new ExceptionProcessor());

Let's suppose a message comes to route 1. If ThrowingExceptionProcessor
throws an exception I would expect that the exception would be handled by
the onException clause. However, it looks like the exception is propagated
directly to the consumer (direct:a). How can I force the exceptions thrown
inside child routes to be managed by the onException clause?

Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/DefaultErrorHandler-and-nested-routes-tp5739261.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Error when adding dataFormats in camel route file

2013-09-12 Thread James Carman
Put it inside the camelContext element.  It's from the same namespace.

On Thu, Sep 12, 2013 at 10:21 AM, vsmahesh aneesh_...@yahoo.co.in wrote:
 Hi all,

 When I am using dataFormats in my route I am getting the error [INFO]
 Finished at: Thu Sep 12 17:16:32 EEST 2013
 [INFO] Final Memory: 15M/111M
 [INFO]
 
 [ERROR] Failed to execute goal
 org.apache.camel:camel-maven-plugin:2.10.0.fuse-7
 1-047:run (default-cli) on project mes-bw-energyconsumption-queue: null:
 MojoExe
 cutionException: InvocationTargetException: Line 41 in XML document from
 file [D
 :\Project\Mahesh\Workspace\mes-bw-energyconsumption-queue\target\classes\META-IN
 F\spring\camel-route.xml] is invalid; nested exception is
 org.xml.sax.SAXParseEx
 ception: cvc-complex-type.2.4.a: Invalid content was found starting with
 element
  'dataFormats'. One of
 '{http://www.springframework.org/schema/beans:import, 
 http://www.springframework.org/schema/beans:alias,
 http://www.springframework.
 org/schema/beans:bean,
 WC[##other:http://www.springframework.org/schema/beans;
 ]}' is expected. - [Help 1]
 [ERROR]
 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
 swit
 ch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR]

 My route is like

 dataFormats
 jaxb id=input prettyPrint=true
 contextPath=mes.id59.powerconsumption
 partClass=.id59.powerconsumption.Details /

 /dataFormats

 import resource=classpath:META-INF/spring/camel-cxf.xml /

 camelContext xmlns=http://camel.apache.org/schema/spring;
 route id=Route1_MES_Queue
 from uri=cxf:bean:PowerConsumptionEndpoint/
 marshal ref=input /
 to uri=activemq:queue:EC_InboundQueue/
 /route

 My pom is

 ?xml version=1.0 encoding=UTF-8 standalone=no?
 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;

 modelVersion4.0.0/modelVersion



 version1.0.0/version
 groupIdcom.outotec/groupId
 descriptionCreates a web service using the WSDL contract
 first/description
 packagingbundle/packaging




 properties
 
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 
 project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding


 /properties

 repositories



 repository
idspring-release/id
urlhttp://maven.springframework.org/release/url
   /repository
   repository
idmaven-us-nuxeo/id
urlhttps://maven-us.nuxeo.org/nexus/content/groups/public/url
   /repository

 repository
 idrelease.fusesource.org/id
 nameFuseSource Release Repository/name
 
 urlhttp://repo.fusesource.com/nexus/content/repositories/releases/url
 snapshots
 enabledfalse/enabled
 /snapshots
 releases
 enabledtrue/enabled
 /releases
 /repository
 repository
 idsnapshot.fusesource.org/id
 nameFuseSource Snapshot Repository/name

 urlhttp://repo.fusesource.com/nexus/content/repositories/snapshots/url
 snapshots
 enabledtrue/enabled
 /snapshots
 releases
 enabledfalse/enabled
 /releases
 /repository

 repository
 idfusesource/id
 nameFuseSource Release Repository/name
 
 urlhttp://repo.fusesource.com/nexus/content/groups/public//url
 snapshots
 enabledfalse/enabled
 /snapshots
 releases
 enabledtrue/enabled
 /releases
 /repository
 repository
 idfusesource.ea/id
 nameFuseSource Community Early Access Release 
 Repository/name
 
 urlhttp://repo.fusesource.com/nexus/content/groups/ea/url
 snapshots
 enabledfalse/enabled
 /snapshots
 releases
 enabledtrue/enabled
 /releases
 /repository
 repository
 idjboss-public-repository-group/id
 nameJBoss Public 

Re: DefaultErrorHandler and nested routes

2013-09-12 Thread Claus Ibsen
Move it outside the route so its context scoped onException instead.


On Thu, Sep 12, 2013 at 4:29 PM, fbarbat fbar...@gmail.com wrote:
 Hi,

 I have these routes:

 from(direct:a).routeId(1)
 .onException(Exception.class).handled(true).to(direct:d).end()
 .to(direct:b).to(direct:c);

 from(direct:b).routeId(2).process(new ThrowingExceptionProcessor());
 from(direct:c).routeId(3).process(new OkProcessor());

 from(direct:d).routeId(4).process(new ExceptionProcessor());

 Let's suppose a message comes to route 1. If ThrowingExceptionProcessor
 throws an exception I would expect that the exception would be handled by
 the onException clause. However, it looks like the exception is propagated
 directly to the consumer (direct:a). How can I force the exceptions thrown
 inside child routes to be managed by the onException clause?

 Thanks.



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/DefaultErrorHandler-and-nested-routes-tp5739261.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



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


Ignoring permissions errors on File (FTP/SFTP) consumers

2013-09-12 Thread Scott Parkerson
Supposing I had a route that consumed from a remote directory via SFTP.
When files are dropped into this directory, they are usually the wrong
permission until a cron job comes by to fix the permissions so that they
are readable by the Camel file consumer.

However, until the permissions are set correctly, the file consumer
generates a nasty stacktrace in the logs that looks like this when it
attempts to read a file it has no permission to read:

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: somefile.txt
at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:532)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
at
org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:494)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:317)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
at
org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:92)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[106:org.apache.camel.camel-core:2.10.0.redhat-60024]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)[:1.6.0_30]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown
Source)[:1.6.0_30]
at java.util.concurrent.FutureTask.runAndReset(Unknown
Source)[:1.6.0_30]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown
Source)[:1.6.0_30]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown
Source)[:1.6.0_30]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)[:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)[:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)[:1.6.0_30]
at java.lang.Thread.run(Unknown Source)[:1.6.0_30]
Caused by: 3: Permission denied
at
com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2569)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
at
com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1205)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
at
com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1158)[60:org.apache.servicemix.bundles.jsch:0.1.48.1]
at
org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:525)[214:org.apache.camel.camel-ftp:2.10.0.redhat-60024]
... 16 more


Is there a way to neuter this particular warning either by some routing
magic or policy changes?

--sgp


Simple Language Question

2013-09-12 Thread Gershaw, Geoffrey A. (KFFC 223)
Hello,


I am trying to print the size of a seda queue in a log statement. See my 
attempt below. I need to get hold of the Context so I can lookup the seda 
endpoint. I thought I could do this via the Exchange. I can seem to get a hold 
of that either.

Anyone know how to get a reference to the CamelContext or Exchange in simple?

camel:log message=HandleMultiMarketDataIncremental in 
${date:now:HH:mm:ss.SSS} 
sedaQueue:${in.getExchange().getContext().getEndpoint('seda:HandleMultiMarketDataIncremental').size()}/

Thanks much

Geoffrey A Gershaw



=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 



Usage of property-placeholders in the interceptFrom(String) method calls.

2013-09-12 Thread Steve
Hello Camel-Users,

Can property placeholders be used in the URI supplied to the
interceptFrom(String) method belonging to the RouteBuilder class?  My
apologies if this topic is covered by existing documentation; if so, I did
not see it.

I was reading CAMEL-5129 which addressed a similar issue, but that appeared
to be when a placeholder was used in the URI  passed in a from(String)
method call.  I examined the unit-test associated with the JIRA issue and
it did not cover my particular scenario.

I have been attempting to use a property placeholder in both the
interceptFrom and from method calls without much success. The following
example demonstrates my usage:

Example:

interceptFrom(activemq:{{jms.order.destination}})
.when(header(MSG_TYPE).isNotEqualTo(ORDER))
.to(direct:ERROR).stop();

from(activemq:{{jms.order.destination}})
.to(file:{{file.order.inbox}});

In this case the Exchange is not intercepted.  In contrast, if the
interceptFrom has a hard-coded value then the Exchange is intercepted as
expected (where jms.order.destination = ORDERS:

interceptFrom(activemq:ORDERS)
.when(header(MSG_TYPE).isNotEqualTo(ORDER))
.to(direct:ERROR).stop();

from(activemq:{{jms.order.destination}})
.to(file:{{file.order.inbox}});


This is likely the correct behavior, but I was hoping to receive
confirmation in that regard.

Environment:
- Camel version:  2.10.0.redhat-60024 (though I tried 2.11.1 as well)
- Oracle JDK 1.7.x

Many thanks,

-Steve


Re: WSDL-error

2013-09-12 Thread Aki Yoshida
you can check if the wsdl file is in the reported path  D:\Program
Files\fuse-esb-full-7.1.0.fuse-047\fuse-esb-7.
1.0.fuse-047\wsdl\SI_ID52_MaterialConsumption_async_outService3.wsdl


and it's probably not there, so either you need to put it there or
change the path to point to where the wsdl file actually resides.


2013/8/30 mahii.in87 mahesh.so...@wipro.com:

 Hi

 When i replaced the wsdl i am getting the following error.I replaced the
 wsdl SI_ID52_MaterialConsumption_async_outService3 with
 SI_ID52_MaterialConsumption_async_outService.I changed the path in pom
 also.but error is thorwing. Can anyone help me in this.

 javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem
 parsing 'wsdl/SI_ID52_MaterialConsum
 ption_async_outService3.wsdl'.: java.io.FileNotFoundException: D:\Program
 Files\fuse-esb-full-7.1.0.fuse-047\fuse-esb-7.
 1.0.fuse-047\wsdl\SI_ID52_MaterialConsumption_async_outService3.wsdl (The
 system cannot find the path specified)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown
 Source)[171:org.apache.servicemix.bundles.wsdl4j:1.6.2.6]
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown
 Source)[171:org.apache.servicemix.bundles.wsdl4j:1.6.2.6]
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown
 Source)[171:org.apache.servicemix.bundles.wsdl4j:1.6.2.6]
at
 org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:249)[168:org.apache.cxf.cxf-rt-core:
 2.6.0.fuse-71-047]
at
 org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:192)[168:org.apache.cxf.cxf-rt-core:2
 .6.0.fuse-71-047]
at
 org.apache.cxf.wsdl11.WSDLServiceFactory.init(WSDLServiceFactory.java:92)[168:org.apache.cxf.cxf-rt-core:2.6
 .0.fuse-71-047]
... 32 more



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


Stay in touch with me through LinkedIn

2013-09-12 Thread Eugenio Perrotta Neto
LinkedIn




Willem.Jiang,

I'd like to include you in my network to share updates and stay in touch.

- Eugenio

Eugenio Perrotta Neto
Desenvolvedor Java at Giran
Serra Area, Brazil

Confirm that you know Eugenio Perrotta Neto:
https://www.linkedin.com/e/-c2ht9p-hliewzlx-3d/isd/16515285382/Tyy5eNl9/?hs=falsetok=2BJF2sBJGXIRU1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-c2ht9p-hliewzlx-3d/zZhE0NJmpMICliQlbwlMGXsItkHhg2JlbO81eA1Ijbw7IzP4HOGe61SW1fO/goo/ml-node%2Bs465427n5724185h65%40n5%2Enabble%2Ecom/20061/I5491718039_1/?hs=falsetok=3ugBZZRCiXIRU1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  




--
View this message in context: 
http://camel.465427.n5.nabble.com/Stay-in-touch-with-me-through-LinkedIn-tp5739280.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Stay in touch with me through LinkedIn

2013-09-12 Thread Eugenio Perrotta Neto
LinkedIn




Willem.Jiang,

I'd like to include you in my network to share updates and stay in touch.

- Eugenio

Eugenio Perrotta Neto
Desenvolvedor Java at Giran
Serra Area, Brazil

Confirm that you know Eugenio Perrotta Neto:
https://www.linkedin.com/e/-c2ht9p-hliewzqe-5i/isd/16515285382/Tyy5eNl9/?hs=falsetok=2BJF2sBJGXIRU1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-c2ht9p-hliewzqe-5i/zZhE0NJmpMICliQlbwlMGXsItkHhg2JlbO81eA1Ijbw7IzP4HOGe61SW1fO/goo/ml-node%2Bs465427n5724185h65%40n5%2Enabble%2Ecom/20061/I5491718070_1/?hs=falsetok=0f9AglRoaXIRU1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  




--
View this message in context: 
http://camel.465427.n5.nabble.com/Stay-in-touch-with-me-through-LinkedIn-tp5739281.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: HL7 v3

2013-09-12 Thread Hadrian Zbarcea
Ed and I had a presentation at OSEHRA last week showing (among other 
things) how to use HL7 with Mirth and Camel. It's a bit tricky. As other 
said the camel-hl7 component is based on the hapi api with supports the 
version 2.x of HL7 wich is an EDI format, not xml.


Afaik, most of the industry is on hl7 2.x with no clear plans to 
transition to 3.x. And here lies the Camel opportunity to provide some 
value added, transformation, validation, etc.


If you could share more about what you're trying to do, I may be able to 
help you more.


Cheers,
Hadrian



On 09/04/2013 06:06 PM, capzulu wrote:

Hello Hadrian,



I don't remember what was my last message.

But I can tell you that I've used Mirth Connect to work with HL7 v3
messages. I've used a Java library to validate a XML message against a XSD.

Send me another message if you want some more details.



Best regards,

Miguel Castilho



De: TechieDeep [via Camel] [mailto:ml-node+s465427n5738665...@n5.nabble.com]

Enviada: quarta-feira, 4 de Setembro de 2013 11:33
Para: capzulu
Assunto: Re: HL7 v3



Hadrian,

I am working on an integration where I have to send HL7 outbound messages to
an openlink from a web service. Can you please elaborate more on your last
message.

How you worked with xsd and camel

   _

If you reply to this email, your message will be added to the discussion
below:

http://camel.465427.n5.nabble.com/HL7-v3-tp5732915p5738665.html

To unsubscribe from HL7 v3, click here
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscrib
e_by_codenode=5732915code=bWlndWVsY2FzdGlsaG9Ac2Fwby5wdHw1NzMyOTE1fC0xNzA0
NDkxMjAz .

http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_view
erid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNa
mespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.No
deNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_ema
ils%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml NAML





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



Re: File renaming problems under Windows

2013-09-12 Thread bocamel
Christian, 

I am afraid my celebration of the fix might be a little premature. :-). 
This failure of renaming/deleting a consumed file error still occurs when I
forced a org.apache.camel.component.bean.AmbiguousMethodCallException in the
route.  In other words, if the route receives a file from file consumer and
sends it to a bean (having similar methods) that may result the above
exception, then the File component cannot delete/rename the file.  I have
been able to reproduce this issue consistently.

Unfortunately in this case, since I am processing Excel files (binary
format), I cannot try to convert the file into String first to see whether
the problem will go away.

Here is the route:

camel:route id=route-process-row
camel:from uri=file:src/data/rowfile /
camel:to uri=bean:converter /
camel:onException 
camel:exceptionorg.apache.camel.component.bean.AmbiguousMethodCallException/camel:exception

camel:handledconstanttrue/constant/camel:handled
camel:log message=*** Exception caught *** /
/camel:onException
camel:onException

camel:exceptionjava.lang.RuntimeException/camel:exception

camel:handledconstanttrue/constant/camel:handled
camel:log message=*** Exception caught *** /
/camel:onException
/camel:route

The two methods of bean:converter are:
public ExternalDoc processRowExcelDoc(@Body InputStream body,
@Header(CamelFileNameOnly) String fn)
and
public ExternalDoc processColExcelDoc(@Body InputStream body,
@Header(CamelFileNameOnly) String fn)

Thanks for any help you may provide!





--
View this message in context: 
http://camel.465427.n5.nabble.com/File-renaming-problems-under-Windows-tp5719484p5739283.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: HL7 v3

2013-09-12 Thread capzulu
You can look up in Mirth Connect source code, as it was built using Java.

 

De: tjsnell [via Camel] [mailto:ml-node+s465427n5739256...@n5.nabble.com] 
Enviada: quinta-feira, 12 de Setembro de 2013 12:49
Para: capzulu
Assunto: Re: HL7 v3

 

The library we use for HL7 is HAPI
(http://hl7api.sourceforge.net/index.html). Unfortunately it doesn't support
V3. I'd also love to see V3 support. I'm going to dig for appropriate
libraries and consider adding that functionality. 




  _  

If you reply to this email, your message will be added to the discussion
below:

http://camel.465427.n5.nabble.com/HL7-v3-tp5732915p5739256.html 

To unsubscribe from HL7 v3, click here
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscrib
e_by_codenode=5732915code=bWlndWVsY2FzdGlsaG9Ac2Fwby5wdHw1NzMyOTE1fC0xNzA0
NDkxMjAz .
 
http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_view
erid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNa
mespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.No
deNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_ema
ils%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml NAML 





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