Bug 971744 - camel-file-binding not using provided transformer when java interface is used for composite
camel-file-binding not using provided transformer when java interface is used...
Status: CLOSED NOTABUG
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Camel (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Keith Babo
Jiri Sedlacek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 04:21 EDT by Jiri Sedlacek
Modified: 2015-08-02 19:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-22 12:49:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Sedlacek 2013-06-07 04:21:56 EDT
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 09:25:14 EDT
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.