File Adapter: Flat-file to XML
New to the Oracle ESB.
I am using the file adapter to read in a fixed-length flat file, have mapped it to an xsd and now I just want to dump the resulting xml into a directory. I don't see an obvious way to do this without converting it back to a flat file (by pointing the file writer back to a similar flat file xsd). Missing something obvious?
Thank you!
File Adapters content conversion does not supprot such a nested strucutre currently.
The only format supported is the one shown in ths link,
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Either write a module that will do this conversion or Change the datatye for the source to the format shown in help.sap.
Regards
Bhavesh
Similar Messages
-
Sender File Adapter: Flat file content conversion to "multileveled" XML
Hi all,
I would like to do following conversion with file adapter:
- Input flat file schema:
A...
B,,,
C:::
- Desired XML form:
<mesage>
<A>
<B>
<C>:::</C>
</B>
</A>
</message
>
All found examples (internet or XI documentation) do offer only "flat" XML option:
<mesage>
<A>...</A>
<B>,,,</B>
<C>:::</C>
</message>
Does anybody have an idea ?
Thanx and regards
JuricaFile Adapters content conversion does not supprot such a nested strucutre currently.
The only format supported is the one shown in ths link,
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Either write a module that will do this conversion or Change the datatye for the source to the format shown in help.sap.
Regards
Bhavesh -
XML File to Flat File scenario: Reciver file adaptor content conversion
Hello Friends,
Currently I am working on XML File to Flat File Scenario.
I used receiver side File adaptor with content conversion.
My receiver side adaptor is giving error. Error is given below.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
My content conversion parameters are as:
row.fieldNames Customer_ID,Name,Address,Phone
row.fieldSeparator ,
row.processConfiguration FromConfiguration
row.endSeparator 'nl'
Can you please suggest me what kind of error is this?
Regards,
NarendraStill I am facing below given issue.
2010-06-08 15:34:25 Error File adapter receiver channel CC_Customer_FlatFile_Distination is not initialized. Unable to proceed: null
2010-06-08 15:34:25 Error Exception caught by adapter framework: Channel has not been correctly initialized and cannot process messages -
Flat File to Flat File Scenario using File Adapter
Hi Experts,
In my scenario, requirement is Flat File to Flat file through File Adapter in PI. At sender end, we would need to use Sender File Adapter (NFS) and receiver end we would need to use Receiver File Adapter (FTP). File would be coming as a encrypted format, and the file needs to be sent in encrypted format.
Any idea how to proceed with this requirement would be helpful.
Thanks and Regards
SoumyaHi Soumya,
You need to choose the FTP in the "transport protocol" option. Then in the FTP connection parameters choose the option Connection Security and assign the value "FTPS for control and Data Connection". Then the "Command Order" will show up below that option and you could leave the default value itself. If you are using Public private key certificates of X.509 then you could choose the option "Use x.509 certificate for client authentication" and assign the values to the "keystore" and "certificate & private key" fields.
Note: To use the FTP with SSL you need to add the CA certificate to the TrustedCAs keystore view.
Regards,
Vishnu. -
File Adapter and reading all XML files from direcotry
Problem occurs on PI 7.1
I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
Quality of service is: Exactly One.
Poll Interval: 30
Retry interval: 30
Processing mode: Archive with option "Add Timestamp".
Processing sequence: by name.
I though that with above configuration my File Adapter will be reading folder for all coming XML files. But somehow it is reading XMLs only when I'm activating it in Integration Builder.
Any idea what can cause such strange problem?Hi Tomasz,
As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
If that is the case, then the issue might be with the Cache.
1. Clear the cache from the Integration Builder.
2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
Thanks, -
Reg error in flat file to flat file scenario
Hi techies,
Iam just starting working with XI scenarios.
In base flat file to flat file scenario which is mentioned in wiki.sdn
http://wiki.sdn.sap.com/wiki/display/XI/FLATFILETOFLATFILE
I had completed entire scenario. After generating sender file. Iam getting this error in runtime work bench.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'CONTACTS.EMP.fieldFixedLengths' or 'CONTACTS.EMP.fieldSeparator' is missing
Please suggest how to resolve this error.
Thanks in advance,
Regards,
KiranHi,
From your error description,
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'CONTACTS.EMP.fieldFixedLengths' or 'CONTACTS.EMP.fieldSeparator' is missing
it is clear that you have missed out either or both the 2 parameters in receiver file adapter content conversion, namely EMP.fieldFixedLengths and EMP.fieldSeparator.
From the example that you followed, use the following values for the 2 parameteres is the output file is a comma separated file:
EMP.fieldFixedLengths: 8,10,10
EMP.fieldSeparator: ,
I have assumed that the lengths of the fields NAME,ADD,MOBILE are 8,10 and 10 respectively. Change them according to your requirement.
Use any other value in place of comma(,) in EMP.fieldSeparator according to the requirement.
Hope it helps you buddy!!!
Thanks
Biswajit
Edited by: 007biswa on Feb 22, 2011 9:25 AM
Edited by: 007biswa on Feb 22, 2011 9:28 AM -
Hi,
I am doing an interface (Flat file to Flat file)
The input file fields are separated by delimiter @!.Which will have multiple records like LEVEL1,LEVEL2,LEVEL3
Input Flat file
Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status
Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order
Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order
Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status
Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order
Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order
Level1@!PoNo@!ShortText@!StDate@!EndDt@!Vendor@!Status
Level2@!PoNo@!L2id@!L2desc@!L2stdt@!L2ensdt@!L2plant@!order
Level3@!PoNo@!L2id@!L3id@!L3stdt@!L3enddt@!order
Output file
The outfile fields are separated by tab delimiter
<L1> L1Pono L1desc L1stdt L1enddt L1hr L1cost L1vendor L1misc L1status
<L2> L1Pono L2ID L2desc L2stdt L2enddt L2priority L2loc L2plant L2order
<L3> L1Pono L2ID L3ID L3desc L3stdt L3enddt L3work L3emp L3order
The outfile fields are separated by tab delimiter
<L1> L1Pono L1desc L1stdt L1enddt L1hr L1cost L1vendor L1misc L1status
<L2> L1Pono L2ID L2desc L2stdt L2enddt L2priority L2loc L2plant L2order
<L3> L1Pono L2ID L3ID L3desc L3stdt L3enddt L3work L3emp L3order
Do I need to use file content conversion?how do I replace the delimiter?
Can you please tell me how to do this,appreciate you help.Let me know if you need more info.
Points will bw rewarded
ThanksHi Guys,
Thanks for all the replies.I have done all necessary things for sender and reciver communication channels.I am pretty sure the sender CC is fine,but I am not sure of the receiver CC.The file is not being picked up at the sender side.In went and saw the adapter monitoring,it shows me the below error
Receiver Adapter v2405 for Party '', Service 'BS_XIX_010':
Configured at 2008-04-21 09:44:11 CDT
History:
- 2008-04-21 09:44:11 CDT: Error: Conversion initialization failed: Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
In the receiver CC I am giving the following details,is there anything I am missing,do I need to check the Advanced mode in the CC and give info there?
LEVEL1.fieldSeparator ,
LEVEL2.fieldSeparator ,
LEVEL3.fieldSeparator ,
LEVEL1.endSeparator 'nl'
LEVEL2.endSeparator 'nl'
LEVEL3.endSeparator 'nl'
Thanks -
Error in Receiver File adapter using File content Conversion
Hi,
I am getting the following error in the receiver file adapter.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
I am using the below parameters for FCC:
Recordset Structure - statement
statement.endSeparator - 'nl'
statement.fieldSeparator - '0X09'
statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
ignoreRecordsetName - true
Please let me know where i am going wrong.
Thanks,
AparnaHi Aparna,
I feel the problem in your content conversion parameters is with
statement.fieldNames and ignoreRecordsetName
When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
[http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
Hope this helps !!
Regards,
Amit -
File Content Conversion i.e Flat file 2 Flat file
Hi guys,
I am new 2 SAP XI
and i am trying 2 do "Flat File To Flat File".
Input File contains following data:
Name:varun
Surname:rajaraman
Address:B-2
Employee no:8204
i.e Each Data is in separate Row.
Output File Should contain the following data:
I am varun rajaraman staying at B-2 bearing employee no. 8204.
(name,surname) (address) (Employee No.)
i.e data should be in a single row.
So, i have a problem of reading the data from input file i.e data from each row and transfering it into output file along with which i need 2 insert "i am " ,"staying at", etc.
pls tell me the procedure in detail.
Thanks and regards
santhosh rajaramanHi,
Check this links for file content convertion.
File content conversion sites
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani
Reward Points if Helpful -
Flat File to Flat File scenario
Hi all,
I have a flat file to flat file scenario. I pick up a file in a specific format and produce a flat file in tab delimited format after some mapping.
Everything is ok. All the functionality is working perfectly. However, there is one small error. In case the source file is empty, there is an error message in SXMB_MONI (which is correct as there is no XML content) but I still need to generate an empty output file.
Is this possible ? Can I change something at the 'File Content Conversion' level ?
Any advise will be highly appreciated.
Thanks,
Freddy.Hi Freddy,
>>>Problem while determining receivers using interface mapping: Error while determining root tag of XML: BOM / charset detection failed.
The charset of the XML cannot be determined. That is written clearly in the message.
Is your XML belongs to UTF-16 or UTF-32? Then it needs a BOM which is missing.
Have a look at below link.
http://en.wikipedia.org/wiki/Byte-order_mark
Check, if there is an XML header and which charset is mentioned.
Regards,
P.Rajesh -
Procedure to save the output of a query into excel file or flat file
Procedure to save the output of a query into excel file or flat file
I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
I have run the query --
DECLARE @cmd VARCHAR(255)
SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
Exec xp_cmdshell @cmd
error message--
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
NULL
Goel.AmanHello,
-T:
Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
login_id, and password are not required. If
–T is not specified, you need to specify
–U and –P to successfully log in.
-U:
Specifies the login ID used to connect to SQL Server.
Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
-T option (trusted connection) instead of the
user name and password combination
I would suggest you take a look at the following article:
bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
A similar thread regarding this issue:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
Regards,
Elvis Long
TechNet Community Support -
File Adapter or File Transport which one will give more performance
Hi all,
File Adapter or File Transport which one will give more performance ? in OSB?
Which one to select any one did performance analysis?
Thanks
PhaniWhy don't you just go read some benchmarks?
http://www.barefeats.com/mbpp18.html -
Sender File Adapter with file conversion
Hi guys,
Im using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
An example:
value1 <b>value2</b> value3
I want to ignore <b>value 2</b> but I cant find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
Thanks in advance,
Ricardo.hi,
there always is another way:)
you can import the whole line to one field
and cut it inside the adapter module
(then you can define start and stop of the substring that you need to use)
but of course it's not standard even though it's quite easy to achieve in java
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
MessageTransformBean in sender JMS Adapter flat file to xml conversion
Hi All,
The scenario is MQ (Flat File ) --->PI -
>Idoc
The flat file structure is
112233
AABBCC
The expected XML Structure after using MessageTransformBean in the sender JMS adapter is
<Record>
<Row>
<f1>11</f1>
<f2>22</f2>
<f3>33</f3>
</Row>
<Row>
<f1>AA</f1>
<f2>BB</f2>
<f3>CC</f3>
</Row>
</Record>
But I am getting 2 SEPARATE xml messages each with only one Row in it like the following
1st XML:
<Record>
<Row>
<f1>11</f1>
<f2>22</f2>
<f3>33</f3>
</Row>
</Record>
2nd XML:
<Record>
<Row>
<f1>AA</f1>
<f2>BB</f2>
<f3>CC</f3>
</Row>
</Record>
I would like to have one xml message with all rows in it.It seems the MessageTransformBean is not recognizing the end of line in the flat file.Do i need to use endSeparator explicitly.
I followed the "How to use Content Conversion in JMS Adapter " and configured the adapter,still no luck..
Any Help greatly Appreciated
Thanks,
CHi Chirag,
The parameter name sequence changes alphabetically by itself when I save and activate it eventhough I enter as it is in the document.How to stop changing this sequence or put it the order as required in the Module Processor.
Currently my sequence is
Transform.Class
Transform.ContentType
xml.conversionType
xml.documentName
xml.documentNamespace
xml.fieldFixedLengths
xml.fieldNames
xml.processFieldNames
xml.structureTitle
Let me know how to change the sequence ,if that is the issue.
Thanks,
C -
Mail adapter flat file attachment
Hi,
From my limited knowledge of XI, I know that we can send an email attachment as an .xml file or a binary file. My question is how can I send a flat file as an attachment using XI's mail adapter? If this is possible, please suggest steps how to do this as I am clueless!!
Thanks for your help...
ChanduHi,
check out this Blog you will be able to do it.
You can do either using Mail package or just using Mail adapter.
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
Thanks,
Prakash
Maybe you are looking for
-
Build Fails for Alsaplayer in ABS
Hi all, I couldn't get alsaplayer to run in GUI mode, but I found this thread that had the answer: http://bbs.archlinux.org/viewtopic.php?id=42168. So I followed the ABS wiki's directions for setting up ABS and I tried to run for alsaplayer (with th
-
My itunes radio is not working on my microsoft computer. I downloaded the new itunes but it says there is an error in my itunes store. What do i do to fix the problem?
-
How to import images of websites into FCP....any ideas?
Hi, I was asked to cut several trailers for an award show. Which is nice. However, they have this category about "best website", and of course, they want to use images of those websites, the banners, the headlines and so on. I don't mean single image
-
In line view works in 9i but not 11g
The following subset of a larger in ilne view works in 9i, but not in 11g. Any thoughts on why it doesn't work in 11g. An 'ORA-00979 : not a group by expression' message is displayed. This error message refers to the last 'group by' statement. select
-
[HELP] Nokia Lumia 610 Camera Problem
Hello, I have a problem, a few days ago my camera was working fine, but from yesterday when i try to open the camera, it's opening and closing imediatly... what it's wrong ? what i need to do ? Please help me with this issue. Regards. Solved! Go to