Working with Data Types

The data types supported for your business process applications include:

XML Types

XML Schemas are an XML vocabulary that describe the rules that your business data must follow. XML Schemas specify the structure of documents, and the data type of each element and attribute contained in the document. XML Schema files have an XSD file suffix. You can create new schemas or import schemas into your schemas folder, see Importing Files into the Schemas Project.

Note: To make the Schemas in your project available in your business process, you must place them in the Schemas folder. The Schemas folder is a child folder of your business process application folder in WebLogic Workshop. To learn about the Application and project folders in the Design View, see Components of Your Application and How Do I: Create a New Application.

When you add XML Schemas to the Schemas folder in your business process project, they are compiled to generate XML Beans. In this way, WebLogic Workshop generates a set of interfaces that represent aspects of your Schema. XML Bean types correspond to types in the XML Schema itself. XML Beans provides Java counterparts for all built-in Schema types, and generates Java counterparts for any derived types in your Schema.

When you load an XML file that conforms to a particular XML Schema into an XML Bean generated from the Schema, you can access the XML as instances of the XML Bean types. To learn more about XML Beans, see Getting Started with XML Beans.

The XML typed data also includes:

XMLObject—This XML data type specifies untyped XML format data. In other words, this data type represents XML data that is not valid against an XML Schema.

XMLObjectList—This XML data type specifies a sequence of untyped XML format data. In other words, this data type represents a set of repeating elements of XML elements that are not valid against an XML Schema.

Tip for XML Object

When you assign an XMLObject variable or typed XML variable to an XMLObjectList, the XML document is added to the list (instead of directly assigning the variable).

Tip for Creating XML Schemas

When you create XML Schema definitions, which contain declarations for attributes, we recommend that you make these declarations inside, or local to, the element declarations. If you declare attributes at the top level of the XML Schema document (that is, immediately under the xsd:schema root), they must be qualified by a target namespace, if one exists. Consequently, for an XML instance document to be valid against such a Schema, the attributes within the XML document must be qualified with a namespace prefix associated with the target namespace. If you do not specify this prefix in an XML instance document, transformations or validations against the Schema fails.

Non-XML Types

WebLogic Integration uses a metadata language called Message Format Language (MFL), based on XML, to describe the structure of (typed) non-XML data. The Format Builder tool creates and maintains metadata as a data file, called an MFL document.

Note: When you create MFL files for use in your business process project, to make them available in your application, you must add the files to your Schema folder. The Schema folder is a child folder of your business process application folder in WebLogic Workshop. To learn about the Application and project folders in the Design View, see Components of Your Application.

Every MFL file available in your project is listed in Non-XML Types in the Create Variable dialog box. However, an XML Schema representation of each MFL file is built by WebLogic Workshop. This XML Schema representation of your MFL data is available in the XML Types listing. In other words, you can work with every MFL file in your project in its non-XML data representation (in non-XML MFL format) and in its XML Schema representation (XML typed data). For example if you add an MFL file named mydata.mfl to your business process project, mydata.mfl is listed in Non XML Types, and the corresponding XML Schema representation, mydata.mfl.xsd, is listed in XML Types. Although you are provided with a typed XML version of your typed non-XML format, both types are not automatically populated. That is, if you receive data in a typed non-XML format and then assign it to a typed non-XML variable and you create a variable for the corresponding typed XML version, it will not automatically contain the data that is in the typed non-XML variable. You must use a transformation map to accomplish this. For more information about MFL files and Non-XML data, see Transforming Non-XML Data.

Note: Non-XML variables are equivalent to Binary variables in prior versions of WebLogic Integration.

The non-XML type data also includes the RawData type that specifies non-XML data for which no MFL file exists and therefore no known schema.

Note: Although both XMLObject and RawData are both untyped data types in WebLogic Integration, the XMLObject data type is still XML and therefore has a structure that can be parsed. RawData is just a stream of data that has no known structure. Therefore, you cannot do things like use a RawData parameter in a XQuery expression or in a transformation method.

Java Types

Contains the following Java data types:

Java Primitive Data Types—boolean, byte, double, float, int, long, short, and String.

Java Classes—Variables can be created from the Java classes in the current project. However, the Java classes available in the project are not listed in the Select Variable pane in the node builders. You must explicitly specify the Java class in the Variable type field as described in the following sections: To Create a New Variable in the Data Palette and To Create a New Variable in the Node Builder. To learn more about including Java classes in your project, see Using Existing Applications.

Java class variables can be used in business processes without any conversion. When you use Java classes in data transformations, WebLogic Integration converts the Java class into an internal XML Schema representation of the Java class file. The fields of Java class that cannot be converted to an XML Schema type are ignored. To learn more about the conversion of Java classes into this internal XML Schema representation, see Java Class Conversion. To learn about the Java classes that are created when you import schemas into your application, see Java Classes Created From Importing Schemas.

Tip for Java Collection

When you assign a variable to a collection, it is added to the collection (instead of directly assigning the variable).

Related Topics

Validating Schemas

Variables in Business Process Source Code

Assigning MFL Data to XML Variables and XML Data to MFL Variables

Previous Document Next Document