Java Class Conversion

Java classes can be used as source and target types for transformations. Also, business process variables can be created from Java classes.

However, not all the fields that can make up a Java class are supported. This section describes which fields of a Java class are supported.

When you use a Java class or primitive in a transformation, WebLogic Integration converts it into an internal representation of XML Schema data types. Java fields that are not supported are ignored. WebLogic Integration then uses this internal representation to transform your Java classes to and from XML and non-XML (MFL) documents

Note: This internal representation of the XML Schema is not exposed in WebLogic Workshop.

Note: The mapper functionality of WebLogic Workshop will only display the fields of a Java class that are supported.

For a Java class to be used in WebLogic Integration, it must first be available in the WebLogic Workshop project. To learn more about including Java class in your project, see Using Existing Applications.

Note: Java interfaces and abstract Java classes are supported as source or target types for a transformation but you will not be able to execute your transfomation in the Test View. However, a transformation with a Java interfaces and/or abstract Java classes as source or target types can be invoked from a business process (JPD) without error.

Java classes are converted using the following procedure:

  1. If the Java class is selected as an input type for a DTF, by default the name of the class becomes the name of the variable. (For example, if the class Book is selected as an input type, by default, the BookDoc variable is created by the mapper.) If the Java class is selected as the output type of a DTF, the name of the class becomes the name of the XML document's root element.
  2. All the Java fields that can be mapped are converted to the appropriate XML Schema elements in the new XML Schema. If a field cannot be mapped it is ignored. To learn more, see the following table.

  3. For each field of the Java class, this conversion procedure is applied recursively to determine the type of each subelement. Fields that are themselves Java classes will be subelements in the internal XML Schema. These subelements will have the same name in the XML schema as their name in the Java class. For an example, see Using Java Classes in Transformations.
  4. Java fields of the class are converted according to the following rules:

Related Topics

To learn more about creating Java class variables in business processes, see Creating Variables.

To lean more about using Java classes as input or output parameters in transformations, see Using Java Classes in Transformations.

Previous Document Next Document