Community

ABBYY FC11 WebService create new Batch

I try to create new Batch over web service but I have problem with insufficiently clear error message:

SOAP Server Application Faulted;
nested exception is javax.xml.ws.soap.SOAPFalutException: SOAP Server Application Faulted

Here is part of code:

//open session
sessionId = service.openSession(1, 1);
//open project
projectId = service.openProject(sessionId, "MyProjectName");
Batch newBatch = new Batch();

newBatch.setBatchTypeId(0);
int newBatchId = service.addNewBatch(sessionId, projectId, newBatch, 0);
boolean openBatch = service.openBatch(sessionId,newBatchId);


when I call service.addNewBatch error is dispatched. Also I need to indicate that ownerID field in project table is NULL, but addNewBatch function require integer and I have problem only when I try to create new Batch, but if I use Batch ID of already created Batch that I create inside Project Setup Station than I have no problems.









0

Comments

5 comments

  • Avatar
    Anastasiya Nechaeva
    Hi Mirko,

    After creating the Batch object try to explicitly initialize all batch properties, for example:

    batch.Id = 0;
    batch.Name = 'New Batch';
    batch.BatchTypeId = 0;
    batch.Priority = 0;
    batch.PropertiesCount = 0;


    Please notify us whether it helps or not.
    0
  • Avatar
    mirko.fisic
    Just try to set all batch properties as you indicated in example, but no success.
    0
  • Avatar
    mirko.fisic
    Actually I set all properties of Batch but no success.
    0
  • Avatar
    mirko.fisic
    Problem is solved I need to set all properties of Document too. thank you very much.
    0
  • Avatar
    Kalyani
    Hi,

    I am using FC11
    Can I get some more details on it?
    How and where, in which stage/event did you scripted the code to create the batch?

    Would be helpful!

    Thanks,
    Kalyani
    0

Please sign in to leave a comment.