on 04-02-2009 3:59 AM
hi,
i am doing a maping between an xsd and message type with structure which has:
1.nested structure
2.source field occurs more than once in thses netsed structure.
fields not having multiple occurence have the same value as in source but the one having mulitple occurence are having different fields.
my context handling not working.
i m using splitByValue and changing the context of source field to its immediate header which is again not working.
can anyone help in this regards
i appreciate quick reply which is needed-thanks
Hi,
As I have understood your problem. You need all the child node( which is under different parent node in the source structure ) under one patent node in the traget structure
In that case, Change the context of the Child node of the source struture to the higest level(i.e all the child node should be in one contex) and map it to the child node of the target.
Regards,
Shwetambari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You mean to say, You are able to create the parent node but all the child node are coming in the first parent node. If this is the case then you need to map the child node as folows:
YOu mentioned earlier that there is an ID Filed. If its value changes, the child node should appear in different parent node.
SO 1) Take ID field and use remove context.
2) Use SplitBy value(Property- change by value)
3) Map it to the child node of the target node.
Regards,
Shwetambari.
hi
source
<Root>
-
><Parent Node> 0..unbounded
-
><childe node1> 0..1
-
><childe node2> 0..1
-
><childe node3> 0..1
-
><childe node4> 0..1
target
<Root>
-
><Parent Node1> 1..unbounded
-
><childe node1> 0..1
-
><childe node2> 0..1
-
><Node2> 0..unbounded "item of parent node1"
-
><childe node3> 0..1
-
><childe node4> 0..1
-
><Node3> 0..unbounded ""item of parent node2"
-
><childe node1> 0..1
-
><childe node2> 0..1
-
><Parent Node2> 1..unbounded
-
><childe node1> 0..1
-
><childe node2> 0..1
as per the above structre when chilnode1,2 gets repeated, the values are not correctly populated in respective target feilds
hope m clear
Hi,
changing the context of source field to its immediate header which is again not working
If your source str is as follows:
<SRC>
<Node1>
<Field1/>
</Node1>
</SRC>
then to achieve your goal you need to raise the context of field1 not to Node1 but to SRC...first try using only context change in this manner without using splitByValue or other function...you can have them later (if needed).
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi abhishek i tried:
1.using without splitVal in field also changing context to root rather immediate header
2.i changed it back to immediate header bcos ocurences of node1 was affected in this case.
i mean node1 was supose to occure 3 time along wth field1(has item as well) but by applying this it occured 3 times but only first occurence had field1 and its item not the other 2 occurences.
rgds
just tell me one thing will the below source structure repeat
<Node>
<Field1/>
</Node>
Abhishek, not the structure but the field inside repeats in 2--3 header at target side.
OR
will the target elements repeat and you want to push the single occurence of Field1 of Source into multiple occurences of target nodes?? bit confused with:(
ya, field at source side occurs multiple times in different headers but with different values.
X
a
b
target side
Y
a
d
Z
a
e
this way. but in my case value of "a" isnt goin in proper header.
Hi,
Would you be able to give the source and target structure?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay Mark,
i will try to explain,
target
<Root>
-
><Parent Node1> 1..unbounded
-
><childe node1> 0..1
-
><childe node2> 0..1
-
><Parent Node2> 0..unbounded "item of parent node1"
-
><childe node3> 0..1
-
><childe node4> 0..1
-
><Parent Node3> 0..unbounded ""item of parent node2"
-
><childe node1> 0..1
-
><childe node2> 0..1
source
<Root>
-
><Parent Node> 0..unbounded
-
><childe node1> 0..1
-
><childe node2> 0..1
-
><childe node3> 0..1
-
><childe node4> 0..1
when i try to check the context at parentNode1,2,3 its occurences gets affected.
like if supoose parent node1 is suppose to occur3 times along with its items i.e parentNode2, parentNode3; it occurs 3 times but in the 2nd and 3rd occurences there are no items in it.
rest the child nodes are mapped wth context chnge to its immediate header using splitVal.
let me knw if nt clear
thnx al
Hi ,
Did you try giving source field context to root node? if that is not the purpose then also try using removecontext and splitbyValue in combination & check
There is a one doc in SDN by searching this topic- for more infi
Mapping Patterns - Understand Context Handling in Message Mapping - Webinar Powerpoint
Hope it helps, Regds,Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
in my case:
A
id
x
y
z
similarly B
id
x
t
u
v
so like x, there are more field which get repaeted in different headers liek B.
i have to populate items of A or B as per id value. Which is fine for fields which are not having multiple occurences, but i donno know why values of multiple occurences isnt ok.
x in A has value of x of B header.
m going thru the doc as well.m in pi 7.1
Did you try giving source field context to root node? if that is not the purpose then also try using removecontext and splitbyValue in combination & check
ya i have, didnt work
can splitByVal and collapse Contxt be helpful in this case?
rgds,
Edited by: sdn pi on Apr 2, 2009 5:41 AM
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.