Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, August 6, 2008

XSD Editor Developing Message Interfaces

Use

The XSD editor enables you to define data types and data type enhancements without needing extensive knowledge of XML schema. You construct a data type in the XSD editor by using a table that returns the structure of the data type. As in XML schema, you can define both simple and complex data types that are automatically converted to XML Schema Definition (XSD) by the editor. The XML Schema Definition determines which tags can be transferred with which values in the payload.

When defining a data type, the selection of values that you can enter in the table is context-dependent. Therefore, you cannot enter invalid entries.

Prerequisites

You have already created a data type. To access the XSD editor, select the Definition tab page (see: Data Types).

Features

The XSD editor comprises a toolbar, a tabular input area, and a context menu. The uppermost line in the table (the root element) determines the type of the data type:

· Simple data type: There are no other table lines.

· Complex data type: The subnodes of the root element determine the structure of complex data types. Elements and attributes can also be sub-nodes.

The XSD editor can automatically recognize the difference between simple and complex types by determining whether the root element has any subnodes. For this reason, the Category column is locked. The tabular input area contains the following columns for which differing values (or no values at all) are permitted, depending on the line type:

Columns in the XSD Editor

Column

Meaning

Structure

Nodes inserted below the root element are represented in a hierarchy using indents in this column. The field names within a data type must not be the same. It is possible to change all field names at a later stage, except that for the root element.

Category

This column shows whether the root element has subnodes or not (see above). You cannot change values in this column.

Type

Here you select a built-in data type or reference to an existing data type for an element or attribute. You must specify a type for attributes.

Occurrence

Determines how often an element occurs in the message. The values 0 to 2147483647 are permitted. For attributes, you can determine whether the attribute is optional or mandatory.

Details

You can only make an entry here if you specified a built-in type for the element or the attribute. Depending on whether the type is numerical or alphanumerical, you can select facets from the selection dialog for the column to specify the value range of the type more precisely (for example, restricting the string length).

Default

You can specify any default value here. For information on how to instruct the proxy runtime to take default values into account, see: Activating Extended XML Handling (ABAP proxy runtime) or Default and Initial Values in Java (Java proxy runtime). Default values are not relevant for mapping programs (in particular in message mappings, where they are ignored).

Description

Informal description of a node.

To call a selection dialog for cells in the Type, Occurrence, and Details columns, double click the cells. You can also call the selection list in the Type column by clicking the cell and then expanding the list box. To change a field name below the root element, select it by clicking it.The name of the root element itself cannot be changed, however.

Functions of the XSD Editor

Function

Access from Toolbar (TB) and/or Context Menu (CM)

Use

This graphic is explained in the accompanying text

TB/CM

Calls the input help to reference other data types in the Type column.

This graphic is explained in the accompanying text

TB/CM

Opens a data type on a new tab page that is referenced in the Type column.

This graphic is explained in the accompanying text

TB/CM

Inserts a new element on the same hierarchy level as the line currently selected.

This graphic is explained in the accompanying text

TB/CM

Inserts multiple elements on the same hierarchy level as the line currently selected.

This graphic is explained in the accompanying text

TB/CM

Deletes a line. Subnodes are also deleted if any exist.

This graphic is explained in the accompanying text

TB/CM

Expands the hierarchy structure of the line currently selected. Unlike the functions below, nodes that reference another data type are not expanded.

This graphic is explained in the accompanying text

TB/CM

Expands all levels of the hierarchy structure for a selected line.

This graphic is explained in the accompanying text

TB/CM

Collapses all levels of the hierarchy structure for a selected line.

This graphic is explained in the accompanying text

TB/CM

Maximizes the column width.

This graphic is explained in the accompanying text

CM

Calls the value list for the Type, Occurrence, and Details columns.

Insert Subelement

CM

Inserts a subelement beneath the element for which you called the context menu.

Insert Attribute

CM

Inserts an attribute for the element for which you called the context menu.

This graphic is explained in the accompanying text

CM

Copies the selected node, including all its subnodes, to the clipboard.

This graphic is explained in the accompanying text

CM

Cuts the selected node, including all its subnodes, to the clipboard.

This graphic is explained in the accompanying text

CM

Inserts the node from the clipboard onto the same level as the node for which you called the context menu.





The contents of the clipboard can only be reinserted within a data type.

Activities

Use the XSD editor to do the following:

· Create a simple data type

· Create a complex data type

· Import an XSD definition

You can display the corresponding XML schema on the XSD Definition tab page and export it as a file (see also: Exporting XSD and WSDL Documents).

The XSD Definition tab page displays the conversion of the data type to XSD using the definition in the editor. If the definition in the XSD editor is not valid, then the conversion is also not yet valid.

No comments:

Archives