on 04-30-2007 3:48 PM
hi all,
I have a Input file
It has the following structure:
<?xml version="1.0" encoding="utf-8"?>
<n0:rfc_proxy_message_type xmlns:n0="http://kpr.com/sample">
<Name>abhishek</Name>
<Age>10</Age>
</n0:rfc_proxy_message_type>
I use a File to File Scenario, with Sender and receiver FTP adapters.
I would like to convert this file at the recieveing end into a flat file as follows:
Name Age
abhishek 10
How can I do so?
Can anyone please help.
Thanks,
Best Regards
Abhishek
Hi,
Your Xml file should be like this.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Employee_MT xmlns:ns0="http://sap.com/demo">
<Recordset>
<item>
<Name>vinod</Name>
<Id>12</Id>
<Age>30</Age>
<Sex>male</Sex>
</item>
</Recordset>
</ns0:Employee_MT>
In the content conversion parameters mention the following
Document name: Student_MT
Document Namespace: enter your namespace
RecordsetName: Recordset
Recoedset Structure: item,*
item.endSeparator = 'nl'
item.fieldSeparator= ,
item.fieldnames= Name,Id,Age,Sex
Hope this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Abhishek,
if u want o/p as :
<i>>>>Name Abhishek
>>>Age 10</i>
then try this :
Input structure :
HEADER (occurance 1..1)
---Name (occurance 1..1)
---Age (occurance 1..1)
here Name & Age r inside HEADER.
Output Structure :
NAME (occurance 1..1)
---Name (occurance 1..1)
AGE (occurance 1..1)
---Age (occurance 1..1)
Here Name is inside NAME & Age is inside AGE
in ur Receiver Communication channel:
Recordset Structure : HEADER,AGE
HEADER.beginSeparator : Name
HEADER.fieldSeparator : ,
HEADER.endSeparator : 'nl'
AGE.beginSeparator : Age
AGE.fieldSeparator : ,
AGE.endSeparator : 'nl'
Thanks,
Maheshwari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ahmad,
I Tried what you had suggested,
In the record set structure i have specified name,1, age,2
The communication channel in the RWB gave an exception:
java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'Name.fieldFixedLengths' or 'Name.fieldSeparator' is missing
Hence the channel was not initalized.
Can you please comment.
Thanks,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
>>In the record set structure i have specified name,1, age,2
it must be Recordset,on receiver side we dont specify it like this,
secondly can u mail me a snapshot of ur sender and receiver data type,i m getting the impressin that ur data type is not correct
mail me at ansari.xi@gmail.com
thanx
ahmad ansari
Hey
u have to change ur XML structure to the following
<?xml version="1.0" encoding="utf-8"?>
<n0:rfc_proxy_message_type xmlns:n0="http://kpr.com/sample">
<Recordset>
<Name>abhishek</Name>
<Age>10</Age>
</Recordset>
</n0:rfc_proxy_message_type>
and the give parameters as
Recordset Structure = Recordset
Parameters will be as follows:
Recordset.endSeparator = 'nl'
Recordset.fieldSeparator= ,
The XML which u have right now wont work for FCC as its not contained under one tag
thanx
ahmad
Message was edited by:
Ahmad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.