cancel
Showing results for 
Search instead for 
Did you mean: 

File to Webservice

Former Member
0 Kudos

Hello,

I have a question regarding a file to webservice interface::

1)I need to build only one interface
2)The file can be .xls,.pdf,.jpeg or anything. But there is no guarantee it will be of any one kind.Can be all of them together.
3)The contents are also different and is dynamic.Could be an image, or image plus text or just text. This content is and will be always unknown.
4)Can i read the file content and its filename?
5)If at all i can read the data, then i need to map it in the service.

I have no clue regarding this. Please suggest.

Best Regards,

Sanghamitra

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can thing of splitting it into multiple interafces...what u can do is have one dummy file to file interface which picks the file from source folder and depending upon the file extension place (under RD check the file name extension using context object "FileName" and chk ASMA) the jpeg, pdf , txt etc in diff locations (may be under PI AL11 directory) and then implemet the individual interfaces for each of the extension type.

Thanks

Amit Srivastava

baskar_gopalakrishnan2
Active Contributor
0 Kudos

For your first three questions

Answer:

It seems you have multiple requirement for the single interface.  If your file has content to read and need mapping the you need to create both ESR/design and configuration objects. if your file type is just jpeg or some image you dont need to create design objects. In that case you can do only with configuration objects. IMO, if you get a file type of various data format then you can't achieve using the same interface. If you get different file types but no need to read the content and do mapping then you can achieve with single interface. Just move the file from one system to another. If you need to read excel files then there are third party tools or conversion agents available to convert xls to xml.

4) Can I read the file content and its filename?

Yes.

5)If at all i can read the data, then i need to map it in the service. 

Yes. You can do this.

rajasekhar_reddy14
Active Contributor
0 Kudos

If you are not using ESR objects then it is not pooisble to read file name,in your case you can dump file from ftp to other location.

Reading file content using one interface not possible because Image and PDF file required work around.

.XLS file use adapter module and different interface to convery .xls file to xml file format and reading file name also possibloe,

.text file use file content conversion and one more interface.