on 06-13-2016 10:07 AM
Hi experts,
proxy to file scenario
one field contains no value but FTP wants that field with Starting tag and ending tag.
For ex: "Employee" is a field, In that field is empty.
In xml payload of SXMB_MONI without value is not showing or showing like this
how can I get these type of xml, kindly help me
Regards
Naveen L
Hi Naveen,
See this mapping where all items are mapped one to one except item3 which is linked to target field mapwithdefault
Now in test tab I am testing a payload
Source payload
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_SRC xmlns:ns0="urn:Demo/SCN">
<Header>
<Item1>1</Item1>
<Item2/>
<Item4>3</Item4>
</Header>
</ns0:MT_SRC>
In the payload item3 is not present while Item2 is present but there is no field value. After mapping the xml generated is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TGT xmlns:ns0="urn:Demo/SCN">
<Header>
<Item1>1</Item1>
<Item2></Item2>
<Item3></Item3>
<Item4>3</Item4>
</Header></ns0:MT_TGT>
You can see Item3 with empty tag is present in output because you had an empty context inserted via "mapwithdefault".
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi experts,
proxy to file scenario
one field contains no value but FTP wants that field with Starting tag and ending tag.
For ex: "Employee" is a field, In that field is empty.
In xml payload of SXMB_MONI without value, It is showing nothing or showing like this <Employee/>
But we need <Employee></Employee> (starting tag and closing tag)
how can I get these type of xml, kindly help me
Regards
Naveen L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lingampally,
Are you using a message mapping?, you can set the occurrence to 1 and to map a constant value with a blank value in the case the employee is not setting in source XML. You can use the standard mapping function CreatIf with the function Exists, if the value is false you map a constant blank, else the value of the source message (IfThen function).
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.