Schema mode is used during design time to create formats for storing data structure definitions in a repository. Users must supply an acquireSchema() function in their plug-in library to define all schemas for the integration servers to use to parse and reformat messages. Each schema is equal to one NDO.
WARNING! Follow the rules that govern the creation of XML names. See Chapter 8: “Understanding NDO Node Names” of the e-ADK Programmer’s Reference for information about naming NDO nodes and colon restrictions.
Unlike Acquire, Deliver, and Process, the Schema mode works only with trees, not buffers. Schema builds a tree and stores the specified schema structure in a repository or an XML or DTD file depending on the values set for the Adapter.SchemaLoader.Factory and Adapter.SchemaLoader.Library keys. The acquireSchema() function is called after initialization takes place inside the adapter plug-in. The return value from this function defines whether the loop for acquireSchema() should continue or stop. The function is called in a loop until FALSE is returned so that multiple schemas can be defined in one run of the executable.
Consider supplying a Schema function only if you are using NDO data representation during run time.
Schema mode builds a schema tree and stores it in a repository. Data is retrieved in one of two ways. To get the schema:
Retrieve the schema from a plug-in. In this case, the user writes the code that gets the schema.
Write an acquireSchema function in the plug-in library.
This function receives an empty NDO and a schema name from the e–ADK. The function should populate the NDO with the adapter’s schema based on the schema name.