cancel
Showing results for 
Search instead for 
Did you mean: 

soapUI:how retrieve IDs ?

_valerio_
Champ in-the-making
Champ in-the-making
hi everybody
I'm trying to use soapUI 3.5; when I use the services exposed (i.e. getProperties exposed by ObjectServicePort)  there are some fields to fill with values that I don't know how to retrieve. For example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getProperties>
         <ns:repositoryId>?</ns:repositoryId>
         <ns:objectId>?</ns:objectId>
         <ns:filter>?</ns:filter>
         <ns:extension>
            <!–You may enter ANY elements at this point–>
         </ns:extension>
      </ns:getProperties>
   </soapenv:Body>
</soapenv:Envelope>
how and where can I retrieve the information of repositoryId and objectId?  :?:

thanks a lot Smiley Very Happy
8 REPLIES 8

openpj
Elite Collaborator
Elite Collaborator
You can have more feedbacks in the Alfresco CMIS forum here:
http://forums.alfresco.com/en/viewforum.php?f=45

Anyway, you can retrieve the repositoryId and the rootFolderId using the RepositoryService getting the RepositoryInfo object for each repository exposed by CMIS  :wink:

The ObjectId is the nodeRef of the object and you need to execute a search to retrieve all the IDs.

Hope this helps.

_valerio_
Champ in-the-making
Champ in-the-making
Anyway, you can retrieve the repositoryId and the rootFolderId using the RepositoryService getting the RepositoryInfo object for each repository exposed by CMIS 

The ObjectId is the nodeRef of the object and you need to execute a search to retrieve all the IDs.

Hope this helps.

But, if go to the page of view details ( in more action->view details) and I  click on  Alfresco Node Reference am I able to retrieve these informations?

I ask this  because if I use getRepositoryInfo of RepositoryServicePort

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRepositoryInfo>
         <ns:repositoryId>?</ns:repositoryId>
         <ns:extension>
            <!–You may enter ANY elements at this point–>
         </ns:extension>
      </ns:getRepositoryInfo>
   </soapenv:Body>
</soapenv:Envelope>

the sistem return the following error

RAW:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 1060
Date: Fri, 12 Mar 2010 10:34:29 GMT
Connection: close

<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 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-13457779"><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2010-03-12T10:34:29.712Z</wsu:Created><wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2010-03-12T10:39:29.712Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Invalid repository id</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>invalidArgument</type>0<message>Invalid repository id</message></cmisFault></detail></soap:Fault></soap:Body></soap:Envelope>

XML:
<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-13457779" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2010-03-12T10:34:29.712Z</wsu:Created>
            <wsu:Expires>2010-03-12T10:39:29.712Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>Invalid repository id</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>invalidArgument</type>
               0
               <message>Invalid repository id</message>
            </cmisFault>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

openpj
Elite Collaborator
Elite Collaborator
You have to invoke repositoryService.getRepositories() and then you need to iterate the first result of this list getting the repositoryInfo.

_valerio_
Champ in-the-making
Champ in-the-making
You have to invoke repositoryService.getRepositories() and then you need to iterate the first result of this list getting the repositoryInfo.

but you mean with a javascropt code applied through a business rule?

_valerio_
Champ in-the-making
Champ in-the-making
I succeed to retrieve the repository ID throwing the getRepositories request of the RepositoryServicePort (I don't know why the previous time I tried to do so I didn't succeed); Now I'm able to get also repository info.

what I need now is to retrieve the ID of the document I need to set properties; I'm trying…………

Hi Valerio,

Can you post the soap request which you used to get the repository_id from alfresco?

Thanks

Regards
Nandha

_valerio_
Champ in-the-making
Champ in-the-making
I succeed to retrieve the repository ID throwing the getRepositories request of the RepositoryServicePort (I don't know why the previous time I tried to do so I didn't succeed); Now I'm able to get also repository info.

what I need now is to retrieve the ID of the document I need to set properties; I'm trying…………

I retrieve the document id pointing the mouse over the Alfresco Node Reference (present in the detail's page of the document) and copying it.
IT WORKS!

just a clarification: I need to retrieve from the document properties (with getProperties exposed by ObjectServicePort) also the custom aspects I add to my custom model, whereas I can retrieve only properties like

Name

IsImmutable

IsLatestVersion

IsMajorVersion

IsLatestMajorVersion

VersionLabel

VersionSeriesId

IsVersionSeriesCheckedOut

VersionSeriesCheckedOutBy

VersionSeriesCheckedOutId

CheckinComment

ContentStreamAllowed

ContentStreamLength

and not the custom aspect I added (i.e. custom:indirizzo,custom:numerofattura,custom:destinatario,ecc…); Is there a CMIS WS API to do what I want?

Please help me! Smiley Sad

_valerio_
Champ in-the-making
Champ in-the-making
I found the answer to my question. With the method updateProperties I'm able to add and set the custom aspect I want simply filling the field of the soap envelope in the following way:

            <ns1:propertyId propertyDefinitionId="custom:Property" localName="?" displayName="?" queryName="?">
               <!–Zero or more repetitions:–>
               <ns1:value>VALUE</ns1:value>
[code]

hope this post will help other people with the same issue 😄
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.