on 10-14-2022 6:08 PM
Hello experts,
I am trying to manually create an XSD schema from a fixed-length text file to upload as a source schema in message mapping. The target schema was provided on the API hub in a WSDL file. Since the TXT file does not have any headers attached, what would be the best way to do this? I know the field names, starting points and lengths, but I am unsure of how to format the schema from the TXT file.
Any guidance on this would be greatly appreciated.
Thanks,
Alex
Hi,
There is no standard way to convert Fixed length file to xml in SAP CPI, You need to write script. Refer to below sample blog-
https://blogs.sap.com/2019/02/14/convert-flat-file-into-xml/
Once xml is created through groovy then you can create xsd through online tool xml to xsd converter.
Regards,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use https://www.convertcsv.com/csv-to-xml.htm. You need to use random headers to be used for XML element names. You may want to create a dummy header like field1, field2 etc. Then convert the flat file to XML. Then use the XML to generate XSD using online tools.
Or you could simply use CPI iFlow to convert CSV to XML. Then use the XML to generate XSD using similar online tools.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
7 | |
7 | |
7 | |
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.