Hello!
I started a drupal and alfresco integration
the problem is I can't connect the two although the configuration seems in place
Screenshot1
The error in status report is like in the image attached
status report error

Am I doing something wrong?
If so can I get some help on this thanks
Lenny

Comments

fgjohnson@lojoh.ca’s picture

HTTP request failed (error 401)... how come. :-)

Drupal 7.23 & Alfresco Community 4.2e
CMIS (7.x-1.6), CMIS Views (7.x-1.1) and the Alfresco (7.x-1.x-dev) modules are all installed.

Updating my comment - Configuration all works when Drupal and Alfresco reside on the same server.
- using localhost as endpoint.

However:
A Drupal install on a different server can't CMIS connect to the repo using the IP of that server.
- - http://xxx.xxx.xxx.xxx:8080/alfresco/api with the appropriate username/password for the repository returns:
- - - HTTP request failed (error 401)... how come. :-)

This URL in a browser prompts for credentials and returns a empty json list: as expected (right?):

{"list":{"pagination":{"count":1,"hasMoreItems":false,"totalItems":1,"skipCount":0,"maxItems":100},"entries":[{"entry":{"id":"-default-","quotas":[],"isEnabled":true}}]}}

ahmedgalal007’s picture

Issue summary: View changes

The same problem

Drupal 7.26 & Alfresco Community 4.2e
CMIS (7.x-1.6), CMIS Views (7.x-1.1) and the Alfresco (7.x-1.x-dev) modules are all installed

CMIS browser and CMIS Views Works perfectly but the URI in the settings.php IS
http://127.0.0.1:8080/alfresco/s/cmis

The Alfresco Module use the URI http://127.0.0.1:8080/alfresco/api
and give me 401 error
with the same cerdentials in the CMIS Module

rijkaard’s picture

The problem is in the function _alfresco_verify_connection_repository which is located inside the file alfresco.install.
The function first checks if Drupal can make HTTP requests, but without passing a username and password, then an error is returned and is set to the value 1 in the variable alfresco_http_request_fails. Subsequent checks the function reads the value of the variable and if it is set to 1 returns the error, without redoing the control.

The solution, for me, is:
1. Comment from line 346 to 358;
2. Comment from line 363 to 376;
3. On line 387, replace ('system', 'system') with ('SpacesStore', 'workspace').

fgjohnson@lojoh.ca’s picture

Thanks rijkaard ... FYI.
That sounded promising and must be close.

Doesn't work for me though. Kills the soap client.

I double checked my changes... We are just using the IP address on this server.
I wonder if that's messing with the passed variables somehow.

https://123.123.123.123/drupal
https://123.123.123.123:8080/share

Grant

hoecake’s picture

Same error that we occured :

Drupal 7.28 + Alfresco EE 4.2.2

gareth.schofield’s picture

I am having this exact same issue, did you ever resolve?

lennyaspen’s picture

Component: Documentation » Code
Status: Active » Closed (won't fix)

This project seems to be abandoned
Solution provided in this #comment-8593387
tested by me and @fgjohnson
doesn't work, s it breaks Soap client.
Another very promising module seems osCAddie aka canopy
but good luck compiling the code for the alfresco side.
I am closing this as won't get fixed
If it gets fixed reopen it.

smartinm’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

I apologize for the delay here.

This 401 error is for the HTTP request to Web Service endpoint (http://alfrescohost/alfresco/api). This authentication is not related to credentials of Alfresco.

Please also note that the endpoint for soap web services was moved for alfresco 4.2.d. To make way for the public api. now instead of being http://localhost:8080/alfresco/api the soap services resides at http://localhost:8080/alfresco/soapapi