Hello everyone,here's my problem. In my application, I upload contants via web services. To accomplish that, I followed a guide that uses two steps, one for creating the content item, and one to actually write the uploaded file in it.
CMLCreate create = new CMLCreate();
create.setId("1");
create.setParent(foldref);
create.setProperty(contentProps);
create.setType(contentType);
NamedValue[] titledProps = new NamedValue[2];
titledProps[0] = Utils.createNamedValue(Constants.PROP_TITLE, fileName);
titledProps[1] = Utils.createNamedValue(Constants.PROP_DESCRIPTION, "Content di prova GG WS");
CML cml = new CML();
cml.setCreate(new CMLCreate[] {create});
UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml);
System.out.println("Reference node created");
Reference content = result[0].getDestination();
ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
FileInputStream is = new FileInputStream(srcName);
byte[] bytes = ContentUtils.convertToByteArray(is);
ContentFormat format = new ContentFormat(mimeType, "UTF-8");
System.out.println("Begin uploading…");
Content cnt = contentService.write(content, Constants.PROP_CONTENT, bytes, format);
Everything goes just fine… but what happens when the content is versionable? After upload, the revision i 1.1 as:1.0: creation of the content item1.1: filling of the content itemobviously, revision 1.0 has no content….any help to avoid that?thanks in advance for your precious help