on 07-15-2013 7:01 AM
Hi,
While executing Message Mapping I am getting LastName data in wrong Node on Target Side.
eg.
<root>
<Source> /* Data 1 */
<FirstName>FName1</FirstName>
<LastName>LName1</LastName>
</Source>
<Source> /* Data 2 - Here from Source I am not getting last name in XML Paylaod*/
<FirstName>Name2</FirstName>
</Source>
<Source> /* Data 3 */
<FirstName>Name3</FirstName>
<LastName>LName3</LastName>
</Source>
</root>
Where as on response side, I am getting target XML as this.
<Target>/* Data 1 */
<FirstName>FName1</FirstName>
<LastName>LName1</LastName>
</Target>
<Target>/* Data 3 */
<FirstName>FName2</FirstName>
<LastName>LName3</LastName> -- Wronge data here ---
</Target>
<Target>/* Data 3 */
<FirstName>FName3</FirstName>
</Target>
How to handle such case
I have attached following for your reference.
1. Screenshot of MessageMapping .
2. XSD of Source side Structure. - Sorry not able to attach
3. Sample XML Payload.
Regards
PS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Mark Dihiansan answer solved my problem .
others comment were also appreciated . Thanks for prompt reply guys.
Regards
PS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhat,
Simply use mapwithdefault function, it should work for you. The sugggestions from experts above are nicely presented already.
/AB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Adding to what Mark has suggested, u can add "Ifwithout Else" after "mapwithDefault" where u can check if "LastName" is not empty then only pass source value to its corresponding target field...in this way ur second target segment will not have "LastName" target field with empty value
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.