Can the Umbraco Web Service in v.3.0.6 create a new document without it being published?
Does anyone know if it is possible to use the umbraco web services in v.3.0.6 to create a new document but not publish it?
Currently whatever I try to do it always publishes the documents and I just want to create new documents that are not published so an end user then has to manually publish them after editing.
This is my code:
var client = new documentServiceSoapClient(); var newDocCarrier = new documentCarrier { ParentID = parentId, Name = qualName, DocumentTypeID = docTypeId };
// I am not adding any properties in this example... but they would be below. var docProperties = new ArrayOfDocumentProperty(); newDocCarrier.DocumentProperties = docProperties;
int newDocId = client.create(newDocCarrier, "username", "password");
This creates a new document which is always published.
So is it possible to do exactly the same, but for the document to be "unpublished" so that an end user has to manually publish it after reviewing.
Never used the built in webservices, but if you take a look at the Client tools project you'll see that it's using a custom webservice. That is because you can then use the Full API using your own webservice. So i would suggest you build your own webservice that creates the document and doesn't publish it.
It seems a bit odd if the built in WS does not support creating the document in an un-published state, as no one seems to have been able to answer this I guess I'll need to dig into the old source.
Thanks for your reply, that is my last resort as I'd hoped to use the built in services to save time, it looks like it might not work out like that.
Can the Umbraco Web Service in v.3.0.6 create a new document without it being published?
Does anyone know if it is possible to use the umbraco web services in v.3.0.6 to create a new document but not publish it?
Currently whatever I try to do it always publishes the documents and I just want to create new documents that are not published so an end user then has to manually publish them after editing.
This is my code:
This creates a new document which is always published.
So is it possible to do exactly the same, but for the document to be "unpublished" so that an end user has to manually publish it after reviewing.
Thanks in advance!
Chris
Hi Chris,
Never used the built in webservices, but if you take a look at the Client tools project you'll see that it's using a custom webservice. That is because you can then use the Full API using your own webservice. So i would suggest you build your own webservice that creates the document and doesn't publish it.
Cheers,
Richard
Hi Richard,
It seems a bit odd if the built in WS does not support creating the document in an un-published state, as no one seems to have been able to answer this I guess I'll need to dig into the old source.
Thanks for your reply, that is my last resort as I'd hoped to use the built in services to save time, it looks like it might not work out like that.
Cheers,
Chris
is working on a reply...