Has anyone else been able to successfully configure this module to interact with an Alfresco instance that is running in a secure environment? Is it even supported?

The URL Repository value we're using is:
https://ourserver:8443/alfresco/api

We know that we are able to get to the WSDLs without issue in other SOAP utilities, but all we get is this in the logs:

SoapFault Object
(
    [message:protected] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://ourcontentserver:8443/alfresco/api/AuthenticationService?wsdl' : Start tag expected, '<' not found

    [string:private] => 
    [code:protected] => 0
    [file:protected] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/lib/Alfresco/Service/WebService/AlfrescoWebService.php
    [line:protected] => 50
    [trace:private] => Array
        (
            [0] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/lib/Alfresco/Service/WebService/AlfrescoWebService.php
                    [line] => 50
                    [function] => SoapClient
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => https://ourcontentserver:8443/alfresco/api/AuthenticationService?wsdl
                            [1] => Array
                                (
                                )

                        )

                )

            [1] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/lib/Alfresco/Service/WebService/WebServiceFactory.php
                    [line] => 32
                    [function] => __construct
                    [class] => AlfrescoWebService
                    [type] => ->
                    [args] => Array
                        (
                            [0] => https://ourcontentserver:8443/alfresco/api/AuthenticationService?wsdl
                            [1] => Array
                                (
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/lib/Alfresco/Service/Repository.php
                    [line] => 63
                    [function] => getAuthenticationService
                    [class] => AlfWebServiceFactory
                    [type] => ::
                    [args] => Array
                        (
                            [0] => https://ourcontentserver:8443/alfresco/api
                        )

                )

            [3] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/includes/alfresco.soap.inc
                    [line] => 76
                    [function] => authenticate
                    [class] => AlfRepository
                    [type] => ->
                    [args] => Array
                        (
                            [0] => username
                            [1] => password
                        )

                )

            [4] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/includes/alfresco.soap.inc
                    [line] => 22
                    [function] => alfresco_soap_create_session
                    [args] => Array
                        (
                        )

                )

            [5] => Array
                (
                    [file] => /home/ummaint/public_html/dev/sites/all/modules/alfresco/includes/alfresco.soap.inc
                    [line] => 160
                    [function] => alfresco_soap_get_session
                    [args] => Array
                        (
                        )

                )

            [6] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/sites/all/modules/alfresco/alfresco_browser/alfresco_browser.pages.inc
                    [line] => 26
                    [function] => alfresco_soap_node_load
                    [args] => Array
                        (
                            [0] => /app:company_home
                        )

                )

            [7] => Array
                (
                    [function] => alfresco_browser_page
                    [args] => Array
                        (
                        )

                )

            [8] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/includes/menu.inc
                    [line] => 348
                    [function] => call_user_func_array
                    [args] => Array
                        (
                            [0] => alfresco_browser_page
                            [1] => Array
                                (
                                )

                        )

                )

            [9] => Array
                (
                    [file] => /home/ourwebserver/public_html/dev/index.php
                    [line] => 18
                    [function] => menu_execute_active_handler
                    [args] => Array
                        (
                        )

                )

        )

    [faultstring] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://ourcontentserver:8443/alfresco/api/AuthenticationService?wsdl' : Start tag expected, '<' not found

    [faultcode] => WSDL
)

Comments

jmattturn’s picture

Category: support » feature

In case anyone else runs into this, it can be done and I hope that our discovery might improve the UI and feature set so the module can support SSL connections to the Alfresco API natively.

From the module root:

/lib/Alfresco/Service/WebService/AlfrescoWebService.php

Modify the __construct() function and define the $options parameter value as follows:

$options = array('local_cert' => file_get_contents('/absolutepathto/cert_key.pem'));

Then copy and paste the cert to the location indicated above.

Worked for us like a charm.

Hope this helps and again please consider supporting this feature to make this great module even better!