Using the Web services interface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2008 07:34 PM
1) There is a mismatch between the implementation status as defined at http://wiki.alfresco.com/wiki/Alfresco_Draft_Implementation_Status and the actual operations made available via the WSDL files. For example, RepositoryService.wsdl declares 4 operations, while the implementation status document lists more than 4 and at the same time does not list getRepositories (which is included in the wsdl file)
2) I tried the getRepositories operation, by sending out this SOAP message:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:q0="http://www.cmis.org/2008/05" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:getRepositories/>
</soapenv:Body>
</soapenv:Envelope>
but I receive the following SOAP fault response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse

<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-23366617">
<wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-16T23:24:41.031Z</wsu:Created>
<wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-16T23:29:41.031Z</wsu:Expires>
</wsu:Timestamp>
</wsse

</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:InvalidSecurity</faultcode>
<faultstring>An error was discovered processing the <wsse

</soap:Fault>
</soap:Body>
</soap:Envelope>
(not sure where the wsse header is coming from)
3) I tried to use getRepositoryInfo, which requires the input parameter repositoryID, but I have no idea where to get that information from. I set up my Alfresco server following exactly the Alfresco Tutorial PDF document. How do I get a repositoryID using the Web GUI?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2008 02:36 PM
If that is the case, it would really help if you guys could provide some documentation in this area, including which security tokens to use, examples, etc. This is particularly necessary given the fact that the CMIS spec does not address security and leaves that aspect to the various implementations.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2008 01:44 PM
If you checkout the Labs from svn HEAD, you'll find a Java CMIS Web Service client.
It's located in projects/remote-api/source/sample/JavaCmisTest.
There's the source code and a build script for creating a stand-alone client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2008 07:27 PM
Of course, I would like to get the same results with my own WS client. This is what I send out from my WS client:
POST /alfresco/cmis/RepositoryService HTTP/1.1
Host: localhost
Accept: application/soap+xml,multipart/related,text/*
User-Agent: IBM WebServices/1.0
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8
Content-Length: 747
Date: Fri, 19 Sep 2008 21:17:05 GMT
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse

<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse


</wsse:UsernameToken>
</wsse

</soapenv:Header>
<soapenv:Body>
<p606:getRepositories xmlns

</soapenv:Body>
</soapenv:Envelope>
In response, I get this SOAP fault: "An error was discovered processing the <wsse

Is my SOAP request message incorrect? If it is, could you please show me what the correct request should look like?
Thank you,
Ugo Corda

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2008 05:52 AM
Encoding: UTF-8Headers: {content-length=[1737], connection=[keep-alive], cache-control=[no-cache], host=[localhost:8080], user-agent=[Java/1.5.0_13], pragma=[no-cache], content-type=[text/xml; charset=UTF-8], accept=[*], soapaction=[""]}Messages: Message:Payload: <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" soap:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-2802048"><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-23T09:40:08.828Z</wsu:Created><wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-23T09:45:08.828Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-826697"><wsse:Username xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">admin</wsse:Username><wsse:Password xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">EPno7gYsqvt3H84BUfY/rJkPHuU=</wsse:Password><wsse:Nonce xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">mu6wI6ib1CNia+6mBWGFsA==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-23T09:40:08.824Z</wsu:Created></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><ns1:getRepositories xmlns:ns1="http://www.cmis.org/2008/05" /></soap:Body></soap:Envelope>
The response is…
Encoding: UTF-8Headers: {}Messages: Payload: <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-10854270"><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-23T09:40:09.384Z</wsu:Created><wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2008-09-23T09:45:09.384Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><ns1:getRepositoriesResponse xmlns:ns1="http://www.cmis.org/2008/05"><ns1:repository><ns1:repositoryID><Unknown</ns1:repositoryID><ns1:repositoryName>Main Repository</ns1:repositoryName></ns1:repository></ns1:getRepositoriesResponse></soap:Body></soap:Envelope>
It turned out to be more difficult than I thought to log this information. An update on HEAD makes this easier. I suggest updating at which point you can set the following log4j.properties value to trace in/out messages:
log4j.logger.org.apache.cxf=info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2008 06:02 PM
opensaml-1.0.1.jar
velocity-1.4.jar
velocity-dep-1.4.jar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2008 01:01 PM
I am creating the client using the IBM WebSphere/Rational set of tools, and they only support the PasswordText type of password.
I strongly suggest you guys also accept the PasswordType token, otherwise the basic reason for using the Web services interface, i.e. interoperability with various clients, would be nullified.
Thank you,
Ugo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2008 01:05 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2008 01:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2008 03:26 PM
GetRepositoryInfo parameteers = new GetRepositoryInfo(); List<CmisRepositoryEntryType> entries = servicesPort.getRepositories(); // RepositoryServicePort defaultRepositoryId = entries.get(0).getRepositoryID(); defaultRepositoryName = entries.get(0).getRepositoryName(); parameteers.setRepositoryId(defaultRepositoryId);
However, when using the resulting defaultRepositoryId or defaultRepositoryName as the repositoryId input to getProperties, the operation returns a SOAP fault indicating invalid repository ID. Where can we locate the correct ID for getProperties?
