What data types should I use for SOAP?

HPE Service Manager has a more lenient data typing policy than the XML schema data typing policy used for Web Services. Certain field types in Service Manager can correspond to multiple data types in the XML schema data type policy. For example, the Service Manager data type decimal could be a decimal, a floating number, or an integer in the XML schema data type policy.

In addition, the actual formatting of data varies between Service Manager and XML schema data types. This is especially true of Service Manager date/time fields that use a different order than XML schema dates. Because some Web Services may require changes to field data format, you can now define the XML Schema data type you want Service Manager to convert the field's data to when you publish the field as part of a web service.

For outbound data, the Service Manager server automatically converts Service Manager data to the format you select in the data policy record for the Service Manager field. For inbound data, the Service Manager server automatically converts the XML schema data to the Service Manager field's listed data type format.

The services, objects, and fields published in the Service Manager Web Services API already have the proper XML schema data mappings listed in the Web Services definition (extaccess record). If the extaccess record does not list a data type mapping, then the Web Services API treats the field data as a string.

The following table lists the available SOAP API data types and their Service Manager equivalents.

SOAP API Data Type Service Manager Data Type
Base64Type used for binary data
BooleanType Boolean
ByteType Decimal
DateTimeType Date/Time
DateType Date/Time
TimeType Date/Time
DurationType Date/Time
DecimalType Decimal
DoubleType Decimal
IntType Decimal
LongType Decimal
ShortType Decimal
FloatType Decimal
StringType Text

Caution Always map Service Manager date/time fields to the XML schema dateTime or to one of the related XML schema date or time types. Otherwise these fields will cause errors when you consume the service.

Caution When integrating with Service Manager, array data should be broken into multi elements by separator "\r." This is because Service Manager uses "\r" as the separator between array elements. When a string that contains "\r" is retrieved from the Service Manager system, it is decoded as an array with multiple elements separated by "\r". For this reason, when integrating other applications (for example, UCMDB) with Service Manager through web services, array data should be broken into multi elements by separator "\r" before the data is encoded and sent to the Service Manager system. For example, if an array contains elements "aabb" and "ccdd", it should be sent to Service Manager as the following:

<ns:Comments type=\"Array\">
<ns:Comments mandatory=\"\" readonly=\"\">aabb</ns:Comments>
<ns:Comments mandatory=\"\" readonly=\"\">ccdd</ns:Comments>
</ns:Comments>

You can define the data type you want Service Manager to convert field data to when publishing it as a Web Service. These data types are consistent with XML schema data types.

  1. Click Tailoring > Database Manager.
  2. In the Table field, type extaccess and click Search. The External Access Definition record opens.
  3. In the Name field, select the name of the Service Manager table whose exposed field you want to define datatypes for.
  4. Click Search. The External Access Definition record for the table opens.
  5. On the Fields tab, find the field that you want to define the data type for.
  6. In the Type column for that field, either type the data type or select a data type from the predefined list in the drop-down list.

    Note The data type you select for this field becomes an XML schema data type in the web services WSDL.

    Caution You must also specify a Field name in API value when you set a data type value. Data type validation depends upon the existence of an alias name.

  7. Click Save.