Unica Plan Integration Webservice data types

The data types that are used by the webservice are independent of any particular service binding or programming implementation.

The following notation is used.

  • <type>: <type definition> defines a simple data type. For example:

    Handle: string

  • <type>: [ <type definition> ] defines a complex data type or a data structure.
  • <type>: { <type definition> } defines a complex data type or a data structure.

Complex type elements and API parameters can use these types to declare arrays. For example:

Handle [] handles

The type, handles, is an array of Handle types.

Primitive types

Primitive types are restricted to the types defined in the table that follows to simplify support for SOAP 1.1 bindings. All types can be declared as arrays, for example, String [ ]. Inherently, binary data types, such as long, can be represented as strings by a protocol binding (for example, SOAP). This representation, however, has no effect on the semantics of the type, permissible values, and so on, as seen by the client.

Table 1. Primitive types
API Type Description SOAP Type Java Type
Boolean Boolean value: true or false xsd:Boolean Boolean
dateTime A date time value xsd:datetime Date
decimal An arbitrary-precision, decimal value xsd:decimal java.math.BigDecimal
double A double-precision, signed, decimal value xsd:double double
int A signed, 32-bit, integer value xsd:int int
integer An arbitrary-precision, signed, integer value xsd:integer java.math.BigInteger
long A signed, 64-bit, integer value xsd:long long
string A string of Unicode characters xsd:string java.lang.String

MessageTypeEnum

MessageTypeEnum: { INFORMATION, WARNING, ERROR }

MessageTypeEnum is an enumerated type that defines all possible message types.

  • INFORMATION: an informational message
  • WARNING: a warning message
  • ERROR: an error message

Message

Message: [MessageTypeEnum type, string code, string localizedText, string logDetail]

Message is a data structure that defines the result of a webservice API call. It provides optional fields for a non-localized code, localized text, and log detail. Currently, all localized text uses the locale that is set for the Unica Plan server instance.

Table 2. Message parameters
Parameter Description
type A MessageTypeEnum, setting the type of the message.
code An optional code, in string format, for the message.
localizedText An optional text string to associate with the message.
logDetail An optional stack trace message.

NameValue

NameValue: [string name, int sequence]

NameValue is a base complex type that defines a name-value pair. It also defines an optional sequence that the service uses to construct value arrays as needed (the sequences are zero-based).

All NameValues with the same name, but different sequence numbers, are converted into an array of values and associated with the common name.

The array size is determined by the maximum sequence number; unspecified array elements have null values. Array sequence numbers must be unique. The value and its type are provided by the extended type.

Table 3. NameValue parameters
Parameter Description
name A string that defines the name of a NameValue type.
sequence A zero-based integer that sets the sequence number for the NameValue implied value.

Extended NameValue types are defined for each primitive type, as follows:

Table 4. Extended NameValue types
Extended type Description
BigDecimalNameValue: NameValue [ decimal value] A NameValue type whose value is an arbitrary-precision, decimal number.
BigIntegerNameValue: NameValue [ integer value] A NameValue type whose value is an arbitrarily sized integer.
BooleanNameValue: NameValue [ Boolean value] A NameValue type whose value is a Boolean.
CurrencyNameValue: NameValue [ string locale, decimal value] A NameValue type suitable for representing currency in some locale. Locale is an ISO Language Code, that is, the lowercase, two-letter codes as defined by ISO-639.

Currently, the locale must agree with the locale set in the Unica Plan server instance.

DateNameValue: NameValue [ datetime value] A NameValue type whose value is a date.
DecimalNameValue: NameValue [ double value] A NameValue type whose value is a double-precision, decimal number.
IntegerNameValue: NameValue [ long value] A NameValue type whose value is a 64-bit integer.
String NameValue: NameValue [ string value] A NameValue type whose value is a string.

And finally, an array of the extended NameValue types is defined for use when you must define a set of NameValues of with different types.


     NameValueArrays: [
BooleanNameValue[]    booleanValues,
StringNameValue[]     stringValues,
IntegerNameValue[]    integerValues,
BigIntegerNameValue[] bigIntegooleanNameValue,
DecimalNameValue[]    decimalValues,
BigDecimalNameValue[] bigDecimalValues
DateNameValue[]       dateNameValues
CurrencyNameValue[]   currencyValues
     ]