Home

soapUI: how create Document From Source?

You are here

3 posts / 0 new
Last post
soapUI: how create Document From Source?

Hi everybody :D
I had to load a document (i.e. C:\Users\Valerio\Desktop\documento\doc.pdf) from my computer into a folder in Alfresco using CMIS webservice API (through soapUI).
To do this work I should use the createDocumentFromSource exposed by ObjectServicePort or addObjectToFolder exposed by MultiFilingServicePort, but I don't know how to fill the element (see below the soap envelope I have to set)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200908/">
<soapenv:Header/>
<soapenv:Body>
<ns:createDocumentFromSource>
<ns:repositoryId>THE_ID_OF_MY_REPO</ns:repositoryId>
<ns:sourceId> ? </ns:sourceId>
.
.
.
</ns:createDocumentFromSource>
</soapenv:Body>
</soapenv:Envelope>

I attempted with a string like C:\Users\Valerio\Desktop\documento\doc.pdf, but I got the error

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-32461750" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2010-03-16T16:44:19.235Z</wsu:Created>
<wsu:Expires>2010-03-16T16:49:19.235Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Invalid Object Identifier was specified: Identifier is incorrect or Object with the specified Identifier does not exist</faultstring>
<detail>
<cmisFault xmlns="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns2="http://docs.oasis-open.org/ns/cmis/core/200908/">
<type>objectNotFound</type>
[geshifilter-code]0

<message>Invalid Object Identifier was specified: Identifier is incorrect or Object with the specified Identifier does not exist</message>
</cmisFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
[/geshifilter-code]

so I don't know how to create a document into a folder of Afresco from a source document using createDocumentFromSource CMIS WS API.
If someone is able to give me the right information I'll be grateful.

Re: soapUI: how create Document From Source?

I tryed to create a document from a source already stored in another floder (different from the target folder in which I'd like to create the document); using the noderef of this source document it works, but if I need to load a file from my desktop,what should I do?

Re: soapUI: how create Document From Source?

nobody can answer to my question? :(