cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with GUI Mapping

Former Member
0 Kudos

Hello all,

<b>My Source is.............</b>

<?xml version="1.0" encoding="UTF-8"?>

<ns0:PersonsMT xmlns:ns0="http://xyz.com/scratchpad">

<Persons>

<Person>

<Name>Smith</Name>

<Height>22</Height>

<Father>

<Name>Paul</Name>

<Height>23</Height>

<Father>

<Name>Sr Paul</Name>

<Height>23</Height>

<Father/>

</Father>

</Father>

</Person>

<Person>

<Name>Brad</Name>

<Height>22</Height>

<Father>

<Name>Luke</Name>

<Height>23</Height>

<Father/>

</Father>

</Person>

</Persons>

</ns0:PersonsMT>

And Target Should look like this........

<?xml version="1.0" encoding="UTF-8"?>

<ns0:PersonsListOutputMT xmlns:ns0="http://xyz.com/scratchpad">

<Persons>

<Person>

<Name>Smith</Name>

<Height>22</Height>

</Person>

<Person>

<Name>Paul</Name>

<Height>23</Height>

</Person>

<Person>

<Name>Sr Paul</Name>

<Height>23</Height>

</Person>

<Person>

<Name>Brad</Name>

<Height>22</Height>

</Person>

<Person>

<Name>Luke</Name>

<Height>23</Height>

</Person>

</Persons>

</ns0:PersonsListOutputMT>

I have to do this only by GUI mapping how to do this.....

With Regards,

Satya Sunil

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sunil

What I understood from your source structure is that for a person you are maintaining an infinite number of ancisters (father's father) details :

<Person>
		<Name>Smith</Name>
		<Height>22</Height>
		<Father>
			<Name>Paul</Name>
			<Height>23</Height>
			<Father>
				<Name>Sr Paul</Name>
				<Height>23</Height>
				<Father/>
			</Father>
		</Father>
	</Person>

There is <Father> inside <Father>. Is this what you intend to do? If so,Is there a limit to the level <Father>?

Am I understanding the source structure right ? If yes, please give me sample of source XML template from the message mapping tool.

Vijendra

Message was edited by:

Vijendra Bhanot

Message was edited by:

Vijendra Bhanot

Former Member
0 Kudos

Hi

as per your given structure your source data type will look like

dt_test_source

persons(1..1)

person(0..unbounded)

Name(1..1)

height(1..1)

father(0..unbounded)

name(1..1)

height(1.1)

n ur target structure look like

dt_test_target

persons(1..1)

person(0..unbounded)

Name(1..1)

height(1..1)

by making such a structure you can do the graphical mapping easily.

Thanks

Rinku

Former Member
0 Kudos

Hello Rinku ,

I too defined exactly as you define. How to do Mapping???

With Regards,

Former Member
0 Kudos

Hi Sunil,

I think you need to use User defined function where in it accepts two inputs 'Persons', 'Father'. You need to write some java code using the concept of Queues and produce the target structure as required.

Regards,

Suraj Kumar

Former Member
0 Kudos

Sunil,

As your source and target messages are same so there is no need to do mapping, but still if you are intersted in doing mapping just map in one-to-one.

Regards,

Sarvesh

Former Member
0 Kudos

Hello Sarvesh,

Source and target are not same ,in Source Father node is there ...

Please check them once

Former Member
0 Kudos

Sunil,

I have checked you source structure. I think you have created it for you learning purpose. This is wrong example taken by you. You can not create data type with identical names. If structure is correct then it may be that you have made a mistake while posting your structure on SDN. Just confirm it??

Regards,

Sarvesh

Former Member
0 Kudos

Hello Sarvesh,

yes , the Data types are not of Identical names ,They are seperate....Structure is correct .I made a mistake while posting.

Consider any other name for the Target Data Type

then how to handle this situation.......

With Regards,

Satya Sunil

Former Member
0 Kudos

Dear Sunil,

It will be better if you could send the source & target structure. Unless I see the correct structure I can not say anything on it.

Regards,

Sarvesh

Former Member
0 Kudos

Hello,

Source :

DT_Persons Complex Type

Person Element 1....unbounded

Name Element xsd:string 1

Height Element xsd:string 1

Father Element 1....unbounded

Name Element xsd:string 1

Height Element xsd:string 1

TARGET :

DT_Persons Complex Type

Person Element 1....unbounded

Name Element xsd:string 1

Height Element xsd:string 1

Former Member
0 Kudos

Sunil,

See the below mapping, something is missing (???), just create missing node & respective fields. it will work.

<b>SOURCE</b> -


<b>TARGET</b>

DT_Persons Complex Type -


> DT_Persons Complex Type

Person Element 1....unbounded -


> Person Element 1....unbounded

Name Element xsd:string 1 -


> Name Element xsd:string 1

Height Element xsd:string 1 -


> Height Element xsd:string 1

Father Element 1....unbounded -


> <b>??? (field missing, so can not mapped)</b>

Name Element xsd:string 1 -


> <b>??? (field missing, so can not mapped)</b>

Height Element xsd:string 1 -


> <b>??? (field missing, so can not mapped)</b>

Regards,

Sarvesh

former_member187437
Contributor
0 Kudos

Hi Sunil,

I have a doubt. How did you define the recursive structure in the message type/data type.