on 2007 Mar 08 8:13 PM
Hi Experts,
When outputting XML files, the file receiver adapter would parse blank or null values like this:
<field></field>.
But a 3rd part system does not support this format(really weird, but it's true), it only supports:
<field/>.
Is there any way to control the file receiver adapter to output blank/null nodes as <field/> but not <field></field>?
Any advice is appreciated, thanks a lot for you your.
Best regards
Luis
Request clarification before answering.
Hi Luis,
Does the Sender XML message in XI have the corresponding node? It looks like this node itself is absent, as against the node existing with a blank value.
If this is the case, in the node mapping, you may have to use the 'Exists' function in conjunction with a 'IfWithoutElse' function.
I had same problem with my one scenario, i use IfWithoutElse & compare with null constant.
Then if node is coming null then it wont come in o/p xml.
Hope this helps,
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi friends,
I've got a solution for this issue: Use Java Mapping.
In my Java mapping method execute(), I set the property of the output as "Indent". In this case, null nodes will output as <field/>.
This is obviously a poor solution, but it really works. Thanks for all your kind help.
Regards
Luis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Luis,
Interesting. I had used a file receiver which outputs an XML document with blank fields like <field />
Check in the mapping if value exists otherwise try to map it with a constant having blank value
Otherwise try changing the occurence of the element (if you have 1 then change to 0 and check)
Regards,
Arvind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Map the nodes with <b>mapwithdefualt</b> and give the default value or some spaces if it is allowed.
Else if the target node is having the occurrences as 0..unbound then exists - createif map to node.
Else if your requirement should give the result as <field/> if the value is not existed then i hope better to go for Java mapping or other or write Adapter module.
to write adapter module see below link.
https://websmp108.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf
Regards
Chilla..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, this is not possible.
You have to write an adapter module to achieve this.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.