Hello experts,
with Receiver-File Adapter I want to save a specific file. Name is given in the xml payload. I use Variable Substitution.
My structure is like this:
<root> <elements> <name>name1</name> </elements> <elements> <name>name2></name> </elements> </root>
File name schema: %file%
Variable Substitution:
File Name: file
Reference: payload:root,1,elements,1,name,1
With this expression my file adapter creates two files (as recommended), but they have both the name "name1". I want to create n files with n different names, given by one xml structure. How can this task be done? Setting the occurency from "1" to "n" or "*" does not work.
Thank you very much!
Ilona Seifert
hi,
if you have XI SP14 don't use variable Substitution
use the method described in my weblog
(easier to use and allows better handling
you can concat two values for the filename etc):
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Hi,
Not sure I get the entire flow here. You are creating N files ( and so ) you will have N different Messages coming into your Receiver File adapter . So, if you want to use Dynamic File Name then make sure that the filename is in the same element in the same occurence in every file.
Can you maybe explain the requirements a bit further?
Regards
Bhavesh
Hi,
Like pointed by you , your source strucutre,
<root> <elements> <name>name1</name> </elements> <elements> <name>name2></name> </elements> </root>
The target strucuture after mutlimapping will be like,
My structure is like this:
<root> <elements> <name>nameX</name> </elements> </root>
Now, using Variable Name substitution, you will have the "name " element at a fixed level always , <b> payload:root,1,elements,1,name,1</b> and so you Variable Name subsitution will also work fine.
Hope it clears,
Regards
Bhavesh
Add a comment