Author |
Message
|
SanFernando |
Posted: Tue Jul 28, 2015 1:32 pm Post subject: IIB Copying entire message tree |
|
|
Newbie
Joined: 28 Jul 2015 Posts: 3
|
So I'M fairly new and currently working on a project on IIB and Im trying to copy a message tree from a ROW data type to OutputRoot but im only getting the main elements and not the subelements of those elements.
ex.
SET OutputRoot.XMLNSC.AllVehicles = MAKE.Vehicles;
the structure of MAKE (shared row) is like this:
Code: |
Vehicles
Make
Years
date
Make
Years
date
Make
Years
date
|
and im only gettting:
Code: |
Vehicles
Make
Make
Make |
Any help is appreciated please and thank you[/quote] |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 29, 2015 4:36 am Post subject: Re: IIB Copying entire message tree |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SanFernando wrote: |
Im trying to copy a message tree from a ROW data type to OutputRoot |
Fair enough, but this:
SanFernando wrote: |
SET OutputRoot.XMLNSC.AllVehicles = MAKE.Vehicles; |
copies it the other way.
SanFernando wrote: |
the structure of MAKE (shared row) is like this: |
No, I don't think it is, and I think (from your description of the results) IIB agrees with me.
How are you setting up the ROW variable (taking as a starting point that you really are trying to set up the OutputRoot message tree)? Is it sourced from InputRoot, a database select or what?
One possible problem (and by no means the only one, or your one) is that you're creating the ROW variable from InputRoot.XMLNSC and the elements Years and Date are attributes of the Make. The XMLNSC message domain understands XML attributes, a ROW variable does not and (depending on exactly how you're doing it) only the base element Make is added to the ROW and the attributes are stripped off. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SanFernando |
Posted: Wed Jul 29, 2015 5:50 am Post subject: |
|
|
Newbie
Joined: 28 Jul 2015 Posts: 3
|
I'm getting the data from a web service and when in another node yea i use InputRoot but the ROW which is
Code: |
DECLARE MAKE SAHRED ROW; |
is filled depending on the data with either
Code: |
MAKE.Vehicles.Year = 'something';
MAKE.Vehicles.Year.Model = 'something'; |
which when debugging creates the following in the variables window
Code: |
Make
Vehicles
Year
Model
Make
Vehicles
Year
Model
|
|
|
Back to top |
|
 |
SanFernando |
Posted: Wed Jul 29, 2015 10:08 am Post subject: |
|
|
Newbie
Joined: 28 Jul 2015 Posts: 3
|
Problem fixed. I was thinking of XMLNSC as a root instead of setting up as domain at the beggining
The following line and a few changes of references fixed it.
Code: |
CREATE LASTCHILD OF MAKE AS makeRef DOMAIN 'XMLNSC' NAME 'AllVehicles'; |
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 29, 2015 10:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SanFernando wrote: |
Problem fixed. I was thinking of XMLNSC as a root instead of setting up as domain at the beginning |
SanFernando wrote: |
The following line and a few changes of references fixed it.
Code: |
CREATE LASTCHILD OF MAKE AS makeRef DOMAIN 'XMLNSC' NAME 'AllVehicles'; |
|
I also thank you on behalf of the community for posting your eventual solution for the benefit of future readers. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|