I have an complex type like the following:
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element minOccurs="0" name="parentFacility" type="tns:watereddownFacility"/>
I want to populate this object in my MB esql code but I don't know how many desendents there are.I get a list of facilties with its parents as input and I need to populate my complex type from it.
How would I go about creating the watereddownFacility object and then setting each parent inside itself until the root parent is reached ?
Thanx for your help.
Pinned topic Populating a recursive complex type.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-26T17:00:10Z at 2013-02-26T17:00:10Z by email@example.com
firstname.lastname@example.org 120000CJSH515 Posts
Re: Populating a recursive complex type.2013-02-26T17:00:10ZThis is the accepted answer. This is the accepted answer.I cannot work out what you are asking. What part of the problem are you struggling with? The algorithm for translating a flat list into a recursive tree structure? Or the ESQL/Mapping node/Java code that implements such an algorithm?
Have you tried anything yet? If so, what happened?