In Microsoft Dynamics NAV, communication between mobile devices and the server is handled by XML documents called request documents. To receive request documents, you must first define a request document as a document type. For more information, see How to: Set Up Mobile Document Types in Microsoft Dynamics NAV Classic. To validate input from mobile devices, you can apply schemas to the document types. The schemas validate incoming XML to ensure that it contains the expected elements and that each element value complies with the data type for that value. When both the mobile application and the document type adhere to the same schemas, data is more easily exchanged.

You can import document schemas before you define document types, or you can import the schemas while you are defining the document types.

NoteNote

Document types do not require schemas in order to function. However, adding a schema to a document type adds a layer of validation and an element of security to the document handling, because only a well-formed XML document that complies with the schema can be processed by the underlying document handler. Alternatively, you must add the XML validation to the document handler. For more information, see Defining Document Handlers in Microsoft Dynamics NAV.

When you import a document schema, you need an .xsd file that defines a schema with a valid namespace. Microsoft Dynamics NAV includes schemas for Microsoft Dynamics® Mobile - Mobile Sales and a sample schema for Microsoft Dynamics Mobile - Server Components.

In the Mobile Document Schemas window in Microsoft Dynamics NAV, you can:

You can also see which document types use a document schema. The following procedures describe how you perform these tasks in Microsoft Dynamics NAV.

To import a document schema

  1. In the navigation pane, click Administration. Click Application Setup, click Mobile, and then click Document Schemas.

  2. In the Mobile Document Schemas window, in the Code field, enter a code for the schema.

  3. Click Schema, and then click Import to import a previously defined XML schema.

To view an existing document schema

  1. In the navigation pane, click Administration. Click Application Setup, click Mobile, and then click Document Schemas.

  2. In the Mobile Document Schemas window, select the document schema that you want to view, click Schema, and then click View.

    The schema opens as an .xml file in an Internet Explorer window.

To export an existing document schema

  1. In the navigation pane, click Administration. Click Application Setup, click Mobile, and then click Document Schemas.

  2. In the Mobile Document Schemas window, select the document schema that you want to export, click Schema, and then click Export.

    You can now save the schema as an .xsd file. This enables you to share schemas with other databases or you can modify the schema, for example, to accommodate another document type, and then import it again. For information about importing document schemas, see the first procedure in this topic.

See Also