cancel
Showing results for 
Search instead for 
Did you mean: 

Javadoc for the Alfresco WebService API

junieboy
Champ in-the-making
Champ in-the-making
Hi All,

I hope someone could point me out links where to download or get the javadoc/documentation for the org.alfresco.webservice classes i.e. webservice APIs.

Thanks.
18 REPLIES 18

mrogers
Star Contributor
Star Contributor
Well we have been on a wild goose chase with the remote-api project. :roll:

The javadoc for the org.alfresco.webservice.repository package is generated from the "web-service-client" project.  The build puts the java doc into  \build\docs\java\generated below web-service-client.   However it is javadoc for generated code so while better than nothing, it is still machine generated documentation.

mwildam
Champ in-the-making
Champ in-the-making
But where does the .repo. come from? - The remote API class names are different.

The javadoc for the org.alfresco.webservice.repository package is generated from the "web-service-client" project.  The build puts the java doc into  \build\docs\java\generated below web-service-client.   However it is javadoc for generated code so while better than nothing, it is still machine generated documentation.
Every javadoc is usually machine generated, isn't it?
I looked a little at portions of the Alfresco source code and … let's say … the comments and documentation is very "spartan".
Oh wonder, the javadoc also does not hold comprehensive information, so it is quite useless for me.

So far my first experiences with the Alfresco API is trial & error.
I think the most helpful documentation is still found at a few pages on the Wiki.

mwildam
Champ in-the-making
Champ in-the-making
Each day working with the Alfresco API I am getting more upset.

E.g. looking at http://dev.alfresco.com/resource/docs/java/remote-api/
The Utils class contains members - e.g. all starting with "convert" - that I don't have there available in the remote API although working with the latest community version of Alfresco (3.2.something).

So what the hack is wrong?
A lot of examples in the Wiki (oh there are several differnt pages talking about how to search - don't know why there can't be just one - instead many different with all having just portions of information or repeating the same wrong information again) talk about the searchService. I have no idea how I can get to that - the WebServiceFactory does not offer it.

So I have two options:
1. Feeling completely stupid not seeing the forest because being overwhelmed by all those trees or
2. Judging at least the documentation to be a complete mess.

If you feel 1. is correct please throw me a help line and point me to some real working examples (those I already downloaded as part of the SDK are incomplete already when it comes to parsing/finding path structures).

mwildam
Champ in-the-making
Champ in-the-making
At least I noticed that I my "internal Foundation-API detector" is improving quality. As Foundation API is something I don't want to use because of the in-process architecture, all samples using that are to be ignored - and I guess this applies also for many others trying to deal with Alfresco API, isn't it?

ray_30579
Champ in-the-making
Champ in-the-making
I still haven't found the remote-api-doc.zip

ray_30579
Champ in-the-making
Champ in-the-making
I still haven't found the remote-api-doc.zip

mwildam
Champ in-the-making
Champ in-the-making
Here it is: http://dl.dropbox.com/u/1969624/Docu/javadoc-remote-api-3.2r2.zip
But: How happy I was when I got it, I was disappointed by the content. Don't expect much.

Most valuable hints I got from
alfresco-community-sdk-3.2r2/samples/WebServiceSamples
and
alfresco-community-sdk-3.2r2/samples/FirstWebServiceClient
for example - and a lot of different forum topics and from the Alfresco development book
and … A LOT OF TESTING.

Just to give an example: There is a sample cited a lot of times to retrieve meta information from nodes:
// Get the infomation from the result set
// […]
            for(ResultSetRow row : rows) {
                String nodeId = row.getNode().getId();
                ContentResult contentResult = new ContentResult(nodeId);   
                // iterate through the columns of the result set to extract specific named values
                for (NamedValue namedValue : row.getColumns()) {
                    if (namedValue.getName().endsWith(Constants.PROP_CREATED) == true) {
                        contentResult.setCreateDate(namedValue.getValue());
                    } else if (namedValue.getName().endsWith(Constants.PROP_NAME) == true) {
                        contentResult.setName(namedValue.getValue());
                    }
                }
// […]
And this is simply not working - at least not with a recent version of Alfresco Community. It must be:
[…]        Reference ref = new Reference(spacesStore, uuid, null);
        Predicate prd = new Predicate(new Reference[]
                {
                    ref
                }, null, null);;
        try
        {
            Node[] nodes = repositoryService.get(prd);
            if (nodes.length >= 1)
            {
                Node node = nodes[0];
                NamedValue[] props = node.getProperties();
[…]
I don't know why I encountered mostly the first sample while the second was working and the first not. Somehow there must have been a time when the first was working (either). This is just a sample of pitfalls I encountered.

junieboy
Champ in-the-making
Champ in-the-making
I discovered that the remote API does not seem to be contained somewhere in the javadoc linked above.

Again another example of outdated or mismatching documentation…  :cry:
It is really frustrating - plenty of APIs but neither one nor the other is a pleasure to use…

Hi, were you looking for http://dev.alfresco.com/resource/docs/java/repository/index.html?overview-summary.html ?

The root page would be http://dev.alfresco.com/resource/docs/java/

Hi,

Thanks so much for the responses! Would you mind if I ask if there would be any upcoming improvements on the documentation of the Alfresco Web Services API? I sincerely believe this is one of the most important and crucial part of the whole Alfresco feature set, specially that we see the benefit of using Alfresco as our Document Management platform. Our company is focused on service oriented architecture, and our systems communicate via web services. It would appear through this year that we will be implementing Alfresco as our platform for content management and we will also be implementing our own custom content model to define our documents and all the metadata associated to them.

I hope we're going to see more significant improvements on the API documentation and seek more doc/examples on this space covering use cases applicable for document management when files are coming from external systems. Also, there is not much documentation on how reliable the web services approach is in production. If this is pushing through, we will virtually upload thousands of documents monthly and there is no documentation on how maintenance, control and capacity planning, and disaster recovery should be done within the repository (If we have any references/links for these, please be so kind to point them out).

Thanks!

Regards.

mrogers
Star Contributor
Star Contributor
The problem is that the web service client API is generated code, which is why the java doc has never been up to scratch.

At the moment, although the java doc for the web service client is available,  the alfresco wiki is the place for the Web Service documentation.    I've spent some time tracking things down and cleaning up the wiki and SDK for the 3.3 release.    However I don't see much community involvement with the web service documentation.   Please contribute examples and review and update the documentation on the wiki pages.

In the near term, 3.3 has the CMIS web scripts which I hope and expect will be better documented.    And I've heard rumors of a new member of the documentation team being employed to work on the Alfresco APIs.