If the data payload of your call will be in the form of an XML document, then your Vocabulary might need to be configured to match the naming convention of the elements in your XML payload.

Displaying XML Mapping

On the Vocabulary menu, choose Add Document Mapping > Add XML Mapping.

Entity Mapping

When XML mapping has been added to the Vocabulary, its Entity properties are displayed.

Table 1. XML Mapping Entity Properties
Property Value
XML Namespace Specifies the full namespace of XML Element Name when there is no exact match.
XML Element Name Specifies the XML Element Name when there is no exact match.

Vocabulary entities correspond to XML complex elements (complexTypes). If the complexType matches exactly (spelling, case, special characters, everything), then no mapping is necessary. However, if the complexType name differs in any way from the Vocabulary entity name, then the complexType name must be entered in the Element Name property, as shown:.

Figure 1. Mapping a Vocabulary Entity to an XML complexType

In the example shown in this figure, the Vocabulary entity name (Aircraft) does not exactly match the name of the external XML Class (Plane), so the mapping entry is required. If the two names were identical, then no mapping entry would be necessary.

If XML Namespaces vary within the document, then use the Namespace field to enter the full namespace of the XML Element Name. If no XML Namespace value is entered, then it is assumed that all XML Elements use the same namespace.

Attribute Mapping

When XML mapping has been added to the Vocabulary, its Attribute properties are displayed.

Table 2. XML Mapping Attribute Properties
Property Value
XML Namespace Specifies the full namespace of XML Element Name when there is no exact match.
XML Element Name Specifies the XML Element Name when there is no exact match.

Vocabulary attributes correspond to XML simple elements. If the element name matches exactly (spelling, case, spaces, and non-alphanumeric characters), then no mapping is necessary. However, if the element name differs in any way from the Vocabulary attribute name, then the element name must be entered in the Element Name property, as shown in the following figure.

Figure 2. Mapping a Vocabulary Attribute to an XML SimpleType

If Namespaces vary within the document, then use the Namespace field to enter the full namespace of the Element Name. If no Namespace value is entered, then it is assumed that all Elements use the same namespace.

Association Mapping

When the Vocabulary has added XML mapping, you set their properties on the properties page of the Association.

Table 3. XML Mapping Association Properties
Property Value
XML Property Name Specifies the XML Element Name when there is no exact match to the Vocabulary association name.

Vocabulary associations correspond to references between XML complex elements. If the element name matches exactly (spelling, case, special characters, everything), then no mapping is necessary. However, if the element name differs in any way from the Vocabulary association name, then the element name must be entered in the Property Name property, as shown below.

Figure 3. Mapping a Vocabulary Association to an XML ComplexType

XML Namespace Mapping

Corticon Server assumes that incoming XML requests are loosely compliant with the XSD/WSDL generated for a specific Decision Service so the Corticon XSD/WSDLs that are generated have a generic targetNamespace of urn:Corticon, as illustrated:

Figure 4. XSD with generic Namespace
Figure 5. WSDL with generic Namespace

Setting XML Namespace Mapping preference for unique target namespaces

Systems that are strict about XML validation might require a unique targetNamespace —ideally globally unique.

You can choose to have unique names by setting the deployment property com.corticon.deployment.ensureUniqueTargetNamespace in respective brms.properties files to tell the XSD and WSDL Generators to create unique Target Namespaces inside the output document.

When the property is set to true, the following template will be used to create the Target Namespaces for the XSD and WSDL Documents:
  • XSD: urn:decision/<Decision Service Name>
  • WSDL: <soap binding uri>/<Decision Service Name>
When the property is set to false, the following template will be used to create the Target Namespaces for the XSD and WSDL Documents:
  • XSD: urn:Corticon
  • WSDL: urn:CorticonService
The default value is false. If changed, a restart of the Server is required.

The following images are examples of unique namespaces:

Figure 6. XSD with unique Namespace
Figure 7. WSDL with unique Namespace