-
1. Re: Transformation help
kcbabo Apr 12, 2013 10:46 AM (in response to plambrecht)Just to confirm - same application, two beans: bean A invokes bean B. You want the consumer contract for bean A to be different than the provider contract for bean B, thus invoking declarative transformation. Is that right?
-
-
3. Re: Transformation help
kcbabo Apr 12, 2013 11:10 AM (in response to plambrecht)Yep. See attached for an example I just whipped up with our awesome tooling. If you run mvn test or execute the unit test from within the IDE, you should see something like this in the output:
11:07:26,161 WARN [internal.ExchangeImpl] Fault generated during exchange without a handler: org.switchyard.HandlerException: Transformations not applied. Required payload type of 'java:com.example.switchyard.pojo2pojo.B'. Actual payload type is 'java:com.example.switchyard.pojo2pojo.A'. You must define and register a Transformer to transform between these types.
Add the transformer and it will go away.
-
pojo2pojo.zip 8.8 KB
-
-
4. Re: Transformation help
plambrecht Apr 12, 2013 2:11 PM (in response to kcbabo)Thanks Keith!
I will play around with that. I never thought of having a 3rd contract.
EDIT: This works as I wanted it to.