Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.16.2. Create a Custom Context Mapper
Procedure 16.1. Create a Custom Context Mapper
- Implement the
org.switchyard.component.common.composer.ContextMapperinterface:public interface ContextMapper<T> { void mapFrom(T source, Context context) throws Exception; void mapTo(Context context, T target) throws Exception; }public interface ContextMapper<T> { void mapFrom(T source, Context context) throws Exception; void mapTo(Context context, T target) throws Exception; }Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify your implementation in your
switchyard.xmlfile:<binding.xyz ...> <contextMapper class="com.example.MyContextMapper"/> </binding.xyz><binding.xyz ...> <contextMapper class="com.example.MyContextMapper"/> </binding.xyz>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Alternatively, you can implement the
org.switchyard.component.common.composer.RegexContextMapperinterface, which adds regular expression support:Copy to Clipboard Copied! Toggle word wrap Toggle overflow