cancel
Showing results for 
Search instead for 
Did you mean: 

single nodes to multiline nodes

Former Member
0 Kudos

Hi All,

My source is

<item>

<name>productname</productname>

<url_1>filepath1</url_1>

<url_2>filepath1</url_2>

<url_3>filepath1</url_3>

</item>

My destination is

<product>

<name>productname</name>

<photos>

<photo>

<url>filepath1</url>

</photo>

<photo>

<url>filepath2</url>

</photo>

<photo>

<url>filepath3</url>

</photo>

</photos>

</product>

in the datatype I configured the element photo with a Occurrence 3..3

3 photos is a fixed number

How can I map this ?

With Regards,

Remco Nieuwboer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I duplicated the node and did the mappings, now I get the following message

The source structure, target structure, or a function library has been changed or could not be found in the Enterprise Services Repository. The mapping definition contains elements or attributes that do not exist in the changed structure, or functions that were changed in a function library. The relevant entries will be deleted.

Target structure has no such path:

/products/product/photos/photo[1]/url. Skipping mapping

Target structure has no such path:

/products/product/photos/photo[2]/url. Skipping mapping

Former Member
0 Kudos

Hi,

i guess u r not doing any mapping for the node "Photo"...

try to map constant to this node and then save/activate it.

Thanks

Amit

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks Amit,

That was the problem.

first I changed the occurrence of photo from 3..3 to 1..3

I duplicated the subtree and I targetted URL to photo[0], URL_1 to photo[1] and URL_2 to photo[2]

And it works

Thank you all for your answers

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>in the datatype I configured the element photo with a Occurrence 3..3

3 photos is a fixed number

Right click on photo node and do duplicate subtree 3 times. Then do mapping

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>in the datatype I configured the element photo with a Occurrence 3..3

3 photos is a fixed number

Right click on photo node and do duplicate subtree. Once you created individual photos map it.

Former Member
0 Kudos

in your mapping on response side right click and select duplicate structure do this 3 times and map your URL 1URL 2 and URL 3 one as to one from source to target..

it will work..

Thanks,

Bhupesh

Former Member
0 Kudos

Duplicate ur target node "photo" thrice(right click on Photo node and click duplicate subtree) and then map accordingly.

like:

url_1 -> url

in the same way repeat for the other two.

Thanks

Amit