Generating an XML Schema Definition (XSD) File

You can generate an XSD file from any Messenger or Serializable class definition.

To generate an XSD file, perform the following:

  1. Select a Messenger class or a Serializable class.

  2. From the File menu, select Export As Xsd....

    The Xsd Export Wizard appears.

  3. In the FileName box, enter the location of the XSD file name or browse to and select the location where you want to export the class definition.

  4. Click Finish.

    An XSD representing the selected class is written to that file.

This process also creates an automatic mapping between the AB Suite primitive types and the corresponding standard XML types in an XSD.

For example, any attribute with the Primitive property set to String is mapped to xsd:string or any attribute with the Primitive property set to Number is mapped to an appropriate type depending on the length and decimals (for example, xsd:unsignedLong or xsd:decimal).

You can override this automatic mapping and specify a particular XML type. For example, you might use a String in AB Suite to hold an element that is of a type not fully supported by a corresponding AB Suite primitive type, such as xsd:dateTime. Hence, even if the attribute in AB Suite that holds this data is a String, you might want the exported XSD definition to represent it with the correct XML type (that is, xsd:dateTime).

To override the automatic mapping, perform the following:

To set the XsdType property, perform the following:

  1. In the Properties window of the attribute, click the Element Picker ... corresponding to the XsdType property.

    The XML Type Definition window appears.

  2. Select an appropriate XML type and click OK. Alternately, you can double-click the XML type.

This property does not influence any of the internal processing of the element when processing the XML messages. It is only used in the Export As Xsd operation.