I'm trying to follow the steps in the documentation for "Scanning Documents" in the Developer help file. I was successful with the following steps:
- Connect to Web Services API
- Open a session
- Open a project
I'm stuck on "Create a new batch". When I try it using SoapUI I get the following error:
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>SOAP Invalid Request</faultstring>
<detail>
<ServerFault xmlns="urn:FlexiCaptureExceptions">Fatal error: Unspecified error(9, 22 )</ServerFault>
</detail>
</soap:Fault>
Here is the original Soap request that produces the error. I added some spaces to prevent the forum from inserting emojis in the text.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:flex="urn:http://www.abbyy.com/FlexiCapture">
<soapenv:Header/>
<soapenv:Body>
<flex:AddNewBatch>
<flex:sessionId>23</flex:sessionId>
<flex:projectId>1</flex:projectId>
<flex:batch>
<flex:Name>Test</flex:Name>
</flex:batch>
<flex:ownerId>3</flex:ownerId>
</flex:AddNewBatch>
</soapenv:Body>
</soapenv:Envelope>
The session id is a session that was opened successfully, and the project id is a project that was opened successfully. The ownerId is the id of a user with admin rights.
FlexiCapture version is 12.0.1.475 distributed.
コメント
6件のコメント
Hello,
I was able to reproduce your issue. You have to to specify all the parameters when creating a batch with the help of the SOAP ui.
Here is the request that has worked for me and the batch was created.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:flex="urn:http://www.abbyy.com/FlexiCapture">
<soapenv:Header/>
<soapenv:Body>
<flex:AddNewBatch>
<flex:sessionId>5942</flex:sessionId>
<flex:projectId>1</flex:projectId>
<flex:batch>
<flex:Id>3</flex:Id>
<flex:Name>test</flex:Name>
<flex:ProjectId>0</flex:ProjectId>
<flex:BatchTypeId>0</flex:BatchTypeId>
<flex:Priority>0</flex:Priority>
<flex:Description>desc</flex:Description>
<flex:HasAttachments>false</flex:HasAttachments>
<flex:Properties>
<!--Zero or more repetitions:-->
<flex:RegistrationProperty>
<flex:Name>reg</flex:Name>
<flex:Value>reg</flex:Value>
</flex:RegistrationProperty>
</flex:Properties>
<flex:CreationDate>131413861820000000</flex:CreationDate>
<flex:DocumentsCount>0</flex:DocumentsCount>
<flex:PagesCount>0</flex:PagesCount>
<flex:RecognizedSymbolsCount>0</flex:RecognizedSymbolsCount>
<flex:VerificationSymbolsCount>0</flex:VerificationSymbolsCount>
<flex:UncertainSymbolsCount>0</flex:UncertainSymbolsCount>
<flex:AssembledDocumentsCount>0</flex:AssembledDocumentsCount>
<flex:RecognizedDocumentsCount>0</flex:RecognizedDocumentsCount>
<flex:VerifiedDocumentsCount>0</flex:VerifiedDocumentsCount>
<flex:ExportedDocumentsCount>0</flex:ExportedDocumentsCount>
<flex:StageExternalId>500</flex:StageExternalId>
<flex:ErrorText>err</flex:ErrorText>
<flex:OwnerId>3</flex:OwnerId>
<flex:CreatorId>3</flex:CreatorId>
<flex:SLAStartDate>131413860120000000</flex:SLAStartDate>
<flex:SLAExpirationDate>0</flex:SLAExpirationDate>
<flex:ElapsedProcessingSeconds>10</flex:ElapsedProcessingSeconds>
</flex:batch>
<flex:ownerId>3</flex:ownerId>
</flex:AddNewBatch>
</soapenv:Body>
</soapenv:Envelope>
Yours sincerely,
Alexey
I have disabled the emoticons completely on forum. Hope it wont matter for most of the users:)
Thank you - I have it working now in SoapUI. However when I try the same request as a JSON request (using Postman), it's not working.
The JSON request gives the following error:
{
"name": "Internal server error",
"message": "Internal program error:\nD:\\FC12R1\\0\\FineObjects\\Inc\\Map.h, 361."
}
See below for the working Soap request and the non-working JSON request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:flex="urn:http://www.abbyy.com/FlexiCapture">
<soapenv:Header/>
<soapenv:Body>
<flex:AddNewBatch>
<flex:sessionId>36</flex:sessionId>
<flex:projectId>1</flex:projectId>
<flex:batch>
<flex:Id>0</flex:Id>
<flex:Name>Test</flex:Name>
<flex:ProjectId>1</flex:ProjectId>
<flex:BatchTypeId>0</flex:BatchTypeId>
<flex:Priority>0</flex:Priority>
<flex:Description></flex:Description>
<flex:HasAttachments>false</flex:HasAttachments>
<flex:CreationDate>0</flex:CreationDate>
<flex:DocumentsCount>0</flex:DocumentsCount>
<flex:PagesCount>0</flex:PagesCount>
<flex:RecognizedSymbolsCount>0</flex:RecognizedSymbolsCount>
<flex:VerificationSymbolsCount>0</flex:VerificationSymbolsCount>
<flex:UncertainSymbolsCount>0</flex:UncertainSymbolsCount>
<flex:AssembledDocumentsCount>0</flex:AssembledDocumentsCount>
<flex:RecognizedDocumentsCount>0</flex:RecognizedDocumentsCount>
<flex:VerifiedDocumentsCount>0</flex:VerifiedDocumentsCount>
<flex:ExportedDocumentsCount>0</flex:ExportedDocumentsCount>
<flex:StageExternalId>0</flex:StageExternalId>
<flex:ErrorText></flex:ErrorText>
<flex:OwnerId>3</flex:OwnerId>
<flex:CreatorId>3</flex:CreatorId>
<flex:SLAStartDate>0</flex:SLAStartDate>
<flex:SLAExpirationDate>0</flex:SLAExpirationDate>
<flex:ElapsedProcessingSeconds>0</flex:ElapsedProcessingSeconds>
</flex:batch>
<flex:ownerId>3</flex:ownerId>
</flex:AddNewBatch>
</soapenv:Body>
</soapenv:Envelope>
Non-working JSON request:
{
"MethodName":"AddNewBatch",
"Params": {
"sessionId":36,
"projectId":1,
"batch": {
"Id":0,
"Name":"test",
"ProjectId":1,
"BatchTypeId":0,
"Priority":0,
"Description":"",
"HasAttachments":false,
"CreationDate":0,
"DocumentsCount":0,
"PagesCount":0,
"RecognizedSymbolsCount":0,
"VerificationSymbolsCount":0,
"UncertainSymbolsCount":0,
"AssembledDocumentsCount":0,
"RecognizedDocumentsCount":0,
"VerifiedDocumentsCount":0,
"ExportedDocumentsCount":0,
"StageExternalId":0,
"ErrorText":"",
"OwnerId":3,
"CreatorId":3,
"SLAStartDate":0,
"SLAExpirationDate":0,
"ElapsedProcessingSeconds":0
},
"ownerId":3
}
}
See also http://www.capturedocs.com/thread/error-from-fileservice/ for another error I'm getting further along in the process.
Hello,
Please have a look at this project and script:
https://share.abbyy.com/index.php/s/echcvfQrRU4UYpV
Hope it helps.
Alexey
Thank you - this gave me enough information to get the JSON working.
I needed to add the empty array for Properties and then it worked.
サインインしてコメントを残してください。