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.
Comments
4 comments
If you don't have an answer, could you please give me some example code for using submitImage and processFields
To let us investigate the issue, please share or send to CloudOCRSDK@abbyy.com some additional information:
Unfortunately, we have not got a ready Ruby sample for the submitImage and the processFields methods, but we can recommend the following links:
The issue occurs due to an error in your XML-file: the "applyTo" attribute is required for the "page" element name:
Please sign in to leave a comment.