You can use a custom mediation primitive to invoke an external
service from a mediation flow and then return the results to the flow for
further processing by another mediation primitive. For example, you may want
to use an existing component or process from a different module, by invoking
an import. Or, you may want to reuse existing Java code by invoking a Java
component.
There are two parts to invoking a Java component or import from a
custom mediation primitive.
- Creating
and configuring a custom mediation primitive in the mediation flow implementation.
For more information, see "Implementing custom mediation logic" in the related
tasks
- Wiring a Java component or import to the mediation flow component, as
described in this topic.
This topic describes how to add these components to the Assembly
editor, and synchronize implementation to complete configuring the custom
mediation primitive.
- If you have created the Java™ code in the Mediation Flow editor,
follow these steps to synchronize references: Open the mediation module in
the Assembly editor, and right-click on the mediation flow component and select Synchronize
Interfaces and References > from Implementation. The
service reference that is defined for the custom mediation primitive is created
as a reference in the mediation flow component.

Note: The Merge Implementation action
that was available in earlier versions of WebSphere Integration Developer
has been replaced with the Synchronize interfaces and references action.
- Drag a Java component or import into your assembly diagram.
- Wire the newly created reference on the mediation flow component
to the Java component or import.
- If you have the Java code implemented as a .java file, complete
the steps described above to synchronize interfaces and resources, and create
and wire a Java component. Then click on the Java component in the Assembly editor, right-click,
and choose Select Implementation. In the Pick
Implementation window, select the Java class that you want to implement.