Ensemble XML Virtual Document Development Guide
Available Tools
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

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 [Ensemble] > [XML Schemas] page enables you to import and view XML schema specifications.
To display this page, click Ensemble, click Interoperate, click XML. Then click XML Schema Structures and click Go.
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 [Ensemble] > [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, click Interoperate, click XML. Then click XML Document Viewer and click Go.
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.SchemaXSD 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.SchemaXSD class also provides the ImportFiles() method. For this method, you can specify the first argument in either of the following ways:
For more information, see the class reference for EnsLib.EDI.XML.SchemaXSD.
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.VDocRoutingEngine 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.Document (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.SearchTable 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:
For information on other configurable targets, see Reference for Settings.”