Skip to Content
author's profile photo Former Member
Former Member

File to Webservice

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 28, 2012 at 04:04 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 28, 2012 at 04:42 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 28, 2012 at 04:54 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.