AnsweredAssumed Answered

soapUI: how create Document From Source?

Question asked by _valerio_ on Mar 16, 2010
Latest reply on Mar 17, 2010 by _valerio_
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  <ns:sourceId> 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>
               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>

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.

Outcomes