Getting Internal Server Error when trying to use processFields on a submitted image.

  • 1.3K Views
  • Last Post 09 September 2014
  • Topic Is Solved
Paul Mancuso posted this 05 September 2014

I am trying to read empty and square checkboxes using sumbitImage and processFields using this XML file.

<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://ocrsdk.com/schema/taskDescription-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ocrsdk.com/schema/taskDescription-1.0.xsd http://ocrsdk.com/schema/taskDescription-1.0.xsd">
  <fieldTemplates>
      <checkmark id="checkmarkBox">
          <type>square</type>
          <correctionAllowed>true</correctionAllowed>
      </checkmark>
      <checkmark id="checkmarkField">
          <type>empty</type>
          <correctionAllowed>true</correctionAllowed>
      </checkmark>
  </fieldTemplates>
  <page>
      <checkmark template="checkmarkBox" id="r-1-c-1" left="145" top="777" right="170" bottom="795" />
      <checkmark template="checkmarkField" id="r-1-c-2" left="555" top="140" right="655" bottom="280" />
  </page>
</document>

This is how I am posting to RestClient

response = RestClient.post("#{BASE_URL}/submitImage", :upload => {
  :file => File.new(FILE_NAME, 'rb')
})

This works just fine and the status that is returned is "Submitted". I then take the taskId from that response and do:

RestClient.post("#{BASE_URL}/processFields?taskId=#{task_id}", :upload => {
  :file => File.new(XML_FILE_NAME, 'rb')
})

after I run the code all that I get back is this error

<?xml version="1.0" encoding="utf-8"?><error><message language="english">Internal Server Error</message></error>

I can't find the error, Please someone help.

Order By: Standard | Newest | Votes
Paul Mancuso posted this 09 September 2014

If you don't have an answer, could you please give me some example code for using submitImage and processFields

SDK_support posted this 09 September 2014

To let us investigate the issue, please share or send to CloudOCRSDK@abbyy.com some additional information:

  1. the name of your application,
  2. the image you recognize,
  3. logs from any HTTP debugger (for example, Fiddler).

Oksana Serdyuk posted this 10 September 2014

Unfortunately, we have not got a ready Ruby sample for the submitImage and the processFields methods, but we can recommend the following links:

  1. The Ruby sample for the processImage method,
  2. The Java sample for the processFields method,
  3. The sample xml file for the processFields method and the corresponding image.

Oksana Serdyuk posted this 13 September 2014

The issue occurs due to an error in your XML-file: the "applyTo" attribute is required for the "page" element name:

<page applyTo="0,1">

Close