-
15. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc May 18, 2009 4:49 AM (in response to njiang)Hi Willem,
yes, I installed the camel-jaxb feature.
This route run in a pure camel project.
Thank you for looking into my problem.
Cheers,
Christian
-
16. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
davsclaus May 18, 2009 4:52 AM (in response to muellerc)Christian,
If you use the unmarshal instead of the convertBodyTo then I would assume it should work in OSGi as well.
-
17. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
njiang May 18, 2009 8:52 PM (in response to muellerc)Hi Christian,
I did a quick fix for the error to Apache Camel repository, but it will take some time to sync the apache change to fuse.
I will keep you posted when the fix snapshot comes out.
Willem
-
18. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 22, 2009 5:36 PM (in response to njiang)Hi Willem,
is the snapshot with this fix out?
Cheers,
Christian
-
19. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
njiang Jun 22, 2009 10:27 PM (in response to muellerc)Hi Christian
You can try the snapshot here[1].
http://repo.open.iona.com/maven2-snapshot/org/apache/servicemix/apache-servicemix/4.1.0-fuse-SNAPSHOT/
Cheers,
Willem
-
20. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 23, 2009 12:00 PM (in response to njiang)Hi Willem,
it's not critical for me, but I still received the warning
17:48:06,910 | WARN | Component@b5f87c | ConvertBodyProcessor | l.processor.ConvertBodyProcessor 46 | Could not convert body of IN message: FileMessage: D:\tmp\inbox\sample_event.xml to type: de.ps4b.rfid.model.matrics.Matrics
and in my processor, the body type is 'java.io.File' and not 'de.ps4b.rfid.model.matrics.Matrics', I exoected...
17:48:06,910 | INFO | Component@b5f87c | FileEventReader | ps4b.rfid.file.FileEventReader$1 24 | received body of type: class java.io.File
Cheers,
Christian
-
21. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
njiang Jun 23, 2009 8:52 PM (in response to muellerc)Hi Christian
It looks the Camel doesn't find a way to turn a File object into an InputStream object.
Can you try to add below line to convert the message body into InputStream?
.convertBodyTo(InputStream.class)
Willem
-
22. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 24, 2009 5:23 AM (in response to njiang)Hi Willem,
if I changed 'convertBodyTo(Matrics.class)' to 'convertBodyTo(InputStream.class)', I received the following log entry:
11:19:21,003 | INFO | Component@689490 | FileEventReader | ps4b.rfid.file.FileEventReader$1 24 | received body of type: class org.apache.camel.converter.stream.InputStreamCache
Cheers,
Christian
-
23. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
njiang Jun 24, 2009 9:10 PM (in response to muellerc)Hi,
Your route rule could be like this
from("file:/Applications/apache-servicemix-4.1.0.0-fuse/incomingEvents/")
.convertBodyTo(InputStream.class)
.convertBodyTo(Matrics.class)
Just make sure the JAXB converter get the right message body type.
Willem
-
24. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 25, 2009 11:41 AM (in response to njiang)Hi Willem,
if the route rule looks like this
from("file:/Applications/apache-servicemix-4.1.0.0-fuse/incomingEvents/")
.convertBodyTo(InputStream.class)
.convertBodyTo(Matrics.class)
I receive the following log entries:
17:35:15,166 | WARN | omponent@1ddfb6a | ConvertBodyProcessor | l.processor.ConvertBodyProcessor 46 | Could not convert body of IN message: FileMessage: D:\tmp\inbox\sample_event.xml to type: de.ps4b.rfid.model.matrics.Matrics
17:35:15,166 | INFO | omponent@1ddfb6a | FileEventReader | ps4b.rfid.file.FileEventReader$1 26 | received body of type: class java.io.File
The JAXB converter could not be called...
Cheers,
Christian
-
25. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
davsclaus Jun 26, 2009 12:50 AM (in response to muellerc)Hi
Could you try upgrading to latest SNAPSHOT release of FUSR MR? We did a fix recently on discovery of type converters in 3rd party bundles when running in OSGi.
The maven repo is here:
-
26. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 26, 2009 3:39 AM (in response to davsclaus)Hello Claus,
What did you mean exactly, with "upgrading to latest SNAPSHOT release of FUSR MR"?
Install the latest SNAPSHOT version of FUSE ESB or update some OSGI/JBI Bundles?
Cheers,
Christian
-
27. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
davsclaus Jun 26, 2009 5:23 AM (in response to muellerc)Upgrade all the camel-xxxx bundles from version
1.6.0.0-fuse
to
1.x-fuse-SNAPSHOT
The next release FUSE MR release 1.6.0.2 should contain this fix. The last release 1.6.0.1 does not.
-
28. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
muellerc Jun 26, 2009 6:46 AM (in response to davsclaus)Hi Claus,
I upgrade all installed camel-xxx bundles:
camel-core (1.0.0.x-fuse-SNAPSHOT)
camel-osgi (1.0.0.x-fuse-SNAPSHOT)
camel-spring (1.0.0.x-fuse-SNAPSHOT)
camel-jaxb (1.0.0.x-fuse-SNAPSHOT)
but I still receive the warning and the body is not converted:
12:40:29,707 | WARN | Component@eb5cdc | ConvertBodyProcessor | l.processor.ConvertBodyProcessor 46 | Could not convert body of IN message: FileMessage: D:\tmp\inbox\sample_event.xml to type: de.ps4b.rfid.model.matrics.Matrics
12:40:29,707 | INFO | Component@eb5cdc | FileEventReader | ps4b.rfid.file.FileEventReader$1 24 | received body of type: class java.io.File
I tried both variants
.from("...")
.convertBodyTo(InputStream.class)
.convertBodyTo(Matrics.class)
.process(
...
)
.to("..")
and
.from("...")
.convertBodyTo(Matrics.class)
.process(
...
)
.to("..")
Cheers,
Christian
-
29. Re: How to use camel-jaxb in fuse esb (4.1.0.0)
davsclaus Jun 26, 2009 7:30 AM (in response to muellerc)JAXB can also be used as a data format. Try that instead of the dual convert body to.