Community

FlexiCapture 10 WebServices

Hi,
I am just wondering that is there any way to call Flexicapture 10 Webservice to pass an image and get xml response back? Just like the OCR SDK. If it is possible please point me to relevant sample or little API calls to achieve it.

Thanks in Advance.
0

Comments

11 comments

  • Avatar
    Matt247
    farukhali, you can find the answer in the help "FlexiCapture API", chapter Processing multiple documents in one batch. There is an example how to upload a file and how to get it.
    0
  • Avatar
    farukhali
    Thanks for your reply.

    Basically I have to use ProcessBatch method and then wait in loop for the completion of batch. Is there any better way of doing this?







    0
  • Avatar
    POG
    Thanks for your reply. Basically I have to use ProcessBatch method and then wait in loop for the completion of batch. Is there any better way of doing this?


    farukhali, if you want to get the result you need to wait before the document will be processed. Using loop is quite an easy method for that. Probably I can't fully understand your task - can you describe it in detail?
    0
  • Avatar
    Sushi

    farukhali,

    Even on the engine side, I could have swore you have to make a call to get the results too. It been a while since I looked at the engine sample file so I could be wrong. In any case with the FlexiCapture App Web Service, you need to make a call to get the results. The only way to automatically get an XML result back to to create an unintended workflow and for the export, create a custom script to push it back to your server. Of course in this case, you are just waiting for the result and if there is any export error, you won't know until you check the Admin and Monitoring console. Is there a reason why you can do what Pog mention and loop?
    0
  • Avatar
    farukhali
    Thanks for your reply guys. I appreciate it.

    Well I been worked on engine as well on the same way. Actually in my current implementation performance is critical, I was just wondering if there is any direct synchronous call to service to get the results back for a particular project.

    Looks like the way engine works probably wait is inevitable.



    0
  • Avatar
    farukhali
    Okay now I am facing another related issue. The LoadDocumentResult method is not returning recognized data back. The workflow type of project is unintended. The export data format is XML and it is set to export to DB. I can see that data is coming in the DB. But the File object returned by the LoadDocumentResult method contain null in bytes field. what configuration I got wrong here?
    0
  • Avatar
    Sushi


    Farukhali,

    More than likely, since you are exporting the results out of the system, it can't get the results. Instead of exporting out to DB, try disabling that and just select the option to export to file but don't put a direct path in the export location. i.e. just Export. Also in the Export root path, remember to leave it blank. I remember in FC9 helpfile, it used to mention this as the proper steps for the Web Service API but in FC10, I don't think its as obvious or listed anymore.
    0
  • Avatar
    farukhali
    Thanks for your reply again.

    I am using export option "Export to data file", data format is xml, Target is "Create Folder structure and file name using template", export path is "Export". I am attaching a snapshot of document settings.
    Saving document settings saying that "Relative path Export is specified. The files will be exported to Application Server.... "

    Export root path at project is empty. Any help would be appreciated.


    0
  • Avatar
    Sushi


    farukhali,

    Is that the only export you have? It sounds like it might be the way you are calling the results. I'm not a programmer but here is a code snippet on how one of my developer call the results. Maybe this will help you.

    FlexiCapture.File file = service.LoadDocumentResults (documentId, result[x]);
    XmlDocument doc = new XmlDocument();
    MemoryStream ms = new MemoryStream(file.Bytes);
    doc.load(ms);


    0
  • Avatar
    farukhali
    what is result[x] in following line of code? I assumed, since results are coming from application server this is new file name that will be created after execution of this method.
    FlexiCapture.File file = service.LoadDocumentResults (documentId, result[x]);


    0
  • Avatar
    farukhali
    Thanks Sushi for your help. Appreciate your help.

    File name has to be exact name that is generated on server and it can be found using following method.

    var resultList = service.GetDocumentResultsList(document.Id);
    0

Please sign in to leave a comment.