Datatype Support

Unwired WorkSpace supports a variety of datatypes, from a simple type to an array of objects.

Mobile business object (MBO) attributes and argument/parameter datatypes map to data source datatypes. Select the datatype of a given argument/parameter or attribute from the datatype drop-down list, which maps to the data source's datatype. You define attribute and parameter datatypes in a number of Unwired WorkSpace locations, depending on the MBO development phase, including::
  • Creating MBOs – when creating MBO operations and attributes in these locations:
    • Attributes Mapping wizard
    • Operation Parameters page (when deferring binding to a data source)
    • Attributes page (when deferring binding to a data source)
  • Editing MBOs – when editing MBO attributes and parameters from the Properties view in these locations:
    • Parameters tab
    • Load Arguments tab
    • Attributes tab
    • Synchronization tab (for synchronization parameters)
    • Object Queries tab and Object Query creation wizard
  • Testing MBOs – use the Test Execute and Preview dialogs for testing mobile business object operations or previewing attributes.
  • Creating and editing personalization keys – holds the personalization parameters and supports the same datatypes as MBO attributes and parameters.

Since attributes and parameters depend on the data source to which the MBO maps, not all attributes and parameters support all datatypes. Generally, if a datatype does not display in the drop-down list, it is not supported for that MBO.

When defining the default value for a parameter with the maxlength setting, the maximum length also applies to any localized (i18n) values (Including some double-byte character languages, such as Chinese).

Unwired WorkSpace supports various categories of datatypes.
Datatype categories
Category Description
Simple int, string, date, bigString/bigBinary, and so on.
List of simple types An array of simple types: int[], string[], date[], and so on.
Structure (complex) Implemented with a structure, and includes:
  • SAP input structure or input table
  • Nested complex types in Web Services that handle type structures as input (repeating and nested elements)
Note: Parameters, personalization keys, and default values all support complex types. Attributes do not, except for those that represent relationships.
List of structure types An array of objects: customer[], account[], and so on.
Simple datatype description
Datatype Description
binary (%n) Select either:
  • Input manually – enter a base64 encoded string directly in the input field.
  • Import from file – browse to a file from which the input string is retrieved.
To set the length, click the cell you require in the datatype column and select binary(%n). Press enter and then type the size you require. For example, you could:
  1. Click the particular cell in the datatype column, and select binary(%n) from the list of datatypes.
  2. Enter the value for the binary length by highlighting %n with your cursor, and replacing it with the size you require.
  3. Press enter to set the binary length. For example, if you entered 10 as the binary length, you see binary(10) in the datatype cell.
Note: The maximum allowable length for binary datatypes is 2G bytes. If the MBO's attribute is a primary key, the maximum allowable length for binary datatypes is 2048 bytes. For MBO parameters, binary default value cannot exceed 16384 bytes.
date Select the day in the provided calendar. By default the local time zone is selected. The Time zone field is read only.
dateTime By default the current date, time and time zone display in the calendar.
time Enter the time, and enter the local time zone in the Time zone field.
string(%n) To set the string length, click the cell you require in the datatype column and select string(%n). Press enter and then type the size you require. For example, you could:
  1. Click the particular cell in the datatype column, and select string(%n) from the list of datatypes.
  2. Enter the value for the string length by highlighting %n with your cursor, and replacing it with the size you require.
  3. Press enter to set the string length. For example, if you entered 10 as the string length, you see string(10) in the datatype cell.
Note: The maximum allowable length for string datatypes is 2G bytes. If the MBO's attribute is a primary key, the maximum allowable length is 512 bytes.
BigString/BigBinary Allows you to transfer large binary or string data from/to Unwired Server by using the ObjectAPI streaming methods to optimize memory consumption. For example, you can set an MBO's attribute/arguments as BigString/BigBinary and get/set the data by a streaming method such as seek/write/read/flash in the client code.

To use either BigString or BigBinary types and the associated streaming objectAPI, an MBO operation argument must be mapped to a Fill from attribute that uses the large object type. An error is generated if an MBO operation argument has a BigString or BigBinary type but does not have the associated Fill from attribute with the same large object type. Not all attribute/arguments support BigString/BigBinary:

  1. Only attribute mapping attributes/operation argument/structure object attributes can be set as BigString/BigBinary, which have no length limitation. Use a streaming I/O mechanism to optimize memory consumption at runtime.
  2. Personalization key/sync parameter/load argument/object query parameter/client parameter are not allowed to set BigString/BigBinary datatype.
  3. In the attribute mapping section of properties view, primary key attributes are not allowed to have BigString/BigBinary data type. If you set a primary key attribute as BigString/BigBinary, Unwired WorkSpace displays a validation error. The BigString/BigBinary options are still available since you can unselect the primary key checkbox.
  4. To indicate an operation argument needs to use BigString/BigBinary, change the mapped attribute’s datatype.
Note: Ensure that your Unwired Server host is a 64-bit machine with a heap size larger than 512 MB to avoid "java.lang.OutOfMemoryError: Java heap space" errors when processing BigString or BigBinary datatypes.
All others Enter the appropriate value in the Value field.
Related concepts
Entity Read Operations
Output Mapping
Related tasks
Creating Attributes for a Mobile Business Object
Creating Operations for a Mobile Business Object
Creating the Mobile Business Object using the Mobile Business Object Palette item
Previewing Mobile Business Objects
Modifying Load Arguments