AnsweredAssumed Answered

Retrieve document using web service

Question asked by brus on May 5, 2009
I am testing CMIS ws api using SoapUI and everything seems to be just fine, but I am confused how to read/write document from/to the repository.

Call to getContentStream method returns invalidArgumentException:

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cmis.org/2008/05">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getContentStream>
         <ns:repositoryId>&lt;Unknown</ns:repositoryId>
         <ns:objectId>workspace://SpacesStore/ecc61ff4-b3bb-4855-81ba-6472afe9cf71</ns:objectId>
      </ns:getContentStream>
   </soapenv:Body>
</soapenv:Envelope>

Response:
<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-29451919" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2009-05-05T20:32:36.219Z</wsu:Created>
            <wsu:Expires>2009-05-05T20:37:36.219Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>Invalid Object Identifier was specified</faultstring>
         <detail>
            <ns1:invalidArgumentException xsi:nil="true" xmlns:ns1="http://www.cmis.org/2008/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance'/>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

For the same ObjectId method getProperties returns complete information:

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cmis.org/2008/05">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getProperties>
         <ns:repositoryId>&lt;Unknown</ns:repositoryId>
         <ns:objectId>workspace://SpacesStore/ecc61ff4-b3bb-4855-81ba-6472afe9cf71</ns:objectId>
<!–Optional
         <ns:returnVersion>?</ns:returnVersion>
         <ns:filter>?</ns:filter>
         <ns:includeAllowableActions>?</ns:includeAllowableActions>
         <ns:includeRelationships>?</ns:includeRelationships>
–>
      </ns:getProperties>
   </soapenv:Body>
</soapenv:Envelope>

Response:
<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-3744736" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2009-05-05T20:51:02.866Z</wsu:Created>
            <wsu:Expires>2009-05-05T20:56:02.866Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <ns1:getPropertiesResponse xmlns:ns1="http://www.cmis.org/2008/05">
         <ns1:object>
            <ns1:properties>
               <ns1:propertyBoolean ns1:name="IsImmutable">
                  <ns1:value>false</ns1:value>
               </ns1:propertyBoolean>
               <ns1:propertyBoolean ns1:name="IsLatestVersion">
                  <ns1:value>true</ns1:value>
               </ns1:propertyBoolean>
               <ns1:propertyBoolean ns1:name="IsMajorVersion">
                  <ns1:value>false</ns1:value>
               </ns1:propertyBoolean>
               <ns1:propertyBoolean ns1:name="IsLatestMajorVersion">
                  <ns1:value>false</ns1:value>
               </ns1:propertyBoolean>
               <ns1:propertyBoolean ns1:name="IsVersionSeriesCheckedOut">
                  <ns1:value>false</ns1:value>
               </ns1:propertyBoolean>
               <ns1:propertyDateTime ns1:name="CreationDate">
                  <ns1:value>2009-05-05T14:20:54.568-04:00</ns1:value>
               </ns1:propertyDateTime>
               <ns1:propertyDateTime ns1:name="LastModificationDate">
                  <ns1:value>2009-05-05T16:09:22.173-04:00</ns1:value>
               </ns1:propertyDateTime>
               <ns1:propertyId ns1:name="ObjectId">
                  <ns1:value>workspace://SpacesStore/ecc61ff4-b3bb-4855-81ba-6472afe9cf71</ns1:value>
               </ns1:propertyId>
               <ns1:propertyId ns1:name="VersionSeriesId">
                  <ns1:value>workspace://SpacesStore/ecc61ff4-b3bb-4855-81ba-6472afe9cf71</ns1:value>
               </ns1:propertyId>
               <ns1:propertyInteger ns1:name="ContentStreamLength">
                  <ns1:value>1301688</ns1:value>
               </ns1:propertyInteger>
               <ns1:propertyString ns1:name="Name">
                  <ns1:value>EMC CMIS Part I – Domain Model v0.5.pdf</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="BaseType">
                  <ns1:value>document</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="ObjectTypeId">
                  <ns1:value>document</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="CreatedBy">
                  <ns1:value>admin</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="LastModifiedBy">
                  <ns1:value>admin</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="ContentStreamMimeType">
                  <ns1:value>application/pdf</ns1:value>
               </ns1:propertyString>
               <ns1:propertyString ns1:name="ContentStreamFilename">
                  <ns1:value>EMC CMIS Part I – Domain Model v0.5.pdf</ns1:value>
               </ns1:propertyString>
            </ns1:properties>
         </ns1:object>
      </ns1:getPropertiesResponse>
   </soap:Body>
</soap:Envelope>

Am I doing something wrong, or what?

Thanks

Update 5/6/2009:
I have installed Labs 3.2 Preview version and result is still the same.

Outcomes