hi Indrajit
There is a slight change in the input structure. They can send as many file names as required in one input request. We have to read each file name and create the target structure.
<MAT>
<doc type>pdf</doc type
<subnumber>1234</subnumber>
<id>45ABC<id>
<matno>ABCD</matno>
<file> 0..unbounded
<file_name>file1.pdf<file_name> ----->name of the first file
<file_id>2y7hsjsj</file_id> -------------->unique id of the first file
<file_type>pdf</file_type> --------------->type of the file
<file_name>file2.xml<file_name> ------------->name of the second file
<file_id>8mnk9<file_id> -----------------unique id of the second file
<file_type>xml<file_type> ------------------>type of the file
<file_name>file3.xml> ----------------->name of the third file
<file_id>e783kj3k3</file_id ---------------->unique id of the third file
<file_type>xml</file_type> -------------->type of the file
-------------------------
------------------------
------------------------
---------------------
</file
</MAT>
So the <file> is 0..unbounded structure.
I have to create a target structure like this below.
<MAT>
<doc type>pdf</doc type
<subnumber>1234</subnumber>
<id>45ABC<id>
<matno>ABCD</matno>
<file> 0..unbounded
<file_content>file1.pdf<file_name> ----->byte array content of the first file
<file_id>2y7hsjsj</file_id> -------------->unique id of the first file
<file_type>pdf</file_type> --------------->type of the file
<file_content>file2.xml<file_name> ------------->byte array content of the second file
<file_id>8mnk9<file_id> -----------------unique id of the second file
<file_type>xml</file_type> ---------------------->type of the file
<file_content>file3.xml> ----------------->byte array content of the third file
<file_id>e783kj3k3</file_id ---------------->unique id of the third file
<file_type>xml<file_type> --------------->type of the file
-------------------------
------------------------
------------------------
---------------------
</file
</MAT>
I am writing a java mapping program to read each <filename> tag value from the incoming xml and read the file from PI server location and convert the file content to bytearray and also to map it to target structure which would be XML. There is no more &and = in the target structure. It is plain XML. Can you please help in revisiting the java mapping program based on this change of requirement. I really appreciate your help
thx
mike