Skip to main content

Available Tools

This chapter provides an overview of the Ensemble tools that you can use to work with XML schemas and documents. It contains the following sections:

Using the XML Schema Structures Page

The XML Schemas page enables you to import and view XML schema specifications.

To display this page, click Ensemble > Interoperate > XML > XML Schema Structures.

For general information on using this page, see “Using the Schema Structures Page” in Ensemble Virtual Documents.

Before importing a schema file, rename it so that its name is informative and unique within this Ensemble namespace. The filename is used as the schema category name in the Management Portal and elsewhere. If the filename ends with the file extension .xsd, the file extension is omitted from the schema category name. Otherwise the file extension is included in the name.

Note:

You can use these schemas only to support processing of XML virtual documents as described in this book. Ensemble does not use them for any other purpose.

Important:

After importing a schema file, do not remove the file from its current location in the file system. The XML parser uses the schema file rather than the schema stored in the Ensemble database.

Using the XML Document Viewer Page

The XML Document page enables you to display XML documents, parsing them in different ways, so that you can determine which DocType to use. You can also test transformations. The documents can be external files or documents from the Ensemble message archives.

To display this page, click Ensemble > Interoperate > XML > XML Document Viewer.

For general information on using this page, see “Using the Document Viewer Page” in Ensemble Virtual Documents.

Importing XML Schemas Programmatically

You can also load schemas programmatically by using the EnsLib.EDI.XML.SchemaXSDOpens in a new tab class directly. This class provides the Import() class method. The first argument to this method is the name of the file to import, including its full directory path. For example:

set status= ##class(EnsLib.EDI.XML.SchemaXSD).Import("c:\ENSEMBLE\myapp.xsd")

The EnsLib.EDI.XML.SchemaXSDOpens in a new tab class also provides the ImportFiles() method. For this method, you can specify the first argument in either of the following ways:

  • As the name of a directory to import files from. Ensemble attempts to import all files in this directory, regardless of the file extensions. For example:

    set status=##class(EnsLib.EDI.XML.SchemaXSD).ImportFiles("c:\ENSEMBLE\")
    
  • As a list of filenames, separated by semicolons. You must include the full directory path for the first of these, and you can use wildcards in the filenames. For example:

    set status=##class(EnsLib.EDI.XML.SchemaXSD).ImportFiles("c:\ENSEMBLE\*.xsd;*.XSD")
    

For more information, see the class reference for EnsLib.EDI.XML.SchemaXSDOpens in a new tab.

Important:

After importing a schema file, do not remove the file from its current location in the file system. The XML parser uses the schema file rather than the schema stored in the Ensemble database.

XML Classes

For reference, this section lists the classes that Ensemble provides to enable you to work with XML documents.

Item Classes Notes
XML business services Each of these business service classes uses a different adapter, as indicated by the class name.
XML routing process EnsLib.MsgRouter.VDocRoutingEngineOpens in a new tab This class is the standard virtual document routing process.
XML business operations Each of these business operation classes uses a different adapter, as indicated by the class name.
Messages EnsLib.EDI.XML.DocumentOpens in a new tab (automatically used by the business host classes) This is a specialized message class to carry XML documents as Ensemble virtual documents.
Search table EnsLib.EDI.XML.SearchTableOpens in a new tab This is a specialized search table class for XML documents.

You can also create and use subclasses of these classes.

The business host classes include configurable targets. The following diagram shows some of them:

generated description: production config

For information on other configurable targets, see “Reference for Settings.”

FeedbackOpens in a new tab