on 06-02-2008 2:28 PM
Hi All,
My Scenario :
1) Im my scenario i need only the "FileName" of the File when picked up by the Sender File Adapter.
2) Rest Content of the File need not be in the XML file format.
Now what i did was developed "File Adapter Module " to get the "FileName" when picked up by the Sender File Adapter.
Outcome : When i put the developed module at first and put the file in specified folder allowint the Sender file Adapter to pick up. Now Everything is fine working when one kind of File is placed as per my Content Coversion paramaters.
Actual : My Client would place file of any kind (.jpeg -> Mostly , gif ) i need to get only the file name in the Outbound interface , which i would split it further to my Target Interface.
How could i achieve this , when i took away this content conversion , in sxmb_moni it shows error.I need only the filename in the Outbound not the Content , moreover the hit is i donot know what could be content of my file as it could be different and varing , so i could not set particular content conversion paramters:
Second Question:
Now my outbound XML interface looks as below when i test with a file , with proper content conversion paramerters:
<?xml version="1.0" encoding="UTF-8" ?>
- <MT_DMS_FINAL>
- <Record>
- <Row>
<FirstName>2323_eer_rtr</FirstName>
</Row>
</Record>
<FileName>d:\mdmtest\srinivaS\padusrini.txt</FileName>
</MT_DMS_FINAL>
Well i have designed in my MI only FirstName , how to capture this element "FileName" which i can use it in mapping , if i have to write any UDF to capture it ,please guide me.
thx in advance for u r help
with regards
Srini
Hi,
What you can do is
1.) Configure your sender file adapter content conversion in such a way that the whole file content (whatever it may be i.e meaningful or senseless data) in a single record. Next you can ignore this record in Message mapping.
Use the Adapter Specific Message Attributes to get the filename from the header using DynamicConfiguration.
OR
2.) If you are not able to capture the whole content in a single record then in your adapter module modify the content of the file to be blank or something you desire.Again then you can use DynamicConfiguration to get the filename which you picked.
regards
Edited by: Progirl Progirl on Jun 3, 2008 8:48 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for all
It got resolved by the below content conversion paramaters
Row.fieldNames : FirstName
Row.fieldFixedLengths : 1
Row.processFieldNames : fromConfiguration
Row.additionalLastFields : ignore
Row.missingLastfields : ignore
Now i get my Outbound Xml as below
<?xml version="1.0" encoding="UTF-8" ?>
- <MT_DMS_FINAL>
- <Record>
- <Row>
<FirstName><</FirstName>
</Row>
</Record>
<FileName>d:\mdmtest\srinivaS\mapping.mte</FileName>
</MT_DMS_FINAL>
I have wriiten a Adapter Module to get the : File Name here "mapping" how to capture this in the UDF
Kindly advice
srini
Hi,
so in one word - you want to transfer only FileName, not a content right?
then you don't need to develop adapter module for this.. it can be read in message mapping as a dynamic parameter.
source structure
<MT>
<X>
</MT>
target structure
<MT>
<FileName>
</MT>
in mapping assign the filename value to filename target.
in source - create file conversion for keyField.. assign keyFieldValue a value, which will never occur in the file (like *-+/ etc). this will ensure, you will send empty document, which will be mapped only to filename.
Peter
Edited by: Peter Jarunek on Jun 2, 2008 3:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ya Exactly ,
My concern on spot is : I donot know what would be the content of file or format of file , i just pick now file of all kind , that working , but when it comes display of file in XML , because when i donot bother about of content and run my Adapter Module it"s not working , unless i statisfy the file content convesion paramters ,which is not same and sometimes i get .jpeg file also
how to go ahead
With regards
Srini
Do u mean "Adapter Specific" Configuration ,
One more doubt if i put a .jpeg or .gif file (I would not know how to design my Outbound Interface).
My feeling is that if i donot have proper Outbound Interface then there would be a error , is it so
Am confused , but u have showed outbounb interface as "FileName"
How to achieve kindly guide
Srini
In this case , i think we no need to develop outbounb interface , it enough we dynamically get the file name and then map to target in terface,
if above it correct how to get dynamically the file name , in outbound interface as shown by you and what could be the UDF for that to get the FileName.
Kindly help me out
with regards
Srini
Hi,
do it exactly as I told you. The point is, when you set up content conversion appripriately, this will send no value.. but it is what you need. and then, in the mapping, read the filename and send it to target.
>In this case , i think we no need to develop outbounb interface , it enough we dynamically get the file name and then map to target in terface,
Of course you need an outbound interface
for UDF how to get the filename check this
Peter
Hi My Outbound Interface is below as shown:
<?xml version="1.0" encoding="UTF-8"?>
<MT_DMS_FINAL>
<Record>
<Row>
<FirstName/>
</Row>
</Record>
</MT_DMS_FINAL>
In my scenario am not sure at if the file has any conteant , most of times it has .jpeg , .gif format. I need only filename to be read, whether i use developed Adapter module ot i use "Adapter Specific Attributes" later i can capture using UDF.This could be done.
All my problem how to design my Outbound Interface and set the Content Conversion for getting in all kinds of file in .
For Example : i have two files : Test.txt , TestPic.jpeg , both are different , how write common outbound interface and get only file name , am least bothered about the content of file. i donot need.
If u r answer is use ... keyfield in Content conversion .. how can i do it kindly guide me witrh example if possible.
Thanks in advance
srini
Hi Guys ,
Can i use File Content Conversion for .pdf document , my pdf doc content is not known, means it"s a complete info doc.I may get .jpeg any picture or drawing.
I thought i can use below file content conversion paramters:
Document Name : MT_DMS_FINAL
RecordSet Name : Record
RecordSet Structure : Row,*
Row.fieldNames - FirstName
Row.fieldSeparator - ;
Row.processFieldNames - fromConfiguration
Row.additionalLastFields - ignore
Row.missingLastfields - ignore
Now i put a pdf doc of unknown content , and my assumption was some set of charater would be dumped in XML and rest would be ingonered which is least bothered part in my scenario , unless i get the filename from runtime ot Adapter module developed
But in RWB CC monitoring i see below error :Error: org.xml.sax.SAXParseException: Illegal XML character: .
Any views on this , can any one help me out with the above requirment. Hope u guys got wat am trying to put out here
thx in advance for u r help
with regards
Srini
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.