on 07-12-2016 11:15 AM
Hi Experts,
we are picking the ISO format file from Bank SFTP server and processing to ECC system.
Now Bank is also placing one more ISO format file(different structure) with same file name in same folder and they confirmed that it is not possible to change the file name and folder.
Now we are getting Mapping Exception in PI with the new ISO format structure file.
can any one tell us , how to differentiate among the two files.
Regards
Raju
Hi Peddaraju,
If you want to process the same file name disable Duplicate File Checking in sender sftp adapter, it will allow to pick the same file.
Regards
Pavan D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peddaraju,
1. you may need to write a java mapping.
2. This is the approach I have for you
i) The inbound processing tab in ICO or sender agreement uncheck the Software Component Version ie. keep the SWCV blank
ii) The above point will make your sender file passthrough and will not check for structure. It will not throw error Interface determination did not yield or any other error .
iii) now create a java mapping which will determine the further conditions for you.
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Nikhil,
It is a XML placing in the Folder.
-raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would try with creating common type including both structures under one root tag and occurence 0..1 for both of it.
<ns0:MT_Common xmlns:ns0="urn://test_ns">
<ns1:MT_Type1 xmlns:ns1="urn://test_ns1"> (Occurence 0..1)
...
</ns1:MT_Type1>
<ns2:MT_Type2 xmlns:ns2="urn://test_ns2"> (Occurence 0..1)
...
</ns2:MT_Type2>
</ns0:MT_Common>
In file sender channel I would use MessageTransformBean with XSL transformation to fill the message part according to source message structure.
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="urn://test_ns">
<xsl:template match="/">
<ns0:MT_Common>
<xsl:copy-of select="."/>
</ns2:MT_Common_Structure>
</xsl:template>
</xsl:stylesheet>
And actually ... that's all. You'll have source message filled with data of one of your types and during further processing you are able to determine receiver/interface from message contents.
IF //ns1:MT_Type1 Exists Then ...
or
IF //ns2:MT_Type2 Exists Then ...
Regards, Evgeniy.
Instead of FCC in the communication channel, better to write an adapter module to read those files.
- Nikhil Bose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.