Type Support in ECMAScript

When you add an XML map that references an ECMAScript function, data is converted between native ECMAScript types and native Java types. For example, consider an XML map translating an incoming XML message to your Java types through ECMAScript you've written. In this case WebLogic Server may be converting data from its format in script to the required Java format.

This topic describes some aspects of this conversion you might want to be aware of for conversions made in a function ending "FromXML". Remember that in this case, the data moves from incoming XML to ECMAScript in a JSX file to Java code in a JWS file.

Note that the other case—from Java through a "ToXML" function to XML—is much simpler. Because the result is simply XML, there aren't any conversion issues to be aware of.

Conversions During Mapping from XML to Java

The following lists specific kinds of conversion you should be aware of when using ECMAScript for mapping. Each item in the list describes conversion for a particular type or category of types.

Note: To declare and use any Java types in ECMAScript (including the wrapped primitive types such as Integer and so on), you must import them using the import statement. For more information, see Importing Java Classes to ECMAScript with the import Statement.

Related Topics

Type Support in XML Maps