Using Java in a message map
In the Graphical Data Mapping editor, you can use methods in a Java™ class to define a transformation, to define a conditional expression, or to change the value of an input parameter in another function.
About this task
The following guidelines apply when you use a Java class in a map:
- You can use static methods that return the appropriate type for the value of the output elements that they set.
- The values of the map input elements that are used as parameters of a static method must have the appropriate type.
- Do not define Java methods
with data type overloading and then use the methods in a map.
The map fails at run time with the following error:
IXJXE1039E: [ERR 0786] Multiple methods with the correct arity were found in the class '<class>' when attempting to evaluate a call to the Java extension function '{http://<class>;}<method>' with arity of <N>
. - In a Custom Java transform, you can call Java methods that include MbElement data type arguments.
- When you define conditional expressions, you cannot use Java methods that include MbElement data type arguments.
- When you define conditional expressions, you can use Java methods that use the DOM API. For more information on the supported types, see Custom Java.
Procedure
When you add a Java class to a map, you can use Java methods in any of the following situations:
What to do next
Deploy and test the message map. For more information, see Troubleshooting a message map.