Skip to Content
avatar image
Former Member

Issue with GUI Mapping

Hello all,

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

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

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"?>

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 16, 2007 at 10:56 AM

    Hi Sunil,

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2007 at 11:13 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Oct 16, 2007 at 11:19 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2007 at 11:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2007 at 12:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded