Changing schemas

Over time, it is likely that a schema in use for message construction will change. To update the schema in the HCL OneTest API project, use the Synchronization view in Architecture School.

About this task

The following example shows how an updated schema can be applied to an XML message. The process is the same for other schema-based message types.

Procedure

  1. In the message editor, right-click the base message node and select the wanted structure to apply from the Root option.
  2. You are prompted about how to apply the new root to the message.

    If you retain the content, fields are added to the message and existing fields are retained with previous data left intact. If you overwrite the content, the schema is applied and all of the data fields are initialized as empty. To cancel the change, click Cancel.

    In the screen capture shown, the element Area is a new one so appears with no content. The element extension is not present in the latest schema. It is retained with its data, but it is marked with a red "X" to show that it violates the schema. Copy the data from this field. Then, remove the field.