on 07-08-2013 10:48 AM
Hi gurus
I have a problem trying to convert a text file to XML.
The structure is like this:
<Recordset>
<Record>
<Field1>
<Field2>
<Field3>
...
</Record>
<Record>
<Field1>
<Field2>
<Field3>
...
</Record>
...
</Recordset>
When i use SimplePlain2XML the record tag is missing, when i use StructPlain2XML, PI ask for key values
What could be my problem?
Kind regards
Hi Javier,
As mentioned by Satish please look into the above thread.
For the given XML structure by you, include the parameters mentioned in the SimpleConversion in the above document in the CC along with the modified parameter value that i have mentioned below
provide the xml.documentName : Recordset ,
xml.structureTitle : Record ,
xml.fieldNames : Field1,Field2,Filed3..
xml.fieldFixedLengths if it is a fixed lenght fields else go for the xml.fieldSeparator
Thanks
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sai
Sorry I missed the document in my first post.My xml needs to be like this
<INT00_Interface_MT xmlns:ns="urn:xxxx.com:xxx:xxxx">
<Calendars>
<Calendar>
<Field1>
<Field2>
<Field3>
...
</Calendar>
<Calendar>
<Field1>
<Field2>
<Field3>
...
</Calendar>
...
</Calendars>
</INT00_Interface_MT>
So, the content conversion will be like this using content conversion parameters in adapter(already running):
Now, I need to reproduce this behaviour with MessageTransformBean module
Thanks for your help
Hi Javier,
Should be something like below
Specifications in the Module Configuration of Module Pocessor
Module Key | Parameter Name | Parameter Value | |
Plain2XML | Transform.Class | com.sap.aii.messaging.adapter.Conversion | |
Plain2XML | Transform.ContentType | text/xml;charset=utf-8 | |
Plain2XML | xml.conversionType | SimplePlain2XML | |
Plain2XML | xml.processFieldNames | fromConfiguration | |
Plain2XML | xml.documentName | INT00_Interface_MT | |
Plain2XML | xml.documentNamespace | urn:xxxx.com:xxx:xxxx | |
Plain2XML | xml.structureTitle | Calendar | |
Plain2XML | xml.fieldNames | field-name1,field-name2,field-name3 | |
Plain2XML | xml.fieldSeparator | | | |
I am not sure why you have nested Calendar under Calendars. You can simply have a data type without node Calendars. Calendar should be 1...unbounded.
Ambrish
Hi Ambrish and Bhavani
I have tested this solution already, as you said, the xml generated miss the <calendars> tag.
My requirement needs the given structure and i wanted to maintain that structure. With this solution I have to change the structure and change the mapping or create a new mapping that match the new structure to the existing one.
I can't believe that MessageTransformBean can't reproduce the same configuration that i used in a file adapter.
Thanks for your responses
Javier
Hi Javier,
You can do some hit and trial:
Plain2XML | xml.structureTitle | Calendars |
Last option would be to change the data type, see if you can read the file and then the mapping...
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Javier,
Please have a look to below thread
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
Thanks,
Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.