on 2022 Sep 01 7:21 PM
Is it possible to create a Pass through scenario where sender channel picks multiple XMLs of different structure from a directory and combine using append command in receiver channel to form single xml and place in target path
Hello,
look at this: https://blogs.sap.com/2014/06/06/merge-multiple-files-without-bpm/
I followed that blog a few months ago and it works well. The only downside: the actual sender channel that does the combining must be of NFS. So I am pulling 2 files from an SFTP and save them on a folder on our PO system. The next scenario then picks the files from there with an NFS (File) Sender channel and the OM has the java map as the first mapping step and combines the two XMLs.
Good luck, Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter, I’m following that blog from Arpil for the same requirement but i’m getting a NullPointerException; while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable source. Can you let me know how your files look like? The channel was able to pick up the file and the attachments.
Hello Gal Leeloo,
there is one line in the java mapping:
Element element = (Element) attachmentDoc.getElementsByTagName("Recordset2").item(0);
that basically "grabs" the attachment XML by using the root elment name. In my example that root is called "Recordset2". Make sure you adapt that in the java map to that element name. If not, I could imaging you get a null pointer because it tries to get an element by tag name and does not find any.
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.