Document wsdl create
Posted: Tue Apr 26, 2016 5:22 pm
Hi everyone, i'm new to SOAP and logicalDoc. I'm trying to make a java progect that use wsdl schemas to connect, make checkins, updates, and creations of new documents.
I'm using Eclipse with some web services client (Document, Auth, Folder).
I mean that I'm not using the logicalDoc Api (webesrvices, core) that gives the possibility of using a DocumentClient but I'm using DocumentServiceProxy.
The problem is that when I create a new document nothing happens: no Errors are thrown, but no document is created.
java code:
String host = "https://MYLogicalDoc:8080/services";
DocumentServiceProxy documentClient = new DocumentServiceProxy(host + "/Document");
AuthServiceProxy auth = new AuthServiceProxy(host + "/Auth");
String sid = auth.login(userName, password);
WsDocument document = new WsDocument();
document.setComment(comment);
document.setTitle("Title");
document.setFileName("name");
document.setLanguage("en");
document.setType("txt");
document.setFolderId(folder.getId());//id where I need the folder
WsDocumentHolder docHolder= new WsDocumentHolder(document);
InputStream stream = new FileInputStream("path\to\my\file.txt");
byte[] bytesArray= new byte[(int) file.length()];
documentClient.create(sid, docHolder, bytesArray);
The create function is supposed to create a new document, isn't it?
Something strange happens because when I try to create a document with a name it doesn't get created (if I search with a given id (or name) I don't get the document, so supposely it doesn't exist) but if I try to create a document with the same name from another java project (works with Logicaldoc api (webesrvices, core) -fully working-tested) the document is created but to the name given is added a round square with a number (e.g (2)) like there actually exist a document with that name.
I'm using Eclipse with some web services client (Document, Auth, Folder).
I mean that I'm not using the logicalDoc Api (webesrvices, core) that gives the possibility of using a DocumentClient but I'm using DocumentServiceProxy.
The problem is that when I create a new document nothing happens: no Errors are thrown, but no document is created.
java code:
String host = "https://MYLogicalDoc:8080/services";
DocumentServiceProxy documentClient = new DocumentServiceProxy(host + "/Document");
AuthServiceProxy auth = new AuthServiceProxy(host + "/Auth");
String sid = auth.login(userName, password);
WsDocument document = new WsDocument();
document.setComment(comment);
document.setTitle("Title");
document.setFileName("name");
document.setLanguage("en");
document.setType("txt");
document.setFolderId(folder.getId());//id where I need the folder
WsDocumentHolder docHolder= new WsDocumentHolder(document);
InputStream stream = new FileInputStream("path\to\my\file.txt");
byte[] bytesArray= new byte[(int) file.length()];
documentClient.create(sid, docHolder, bytesArray);
The create function is supposed to create a new document, isn't it?
Something strange happens because when I try to create a document with a name it doesn't get created (if I search with a given id (or name) I don't get the document, so supposely it doesn't exist) but if I try to create a document with the same name from another java project (works with Logicaldoc api (webesrvices, core) -fully working-tested) the document is created but to the name given is added a round square with a number (e.g (2)) like there actually exist a document with that name.