on 04-06-2007 5:48 AM
Hi all,
I am doing file to file scenario.When I use APPEND in the File adapter it is also adding <?xml version="1.0" encoding="UTF-8" ?>
I need to send a file for every 10 minutes consolidate all files and send at the end of the day.
<?xml version="1.0" encoding="UTF-8" ?>
<ID>31154</ID>
The next time when i send the file with different< ID>31155</ID>
it should append ignoring <?xml version="1.0" encoding="UTF-8" ?>
The consolidated file must look like this...
<?xml version="1.0" encoding="UTF-8" ?>
<ID>31154</ID>
< ID>31155</ID>
Thanks ,
Srinivas
HI,
See the below links for XSLT .
XSLT Mapping
/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
XSLT Mapping with java enhancement
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
there is an easy way
put an XSLT mapping (or java or abap)
that will just remove the header tag - as a second mapping in your
interface mapping (in XSLT this is just a few lines of code )
then you won't see this in file adapter
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Even if you do manage to do this like pointed by Michal, the final output that will be produced will not be a valid XML.
Any XML needs to have a Root tag and if we take your Solution into picture, you will use APPEND mode without the <xml version .. > but there will be no root tag here and this might cause an issue if you are using some XML parser to process this file further as this is not a valid XML at all.
Regards
Bhavesh
The append mode should be used only with text files and not with XML files.
Either collect all the files in XI iinside a BPM and then do a N:1 mapping to send the data to the file or , collect all data at thge source and send data to the target . or, use any other mode in the receiver file adapter other than create,.
Regards
Bhavesh
Is it mandatroy that the output file be an XML file?
If no, consider using Content Conversion in the Receievr File Adapter with the mode as Append.
If you want to continue to create an XML file then,you need to change the mode in the receive file adapter to either AddMessage ID , AddCounter , etc.
Regards
Bhavesh
Hi there,
I think the proper question here should be "why is there a requirement of 'do not use this or that technology'?".
BPM is not recommended when you need performance over all costs, but that is the exactly opposite of your scenario. 😛
I think you should reconsider that requirement.
Regards,
Henrique.
Hey
as pointed out by everyone else,there is no straight way for this,one thing u can do is that create two separate scenarios.
in first scenario use content conversion on receiver side and keep on appending the text for 10 mins (guess this is ur pooling interval),now since ur using FCC u wont get <?xml version="1.0" encoding="UTF-8" ?>,you will get a flat file on receiver side.
after 10 mins u can have one more scenario which picks up this flat file and this time use FCC on sender side so that it will convert this flat file to XML,in this way you will get <?xml version="1.0" encoding="UTF-8" ?> only once.
hope this solves ur problem.
just make sure that you specify correct polling intervals for both the scenarios.
thanx
ahmad
Hi,
Do you wat to xml file only?? if so i am not sure, bcz the xml file structure should have the said tag.
Why dont try with file content conversion with ingnoring the header column, then the result text file will be appended with only records whatever you want..
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ram,
In your case, go for a BPM collect pattern with deadline monitoring. Give the time interval as 24 hours(1 day). Collect all the file you receive till then and do a transformation step N:1 mapping to produce a single msg(file). Write this file to the receiver at the day end.
Regards,
Jai Shankar
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.