Bug 971744 - camel-file-binding not using provided transformer when java interface is used for composite
Summary: camel-file-binding not using provided transformer when java interface is used...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Camel
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Keith Babo
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-07 08:21 UTC by Jiri Sedlacek
Modified: 2015-08-02 23:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-22 16:49:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jiri Sedlacek 2013-06-07 08:21:56 UTC
Description of problem:

I've got switchyard project: composite with one bean service, bean service java interface is promoted to composite service, file binding is configured. Service method takes my object as a parameter, I created and configured transformer from java.io.File to my object.

In GenericFileConverter.convertTo(Class<?>, Exchange, Object, TypeConverterRegistry), line 64, type converter should be found, but is not. 

Question: Camel type converters differ from switchyard transformers? Are there two registries for transformers, one for camel and one for switchyard?

Comment 1 Keith Babo 2013-06-19 13:25:14 UTC
Yes, there are two registries :

1) The camel converter registry is based on Java types and converts from one Java type to another.

2) The SY transformer registry which is based on type names, which are just string literals really.

Camel converters can be added to the SY transformer registry (we do this for a set of Camel converters already), but SY transformers do not necessarily map to Camel converters because type names do not have to be Java class names.

You can include your own Camel converter to handle this transformation or use a Java interface which is compatible with the type used by the File gateway and use a transformer to convert from that type to your domain object.


Note You need to log in before you can comment on or make changes to this bug.