How to use Instance.createInstanceFromXML() to create child concepts referred in an XML file.

How to use Instance.createInstanceFromXML() to create child concepts referred in an XML file.

book

Article ID: KB0094253

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:

===========

How to use Instance.createInstanceFromXML() to be able to create child concepts referred in the XML file.

Example:

String sa = "<?xml version=\"1.0\"

encoding=\"UTF-8\"?>&ltns0:NewConcept

xmlns:ns0=\"www.tibco.com/be/ontology/Concepts/NewConcept\">  <!-- property refCpt1 is a referenced concepts:--> &ltrefCpt1> &ltHandleID&gt1</HandleID> &ltCode&gtAB</Code> </MessageRequest>

</ns0:refCpt1>";

Concepts.NewConcept cNewCpt =

Instance.createInstanceFromXML(null, sa);


Environment:
===========

BusinessEvents 4.0.1
All Operating Systems



Symptoms:
=========

By default, the child concept (MessageRequest) referred in the XML will not be created.


Cause:
======
Special properties are required.

Resolution:
========

Add the following properties to &ltBE-HOME>/studio/eclipse/configuration/studio.tra

# ---------------------------------------------

expand-schema=true

automatic_mapper_if_surround=true

filter-empty-elements=true

nillable-schema-elements=true

tibco.be.schema.ref.expand=true

tibco.be.schema.nil.attribs=true

tibco.be.schema.exclude.null.props=true

tibco.be.schema.treat.null.values=true

TIBCO.BE.function.catalog.Instance.createInstanceFromXML=true

Issue/Introduction

How to use Instance.createInstanceFromXML() to create child concepts referred in an XML file.