skip to main content
Corticon Server: Integration & Deployment Guide : Integrating Corticon Decision Services : Service contracts: Describing the call : Creating XML service contracts with Corticon Deployment Console
 

Try Corticon Now
Creating XML service contracts with Corticon Deployment Console
In the topic Using the Server Deployment Console , the Deployment Console is discussed as a way to create Deployment Descriptor files to easily deploy Decision Services and manage their deployment settings. The screenshot in Functions of the Deployment Console tool hides the lower portion of the Deployment Console, however, because that portion is not concerned with Deployment Descriptor file generation, which is the focus of that section. Now is the time to discuss the lower portion of the Deployment Console.
Note: Consider also the command line utility Generating XSD and WSDL schema files to achieve the result.
To start the Deployment Console, choose Start > All Programs > Progress > Corticon 5.x > Corticon Deployment Console.
Figure 302. Deployment Console with Input Options Numbered
Service contracts provide a published XML interface to Decision Services. They inform consumers of the necessary input data and structure required by the Decision Service and of the data structure the consumer can expect as output.
1. Decision Service Level/Vocabulary Level - These radio buttons determine whether one service contract is generated for each Ruleflow listed in the Deployment Descriptor section of the Deployment Console (the upper portion), or for the Vocabulary listed in section Vocabulary File.
Often, the same payload structure flows through many decision steps in a business process. While any given Decision Service might use only a fraction of the payload's content (and therefore have a more efficient invocation), it is sometimes convenient to create a single master service contract from the Decision Service's Vocabulary. This simplifies the task of integrating the Decision Services into the business process because a request message conforming to the master service contract can be used to invoke any and all Decision Services that were built with that Vocabulary. This master service contract, one which encompasses the entire Vocabulary, is called Vocabulary Level.
The downside to the Vocabulary-level service contract is its size. Any request message generated from a Vocabulary-level service contract will contain the XML structure for every term in the Vocabulary, even if a given Decision Service only requires a small fraction of that structure. Use of a Vocabulary-level service contract therefore introduces extra overhead because request messages generated from it may be unnecessarily large.
In an application or process where performance is a higher priority than integration flexibility, using a Decision Service Level service contract is more appropriate. A Decision Service-level service contract contains the bare minimum structure necessary to consume that specific Decision Service – no more, no less. A request message generated from this service contract will be the most compact possible, resulting in less network overhead and better overall system performance. But it may not be reusable for other Decision Services.
2. Vocabulary File - When generating a Vocabulary-level service contract, enter the Vocabulary file name (.ecore) here. When generating a Decision Service-level contract, this field is read-only and shows the Vocabulary associated with the currently highlighted Ruleflow row above. See Corticon Decision Service Contracts for details.
3. Type - The service contract type: WSDL or XML Schema. A WSDL can also be created from within Corticon Studio with the menu command Ruletest > Testsheet > Data > Export WSDL. See the Ruletest chapter of the Corticon Studio: Quick Reference Guide for more information.
4. XML Messaging Style - When using XML to describe the payload, there are two structural styles the payload may take, flat and hierarchical. Flat payloads have every entity instance at the top (root) level with all associations represented by reference. Hierarchical payloads represent associations with child entity instances embedded or “indented” within the parent entity structure.
Both styles are illustrated below. Assume a Decision Service uses an Account and its associated SecurityPositions. In the Flat style, the payload is structured as:
Figure 303. Example of a Flat (FLAT) Message
In the hierarchical style, the payload is structured as:
Figure 304. Example of a Hierarchical (HIER) Message
The Hierarchical style need not be solely hierarchical; some associations may be expressed as flat, others as hierarchical. In other words, hierarchical can really be a mixture of both flat and hierarchical. A mixture of hierarchical and flat elements is sometimes called a hybrid style.
Note that in the flat style, all entity names start with an upper case letter. Associations are represented by href tags and role names which appear with lowercase first letters. By contrast, in the hierarchical style, an embedded entity is identified by the role name representing that nested relationship (again, starting with a lowercase letter). Role names are defined in the Vocabulary.
This option is enabled only for Vocabulary-level service contracts, because the message style for Decision Service-level service contracts is specified in the Deployment Descriptor file section (the upper portion) of the Deployment Console.
5. SOAP Server URL - URL for the SOAP node that is bound to the Corticon Server. Enabled for WSDL service contracts only. The default URL is http://localhost:8850/axis/services/Corticon that makes a Decision Service available to the Corticon Server's Progress Application Server. This Deployment property's default value can be overridden in your brms.properties file.
6. Generate Service Contracts - Generates the WSDL or XML Schema service contracts into the output directory. When you select Decision Service-level contracts, one service contract per Ruleflow listed in the Deployment Descriptor section (the upper portion) of the Deployment Console will be created. When you select Vocabulary-level service contracts, only one contract is created for the Vocabulary file specified in section 1. Note that this button is not enabled until you have chosen a Type.